|
AGX Dynamics
2.35.0.1
|
Class for storing rendering material. More...
#include <RenderMaterial.h>
Inheritance diagram for agxCollide::RenderMaterial:Public Types | |
| enum | TextureMode { DIFFUSE_TEXTURE =0 , NORMALMAP_TEXTURE = 1 , HEIGHTMAP_TEXTURE = 2 , SPECULARMAP_TEXTURE = 3 , NUM_TEXTURE_MODES =4 } |
Public Member Functions | |
| RenderMaterial () | |
| Constructor. More... | |
| RenderMaterial * | clone () const |
| Returns a cloned copy of the RenderMaterial. More... | |
| int | compare (const RenderMaterial &other) const |
| Slow string comparison function that uses the toString() method to convert each material to a string. More... | |
| bool | equal (const RenderMaterial &other) const |
| agx::Vec4f | getAmbientColor () const |
| const char * | getClassName () const override |
| agx::Vec4f | getDiffuseColor () const |
| agx::Vec4f | getEmissiveColor () const |
| agx::UInt32 | getHash () const |
| agx::String | getMaterialSpecification () const |
| agx::String | getName () const |
| float | getShininess () const |
| agx::Vec4f | getSpecularColor () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agx::String | getTexturePath (TextureMode mode=DIFFUSE_TEXTURE) const |
| float | getTransparency () const |
| bool | hasAmbientColor () const |
| bool | hasDiffuseColor () const |
| bool | hasEmissiveColor () const |
| bool | hasMaterialSpecification () const |
| bool | hasShininess () const |
| bool | hasSpecularColor () const |
| bool | hasTexturePath (TextureMode mode=DIFFUSE_TEXTURE) const |
| bool | hasTransparency () const |
| bool | operator== (const RenderMaterial &other) const |
| virtual void | restore (agxStream::InputArchive &in) override |
| void | setAmbientColor (const agx::Vec4f &color) |
| Set the ambient color. More... | |
| void | setDiffuseColor (const agx::Vec4f &color) |
| Set the diffuse color. More... | |
| void | setEmissiveColor (const agx::Vec4f &color) |
| Set the emissive color. More... | |
| void | setMaterialSpecification (const agx::String &material) |
| Store a string with a material specification, for example Keyshot material string. More... | |
| void | setName (const agx::String &name) |
| Set the name of this material. More... | |
| void | setShininess (float shininess) |
| Set the shininess of the material. More... | |
| void | setSpecularColor (const agx::Vec4f &color) |
| Set the specular color. More... | |
| void | setTexturePath (const agx::String &path, TextureMode mode=DIFFUSE_TEXTURE) |
| Set the path to a texture for the specified texturing mode (default DIFFUSE) More... | |
| void | setTransparency (float transparency) |
| Set the transparency of the material 1 - transparent, 0 - opaque. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. More... | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. More... | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
Public Member Functions inherited from agxStream::Serializable | |
| virtual | ~Serializable () |
| Destructor for normal C++ use but hidden from SWIG bindings. More... | |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| agx::Uuid | getUuid () const |
| bool | isFinished () const |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. More... | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
Static Public Member Functions | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static const char * | getConstructClassId () |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Static Public Member Functions inherited from agxStream::Serializable | |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
Protected Member Functions | |
| virtual | ~RenderMaterial () |
| agx::String | toString () const |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Protected Member Functions inherited from agxStream::Serializable | |
| Serializable () | |
| Default constructor. More... | |
| Serializable (const Serializable &other) | |
| Copy constructor. More... | |
| void | generateUuid () |
Protected Attributes | |
| agx::Vec4f | m_ambientColor |
| agx::Vec4f | m_diffuseColor |
| agx::Vec4f | m_emissiveColor |
| agx::String | m_materialSpecification |
| agx::String | m_name |
| float | m_shininess |
| agx::Vec4f | m_specularColor |
| agx::StringVector | m_texturePaths |
| float | m_transparency |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Additional Inherited Members | |
Static Protected Member Functions inherited from agx::Referenced | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Class for storing rendering material.
Definition at line 32 of file RenderMaterial.h.
| Enumerator | |
|---|---|
| DIFFUSE_TEXTURE | |
| NORMALMAP_TEXTURE | |
| HEIGHTMAP_TEXTURE | |
| SPECULARMAP_TEXTURE | |
| NUM_TEXTURE_MODES | |
Definition at line 36 of file RenderMaterial.h.
| agxCollide::RenderMaterial::RenderMaterial | ( | ) |
Constructor.
|
protectedvirtual |
| RenderMaterial* agxCollide::RenderMaterial::clone | ( | ) | const |
Returns a cloned copy of the RenderMaterial.
| int agxCollide::RenderMaterial::compare | ( | const RenderMaterial & | other | ) | const |
Slow string comparison function that uses the toString() method to convert each material to a string.
| other | - Material to compare to |
|
inlinestatic |
Definition at line 136 of file RenderMaterial.h.
|
inlinestatic |
Definition at line 136 of file RenderMaterial.h.
| bool agxCollide::RenderMaterial::equal | ( | const RenderMaterial & | other | ) | const |
| other | - Material to compare to |
| agx::Vec4f agxCollide::RenderMaterial::getAmbientColor | ( | ) | const |
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 136 of file RenderMaterial.h.
|
inlinestatic |
Definition at line 136 of file RenderMaterial.h.
| agx::Vec4f agxCollide::RenderMaterial::getDiffuseColor | ( | ) | const |
| agx::Vec4f agxCollide::RenderMaterial::getEmissiveColor | ( | ) | const |
| agx::UInt32 agxCollide::RenderMaterial::getHash | ( | ) | const |
| agx::String agxCollide::RenderMaterial::getMaterialSpecification | ( | ) | const |
| agx::String agxCollide::RenderMaterial::getName | ( | ) | const |
| float agxCollide::RenderMaterial::getShininess | ( | ) | const |
| agx::Vec4f agxCollide::RenderMaterial::getSpecularColor | ( | ) | const |
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 136 of file RenderMaterial.h.
| agx::String agxCollide::RenderMaterial::getTexturePath | ( | TextureMode | mode = DIFFUSE_TEXTURE | ) | const |
| float agxCollide::RenderMaterial::getTransparency | ( | ) | const |
| bool agxCollide::RenderMaterial::hasAmbientColor | ( | ) | const |
| bool agxCollide::RenderMaterial::hasDiffuseColor | ( | ) | const |
| bool agxCollide::RenderMaterial::hasEmissiveColor | ( | ) | const |
| bool agxCollide::RenderMaterial::hasMaterialSpecification | ( | ) | const |
| bool agxCollide::RenderMaterial::hasShininess | ( | ) | const |
| bool agxCollide::RenderMaterial::hasSpecularColor | ( | ) | const |
| bool agxCollide::RenderMaterial::hasTexturePath | ( | TextureMode | mode = DIFFUSE_TEXTURE | ) | const |
| bool agxCollide::RenderMaterial::hasTransparency | ( | ) | const |
| bool agxCollide::RenderMaterial::operator== | ( | const RenderMaterial & | other | ) | const |
|
overridevirtual |
| void agxCollide::RenderMaterial::setAmbientColor | ( | const agx::Vec4f & | color | ) |
Set the ambient color.
| void agxCollide::RenderMaterial::setDiffuseColor | ( | const agx::Vec4f & | color | ) |
Set the diffuse color.
| void agxCollide::RenderMaterial::setEmissiveColor | ( | const agx::Vec4f & | color | ) |
Set the emissive color.
| void agxCollide::RenderMaterial::setMaterialSpecification | ( | const agx::String & | material | ) |
Store a string with a material specification, for example Keyshot material string.
| void agxCollide::RenderMaterial::setName | ( | const agx::String & | name | ) |
Set the name of this material.
| void agxCollide::RenderMaterial::setShininess | ( | float | shininess | ) |
Set the shininess of the material.
| void agxCollide::RenderMaterial::setSpecularColor | ( | const agx::Vec4f & | color | ) |
Set the specular color.
| void agxCollide::RenderMaterial::setTexturePath | ( | const agx::String & | path, |
| TextureMode | mode = DIFFUSE_TEXTURE |
||
| ) |
Set the path to a texture for the specified texturing mode (default DIFFUSE)
| path | - path to the texture |
| mode | - texturing mode |
| void agxCollide::RenderMaterial::setTransparency | ( | float | transparency | ) |
Set the transparency of the material 1 - transparent, 0 - opaque.
|
overridevirtual |
|
protected |
|
protected |
Definition at line 179 of file RenderMaterial.h.
|
protected |
Definition at line 177 of file RenderMaterial.h.
|
protected |
Definition at line 180 of file RenderMaterial.h.
|
protected |
Definition at line 176 of file RenderMaterial.h.
|
protected |
Definition at line 183 of file RenderMaterial.h.
|
protected |
Definition at line 182 of file RenderMaterial.h.
|
protected |
Definition at line 178 of file RenderMaterial.h.
|
protected |
Definition at line 184 of file RenderMaterial.h.
|
protected |
Definition at line 181 of file RenderMaterial.h.