Public Methods |
| Material (const String &name, bool deferLoad=false) |
| Mandatory constructor - you must supply a name for the material. More...
|
| Material () |
| Default constructor - uses a generated material name. More...
|
Material & | operator= (const Material &rhs) |
| Assignment operator to allow easy copying between materials. More...
|
const String & | getName (void) const |
| Gets the material's name (note - not a texture name). More...
|
int | getHandle (void) const |
| Returns the numerical handle for this material, if a more compact refence is required. More...
|
void | setAmbient (Real red, Real green, Real blue) |
| Sets the ambient colour reflectance properties of this material. More...
|
void | setAmbient (const ColourValue &ambient) |
| Sets the ambient colour reflectance properties of this material. More...
|
void | setDiffuse (Real red, Real green, Real blue) |
| Sets the diffuse colour reflectance properties of this material. More...
|
void | setDiffuse (const ColourValue &diffuse) |
| Sets the diffuse colour reflectance properties of this material. More...
|
void | setSpecular (Real red, Real green, Real blue) |
| Sets the specular colour reflectance properties of this material. More...
|
void | setSpecular (const ColourValue &specular) |
| Sets the specular colour reflectance properties of this material. More...
|
void | setShininess (Real val) |
| Sets the shininess of the material, affecting the size of specular highlights. More...
|
void | setSelfIllumination (Real red, Real green, Real blue) |
| Sets the amount of self-illumination an object has. More...
|
void | setSelfIllumination (const ColourValue &selfIllum) |
| Sets the amount of self-illumination an object has. More...
|
const ColourValue & | getAmbient (void) const |
| Gets the ambient colour reflectance of the material. More...
|
const ColourValue & | getDiffuse (void) const |
| Gets the diffuse colour reflectance of the material. More...
|
const ColourValue & | getSpecular (void) const |
| Gets the specular colour reflectance of the material. More...
|
const ColourValue & | getSelfIllumination (void) const |
| Gets the self illumination colour of the material. More...
|
Real | getShininess (void) const |
| Gets the 'shininess' property of the material (affects specular highlights). More...
|
TextureLayer * | addTextureLayer (const String &textureName, int texCoordSet=0) |
| Inserts a new texture layer in the material using primitives. More...
|
TextureLayer * | getTextureLayer (int index) const |
| Retrieves a pointer to a texture layer so it may be modified. More...
|
void | removeTextureLayer () |
| Removes the topmost texture layer from the material. More...
|
void | removeAllTextureLayers (void) |
| Removes all texture layers. More...
|
int | getNumTextureLayers (void) const |
| Returns the number of texture layers. More...
|
void | setSceneBlending (const SceneBlendType sbt) |
| Sets the kind of blending this material has with the existing contents of the scene. More...
|
void | setSceneBlending (const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor) |
| Allows very fine control of blending this material with the existing contents of the scene. More...
|
SceneBlendFactor | getSourceBlendFactor () const |
| Retrieves the source blending factor for the material (as set using Materiall::setSceneBlending). More...
|
SceneBlendFactor | getDestBlendFactor () const |
| Retrieves the destination blending factor for the material (as set using Materiall::setSceneBlending). More...
|
bool | isTransparent (void) const |
| Determines if the material has any transparency with the rest of the scene (derived from scene blending op). More...
|
void | setDepthCheckEnabled (bool enabled) |
| Sets whether or not this material renders with depth-buffer checking on or not. More...
|
bool | getDepthCheckEnabled (void) const |
| Returns whether or not this material renders with depth-buffer checking on or not. More...
|
void | setDepthWriteEnabled (bool enabled) |
| Sets whether or not this material renders with depth-buffer writing on or not. More...
|
bool | getDepthWriteEnabled (void) const |
| Returns whether or not this material renders with depth-buffer writing on or not. More...
|
void | setDepthFunction (CompareFunction func) |
| Sets the function used to compare depth values when depth checking is on. More...
|
CompareFunction | getDepthFunction (void) const |
| Returns the function used to compare depth values when depth checking is on. More...
|
void | setCullingMode (CullingMode mode) |
| Sets the culling mode for this material based on the 'vertex winding'. More...
|
CullingMode | getCullingMode (void) const |
| Returns the culling mode for geometry rendered with this material. More...
|
void | setManualCullingMode (ManualCullingMode mode) |
| Sets the manual culling mode, performed by CPU rather than hardware. More...
|
ManualCullingMode | getManualCullingMode (void) const |
| Retrieves the manual culling mode for this material. More...
|
void | setLightingEnabled (bool enabled) |
| Sets whether or not dynamic lighting is enabled. More...
|
bool | getLightingEnabled (void) const |
| Returns whether or not dynamic lighting is enabled. More...
|
void | setShadingMode (ShadeOptions mode) |
| Sets the type of light shading required. More...
|
ShadeOptions | getShadingMode (void) const |
| Returns the type of light shading to be used. More...
|
void | setTextureFiltering (TextureFilterOptions mode) |
| Sets the type of texture filtering used when rendering. More...
|
TextureFilterOptions | getTextureFiltering (void) const |
| Returns the type of texture filtering used when rendering. More...
|
void | setFog (bool overrideScene, FogMode mode=FOG_NONE, const ColourValue &colour=ColourValue::White, Real expDensity=0.001, Real linearStart=0.0, Real linearEnd=1.0) |
| Sets the fogging mode applied to this material. More...
|
bool | getFogOverride (void) const |
| Returns true if this material is to override the scene fog settings. More...
|
FogMode | getFogMode (void) const |
| Returns the fog mode for this material. More...
|
const ColourValue & | getFogColour (void) const |
| Returns the fog colour for the scene. More...
|
Real | getFogStart (void) const |
| Returns the fog start distance for this material. More...
|
Real | getFogEnd (void) const |
| Returns the fog end distance for this material. More...
|
Real | getFogDensity (void) const |
| Returns the fog density for this material. More...
|
void | load (void) |
| Overridden from Resource. More...
|
void | unload (void) |
| Overridden from Resource. More...
|
bool | _compareSurfaceParams (const Material &cmp) const |
| Utility method for comparing material surface params. More...
|
Material * | clone (const String &newName) |
| Creates a new copy of this material with the same settings but a new name. More...
|
void | copyDetailsTo (Material *mat) |
| Copies the details of this material into another, preserving the target's handle and name (unlike operator=) but copying everything else. More...
|
void | setDepthBias (ushort bias) |
| Sets the depth bias to be used for this material. More...
|
ushort | getDepthBias (void) |
| Retrieves the depth bias value as set by setDepthValue. More...
|
virtual size_t | getSize (void) |
| Retrieves info about the size of the resource. More...
|
void | touch (void) |
| 'Touches' the resource to indicate it has been used. More...
|
time_t | getLastAccess (void) const |
| Gets the last time the resource was 'touched'. More...
|
bool | isLoaded (void) const |
| Returns true if the Resource has been loaded, false otherwise. More...
|
virtual void | destroy () |
| A method to make the resource delete itself. More...
|
Protected Methods |
void | applyDefaults (void) |
| Internal method which sets the material up from the default settings. More...
|
void | assignNextHandle (void) |
| Method for retrieving next handle (internal only). More...
|
Protected Attributes |
ColourValue | mAmbient |
ColourValue | mDiffuse |
ColourValue | mSpecular |
ColourValue | mEmissive |
Real | mShininess |
int | mHandle |
| Numerical handle (constant). More...
|
SceneBlendFactor | mSourceBlendFactor |
SceneBlendFactor | mDestBlendFactor |
bool | mDepthCheck |
bool | mDepthWrite |
CompareFunction | mDepthFunc |
ushort | mDepthBias |
CullingMode | mCullMode |
ManualCullingMode | mManualCullMode |
bool | mLightingEnabled |
| Lighting enabled? More...
|
ShadeOptions | mShadeOptions |
| Shading options. More...
|
TextureFilterOptions | mTextureFiltering |
| Texture filtering. More...
|
bool | mFogOverride |
FogMode | mFogMode |
ColourValue | mFogColour |
Real | mFogStart |
Real | mFogEnd |
Real | mFogDensity |
bool | mDeferLoad |
| If true, loading of textures and setting up controllers is deferred until the 'load' method is called. More...
|
int | mNumTextureLayers |
| Number of texture layers. More...
|
TextureLayer | mTextureLayers [OGRE_MAX_TEXTURE_LAYERS] |
String | mName |
bool | mIsLoaded |
time_t | mLastAccess |
size_t | mSize |
Static Protected Attributes |
Material * | mDefaultSettings = 0 |
| Default material settings - set up by SceneManager. More...
|
Friends |
class | SceneManager |
class | MaterialManager |