Visualization Library 2.0.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
RenderState wrapping the OpenGL function glMaterial() and glColorMaterial(), see also http://www.opengl.org/sdk/docs/man/xhtml/glMaterial.xml and http://www.opengl.org/sdk/docs/man/xhtml/glColorMaterial.xml for more information. More...
#include <Shader.hpp>
Public Member Functions | |
Material () | |
virtual ERenderState | type () const |
virtual void | apply (int index, const Camera *, OpenGLContext *ctx) const |
The parameter cameara is NULL if we are disabling the state, non-NULL if we are enabling it. More... | |
void | multiplyTransparency (float alpha) |
float | getMinimumAlpha () const |
void | setTransparency (float alpha) |
void | setFrontTransparency (float alpha) |
void | setBackTransparency (float alpha) |
void | setFrontFlatColor (const fvec4 &color) |
void | setBackFlatColor (const fvec4 &color) |
void | setFlatColor (const fvec4 &color) |
void | setAmbient (const fvec4 &color) |
void | setDiffuse (const fvec4 &color) |
void | setSpecular (const fvec4 &color) |
void | setEmission (const fvec4 &color) |
void | setShininess (float shininess) |
void | setFrontAmbient (const fvec4 &color) |
void | setFrontDiffuse (const fvec4 &color) |
void | setFrontSpecular (const fvec4 &color) |
void | setFrontEmission (const fvec4 &color) |
void | setFrontShininess (float shininess) |
const fvec4 & | frontAmbient () const |
const fvec4 & | frontDiffuse () const |
const fvec4 & | frontSpecular () const |
const fvec4 & | frontEmission () const |
float | frontShininess () const |
void | setBackAmbient (const fvec4 &color) |
void | setBackDiffuse (const fvec4 &color) |
void | setBackSpecular (const fvec4 &color) |
void | setBackEmission (const fvec4 &color) |
void | setBackShininess (float shininess) |
const fvec4 & | backAmbient () const |
const fvec4 & | backDiffuse () const |
const fvec4 & | backSpecular () const |
const fvec4 & | backEmission () const |
float | backShininess () const |
void | setColorMaterial (EPolygonFace face, EColorMaterial color) |
EPolygonFace | colorMaterialFace () const |
EColorMaterial | colorMaterial () const |
void | setColorMaterialEnabled (bool enabled) |
bool | colorMaterialEnabled () const |
virtual ref< RenderState > | clone () const |
Public Member Functions inherited from vl::RenderStateNonIndexed | |
RenderStateNonIndexed () | |
Public Member Functions inherited from vl::RenderState | |
RenderState () | |
Public Member Functions inherited from vl::Object | |
Object () | |
Constructor. More... | |
Object (const Object &other) | |
Copy constructor: copies the name, ref count mutex and user data. More... | |
Object & | operator= (const Object &other) |
Copy operator: copies the object's name, ref count mutex and user data. More... | |
const std::string & | objectName () const |
The name of the object, by default set to the object's class name. More... | |
void | setObjectName (const char *name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setObjectName (const std::string &name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setRefCountMutex (IMutex *mutex) |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
IMutex * | refCountMutex () |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
const IMutex * | refCountMutex () const |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
int | referenceCount () const |
Returns the number of references of an object. More... | |
void | incReference () const |
Increments the reference count of an object. More... | |
void | decReference () |
Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More... | |
void | setAutomaticDelete (bool autodel_on) |
If set to true the Object is deleted when its reference count reaches 0. More... | |
bool | automaticDelete () const |
If set to true the Object is deleted when its reference count reaches 0. More... | |
template<class T > | |
T * | as () |
Casts an Object to the specified class. More... | |
template<class T > | |
const T * | as () const |
Casts an Object to the specified class. More... | |
Protected Attributes | |
fvec4 | mFrontAmbient |
fvec4 | mFrontDiffuse |
fvec4 | mFrontSpecular |
fvec4 | mFrontEmission |
fvec4 | mBackAmbient |
fvec4 | mBackDiffuse |
fvec4 | mBackSpecular |
fvec4 | mBackEmission |
float | mBackShininess |
float | mFrontShininess |
EPolygonFace | mColorMaterialFace |
EColorMaterial | mColorMaterial |
bool | mColorMaterialEnabled |
Protected Attributes inherited from vl::Object | |
std::string | mObjectName |
IMutex * | mRefCountMutex |
int | mReferenceCount |
bool | mAutomaticDelete |
Additional Inherited Members | |
Protected Member Functions inherited from vl::Object | |
virtual | ~Object () |
RenderState wrapping the OpenGL function glMaterial() and glColorMaterial(), see also http://www.opengl.org/sdk/docs/man/xhtml/glMaterial.xml and http://www.opengl.org/sdk/docs/man/xhtml/glColorMaterial.xml for more information.
Under OpenGL ES 1.x the front material properties are used for both front and back faces.
Definition at line 774 of file Shader.hpp.
Material::Material | ( | ) |
Definition at line 333 of file Shader.cpp.
References vl::CM_AMBIENT_AND_DIFFUSE, and vl::PF_FRONT_AND_BACK.
|
virtual |
The parameter cameara is NULL if we are disabling the state, non-NULL if we are enabling it.
Implements vl::RenderState.
Definition at line 427 of file Shader.cpp.
References vl::CM_AMBIENT_AND_DIFFUSE, vl::Log::error(), VL_CHECK_OGL, and VL_TRAP.
|
inline |
Definition at line 817 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::exportMaterial().
|
inline |
Definition at line 818 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::exportMaterial().
|
inline |
Definition at line 820 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::exportMaterial().
|
inline |
Definition at line 821 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::exportMaterial().
|
inline |
Definition at line 819 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::exportMaterial().
|
inlinevirtual |
Implements vl::RenderState.
Definition at line 831 of file Shader.hpp.
|
inline |
Definition at line 827 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::exportMaterial().
|
inline |
Definition at line 829 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::exportMaterial().
|
inline |
Definition at line 826 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::exportMaterial().
|
inline |
Definition at line 805 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::exportMaterial().
|
inline |
Definition at line 806 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::exportMaterial().
|
inline |
Definition at line 808 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::exportMaterial().
|
inline |
Definition at line 809 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::exportMaterial().
|
inline |
Definition at line 807 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::exportMaterial().
float Material::getMinimumAlpha | ( | ) | const |
Definition at line 353 of file Shader.cpp.
References vl::min().
void Material::multiplyTransparency | ( | float | alpha | ) |
Definition at line 365 of file Shader.cpp.
Referenced by vl::DaeLoader::setup_vl_Effect().
|
inline |
Definition at line 793 of file Shader.hpp.
Referenced by vl::loadAC3D(), vl::ObjLoader::loadOBJ(), and vl::DaeLoader::setup_vl_Effect().
|
inline |
Definition at line 811 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::importMaterial().
|
inline |
Definition at line 812 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::importMaterial().
|
inline |
Definition at line 814 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::importMaterial().
void Material::setBackFlatColor | ( | const fvec4 & | color | ) |
Definition at line 411 of file Shader.cpp.
References vl::Vector4< T_Scalar >::a().
|
inline |
Definition at line 815 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::importMaterial().
|
inline |
Definition at line 813 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::importMaterial().
void Material::setBackTransparency | ( | float | alpha | ) |
Definition at line 393 of file Shader.cpp.
|
inline |
Definition at line 825 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::importMaterial().
|
inline |
Definition at line 828 of file Shader.hpp.
Referenced by vl::Molecule::ballAndStickStyle(), vlX::VLXClassWrapper_Material::importMaterial(), and vl::Molecule::sticksStyle().
|
inline |
Definition at line 794 of file Shader.hpp.
Referenced by vl::loadAC3D(), vl::ObjLoader::loadOBJ(), and vl::DaeLoader::setup_vl_Effect().
|
inline |
Definition at line 796 of file Shader.hpp.
Referenced by vl::loadAC3D(), vl::ObjLoader::loadOBJ(), and vl::DaeLoader::setup_vl_Effect().
void Material::setFlatColor | ( | const fvec4 & | color | ) |
Definition at line 421 of file Shader.cpp.
Referenced by vl::VectorGraphics::popScissor().
|
inline |
Definition at line 799 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::importMaterial().
|
inline |
Definition at line 800 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::importMaterial().
|
inline |
Definition at line 802 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::importMaterial().
void Material::setFrontFlatColor | ( | const fvec4 & | color | ) |
Definition at line 401 of file Shader.cpp.
References vl::Vector4< T_Scalar >::a().
|
inline |
Definition at line 803 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::importMaterial().
|
inline |
Definition at line 801 of file Shader.hpp.
Referenced by vlX::VLXClassWrapper_Material::importMaterial().
void Material::setFrontTransparency | ( | float | alpha | ) |
Definition at line 385 of file Shader.cpp.
|
inline |
Definition at line 797 of file Shader.hpp.
Referenced by vl::loadAC3D(), vl::ObjLoader::loadOBJ(), and vl::DaeLoader::setup_vl_Effect().
|
inline |
Definition at line 795 of file Shader.hpp.
Referenced by vl::loadAC3D(), vl::ObjLoader::loadOBJ(), and vl::DaeLoader::setup_vl_Effect().
void Material::setTransparency | ( | float | alpha | ) |
Definition at line 377 of file Shader.cpp.
Referenced by vl::loadAC3D().
|
inlinevirtual |
Reimplemented from vl::RenderState.
Definition at line 780 of file Shader.hpp.
References vl::RS_Material.
|
protected |
Definition at line 843 of file Shader.hpp.
|
protected |
Definition at line 844 of file Shader.hpp.
|
protected |
Definition at line 846 of file Shader.hpp.
|
protected |
Definition at line 847 of file Shader.hpp.
|
protected |
Definition at line 845 of file Shader.hpp.
|
protected |
Definition at line 851 of file Shader.hpp.
|
protected |
Definition at line 852 of file Shader.hpp.
|
protected |
Definition at line 850 of file Shader.hpp.
|
protected |
Definition at line 839 of file Shader.hpp.
|
protected |
Definition at line 840 of file Shader.hpp.
|
protected |
Definition at line 842 of file Shader.hpp.
|
protected |
Definition at line 848 of file Shader.hpp.
|
protected |
Definition at line 841 of file Shader.hpp.
Visualization Library 2.0.0 Reference Documentation
Updated on Wed Dec 23 2020 12:44:09.
© Copyright Michele Bosi. All rights reserved.