#include <Material.h>
Inheritance diagram for nvsg::Material:
Public Methods | |
virtual NVSG_API const Material * | clone (void) const |
Get a clone of this material. More... | |
virtual NVSG_API bool | isDataShared (void) const |
Determine whether the data of this object is shared. More... | |
virtual NVSG_API DataID | getDataID (void) const |
Get the DataID of the data of this object. More... | |
NVSG_API const nvmath::Vec3f & | getAmbientColor (void) const |
Get the ambient color of this material. More... | |
NVSG_API const nvmath::Vec3f & | getDiffuseColor (void) const |
Get the diffuse color of this material. More... | |
NVSG_API const nvmath::Vec3f & | getEmissiveColor (void) const |
Get the emissive color of this material. More... | |
NVSG_API float | getOpacity (void) const |
Get the opacity of this material. More... | |
NVSG_API const nvmath::Vec3f & | getSpecularColor (void) const |
Get the specular color of this material. More... | |
NVSG_API float | getSpecularExponent (void) const |
Get the specular exponent of this material. More... | |
NVSG_API void | setAmbientColor (const nvmath::Vec3f &ac) |
Set the ambient color of this material. More... | |
NVSG_API void | setDiffuseColor (const nvmath::Vec3f &dc) |
Set the diffuse color of this material. More... | |
NVSG_API void | setEmissiveColor (const nvmath::Vec3f &ec) |
Set the emissive color of this material. More... | |
NVSG_API void | setOpacity (const float o) |
Set the opacity of this material. More... | |
NVSG_API void | setSpecularColor (const nvmath::Vec3f &sc) |
Set the specular color of this material. More... | |
NVSG_API void | setSpecularExponent (const float se) |
Get the specular exponent of this material. More... | |
virtual NVSG_API bool | containsTransparentMaterial (void) const |
Ask if this Material is transparent. More... | |
Static Public Methods | |
NVSG_API const Material * | create (void) |
Create a Material. More... | |
NVSG_API const Material * | createFromBase (const StateAttribute &rhs) |
Create a Material by copying from a StateAttribute. More... | |
Protected Methods | |
NVSG_API | Material (void) |
Constructor. More... | |
NVSG_API | Material (const StateAttribute &rhs) |
Partial Constructor. More... | |
NVSG_API | Material (const Material &rhs) |
Copy Constructor. More... | |
virtual NVSG_API | ~Material () |
Protected destructor to prevent explicit creation on stack. More... |
Default Values:
ambient color ( 0.3f, 0.3f, 0.3f )
diffuse color ( 0.9f, 0.9f, 0.9f )
emissive color ( 0.0f, 0.0f, 0.0f )
opacity ( 1.0f )
specular color ( 0.9f, 0.9f, 0.9f )
specular exponent ( 10.0f )
|
Constructor.
|
|
Partial Constructor.
|
|
Copy Constructor.
|
|
Protected destructor to prevent explicit creation on stack.
|
|
Create a Material.
|
|
Create a Material by copying from a StateAttribute.
|
|
Get a clone of this material.
Implements nvsg::StateAttribute. |
|
Determine whether the data of this object is shared.
Reimplemented from nvsg::StateAttribute. |
|
Get the DataID of the data of this object.
Reimplemented from nvsg::StateAttribute. |
|
Get the ambient color of this material. Ambient reflection, like ambient light, is nondirectional. Ambient reflection has a lesser impact on the apparent color of a rendered object, but it does affect the overall color and is most noticeable when little or no diffuse light reflects off the material. A material's ambient reflection is affected by the ambient light set for a scene. The default is (0.3,0.3,0.3).
|
|
Get the diffuse color of this material. The diffuse and ambient colors of a material describe how a material reflects the ambient and diffuse light in a scene. Because most scenes contain much more diffuse light than ambient light, diffuse reflection plays the largest role in determining color. Additionally, because diffuse light is directional, the angle of incidence for diffuse light affects the overall intensity of the reflection. Diffuse reflection is greatest when the light strikes a vertex parallel to the vertex normal. As the angle increases, the effect of diffuse reflection diminishes. The amount of light reflected is the cosine of the angle between the incoming light and the vertex normal. The default is (0.9,0.9,0.9).
|
|
Get the emissive color of this material. Materials can be used to make a rendered object appear to be self-luminous. The emissive color of a material is used to describe the color of the emitted light. Emission affects an object's color and can, for example, make a dark material brighter and take on part of the emitted color. You can use a material's emissive color to add the illusion that an object is emitting light, without incurring the computational overhead of adding a light to the scene. Remember, materials with emissive color don't emit light that can be reflected by other objects in a scene. To achieve this reflected light, you need to place an additional light within the scene. The default is (0.0,0.0,0.0).
|
|
Get the opacity of this material. The opacity of a material controls how much light is reflected and how much light goes through. An opacity of 1.0 means the material is completely opaque - all light is reflected and no objects behind shine through. An opacity of 0.0 means the material is completely transparent - no light is reflected and objects behind are seen undisturbed. The default is 1.0.
|
|
Get the specular color of this material. Specular reflection creates highlights on objects, making them appear shiny. The material contains two members that describe the specular highlight color as well as the material's overall shininess. You establish the color of the specular highlights by setting the specular color to the desired RGBA color — the most common colors are white or light gray. The values you set in the specular exponent control how sharp the specular effects are. The default of the specular color is (0.9,0.9,0.9).
|
|
Get the specular exponent of this material. Specular reflection creates highlights on objects, making them appear shiny. The material contains two members that describe the specular highlight color as well as the material's overall shininess. You establish the color of the specular highlights by setting the specular color to the desired RGBA color — the most common colors are white or light gray. The values you set in the specular exponent control how sharp the specular effects are. The default of the specular exponent is 10.0.
|
|
Set the ambient color of this material. Ambient reflection, like ambient light, is nondirectional. Ambient reflection has a lesser impact on the apparent color of a rendered object, but it does affect the overall color and is most noticeable when little or no diffuse light reflects off the material. A material's ambient reflection is affected by the ambient light set for a scene. The default is (0.3,0.3,0.3). |
|
Set the diffuse color of this material. The diffuse and ambient colors of a material describe how a material reflects the ambient and diffuse light in a scene. Because most scenes contain much more diffuse light than ambient light, diffuse reflection plays the largest part in determining color. Additionally, because diffuse light is directional, the angle of incidence for diffuse light affects the overall intensity of the reflection. Diffuse reflection is greatest when the light strikes a vertex parallel to the vertex normal. As the angle increases, the effect of diffuse reflection diminishes. The amount of light reflected is the cosine of the angle between the incoming light and the vertex normal. The default is (0.9,0.9,0.9). |
|
Set the emissive color of this material. Materials can be used to make a rendered object appear to be self-luminous. The emissive color of a material is used to describe the color of the emitted light. Emission affects an object's color and can, for example, make a dark material brighter and take on part of the emitted color. You can use a material's emissive color to add the illusion that an object is emitting light, without incurring the computational overhead of adding a light to the scene. Remember, materials with emissive color don't emit light that can be reflected by other objects in a scene. To achieve this reflected light, you need to place an additional light within the scene. The default is (0.0,0.0,0.0). |
|
Set the opacity of this material. The opacity of a material controls how much light is reflected and how much light goes through. An opacity of 1.0 means the material is completely opaque - all light is reflected and no objects behind shine through. An opacity of 0.0 means the material is completely transparent - no light is reflected and objects behind are seen undisturbed. The default is 1.0.
|
|
Set the specular color of this material. Specular reflection creates highlights on objects, making them appear shiny. The material contains two members that describe the specular highlight color as well as the material's overall shininess. You establish the color of the specular highlights by setting the specular color to the desired RGBA color — the most common colors are white or light gray. The values you set in the specular exponent control how sharp the specular effects are. The default of the specular color is (0.9,0.9,0.9).
|
|
Get the specular exponent of this material. Specular reflection creates highlights on objects, making them appear shiny. The material contains two members that describe the specular highlight color as well as the material's overall shininess. You establish the color of the specular highlights by setting the specular color to the desired RGBA color — the most common colors are white or light gray. The values you set in the specular exponent control how sharp the specular effects are. The default of the specular exponent is 10.0.
|
|
Ask if this Material is transparent.
Reimplemented from nvsg::StateAttribute. |