Go to the documentation of this file.
304 void compile(
bool autoManageTextureUnits =
true);
522 Real expDensity = 0.001,
Real linearStart = 0.0,
Real linearEnd = 1.0 );
651 if (mCompilationRequired)
675 return mCompilationRequired;
unsigned long long int ResourceHandle
vector< Technique * >::type Techniques
void setSelfIllumination(const ColourValue &selfIllum)
Sets the amount of self-illumination of every Pass in every Technique.
Technique * getTechnique(unsigned short index)
Gets the indexed technique.
ConstVectorIterator< LodValueList > LodValueIterator
void setSpecular(const ColourValue &specular)
Sets the specular colour reflectance properties of every Pass in every Technique.
const LodStrategy * getLodStrategy() const
Get LOD strategy used by this material.
unsigned short getNumSupportedTechniques(void) const
Retrieves the number of supported techniques.
VectorIterator< Techniques > TechniqueIterator
void applyDefaults(void)
Internal method which sets the material up from the default settings.
Techniques mSupportedTechniques
Supported techniques of any sort.
map< unsigned short, Technique * >::type LodTechniques
TechniqueIterator getSupportedTechniqueIterator(void)
Gets an iterator over all the Techniques which are supported by the current card.
bool mCompilationRequired
Does this material require compilation?
ushort getLodIndex(Real value) const
Gets the LOD index to use at the given value.
void compile(bool autoManageTextureUnits=true)
'Compiles' this Material.
String mUnsupportedReasons
Text description of why any techniques are not supported.
void copyDetailsTo(MaterialPtr &mat) const
Copies the details of this material into another, preserving the target's handle and name (unlike ope...
size_t calculateSize(void) const
Calculate the size of a resource; this will only be called after 'load'.
void loadImpl(void)
Overridden from Resource.
Concrete IteratorWrapper for nonconst access to the underlying container.
virtual void touch(void)
'Touches' the resource to indicate it has been used.
Class for managing Material settings for Ogre.
void removeTechnique(unsigned short index)
Removes the technique at the given index.
Class encapsulates rendering properties of an object.
void setSceneBlending(const SceneBlendType sbt)
Sets the kind of blending every pass has with the existing contents of the scene.
void setLodLevels(const LodValueList &lodValues)
Sets the distance at which level-of-detail (LOD) levels come into effect.
void setDiffuse(Real red, Real green, Real blue, Real alpha)
Sets the diffuse colour reflectance properties of every Pass in every Technique.
void setDepthCheckEnabled(bool enabled)
Sets whether or not each Pass renders with depth-buffer checking on or not.
void setTextureFiltering(TextureFilterOptions filterType)
Set texture filtering for every texture unit in every Technique and Pass.
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
const String & getUnsupportedTechniquesExplanation() const
Gets a string explaining why any techniques are not supported.
bool getTransparencyCastsShadows(void) const
Returns whether or not objects using this material be classified as opaque to the shadow caster syste...
Class representing an approach to rendering this particular Material.
Technique * getSupportedTechnique(unsigned short index)
Gets the indexed supported technique.
void setSelfIllumination(Real red, Real green, Real blue)
Sets the amount of self-illumination of every Pass in every Technique.
void clearBestTechniqueList(void)
Clear the best technique list.
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
void setDiffuse(const ColourValue &diffuse)
Sets the diffuse colour reflectance properties of every Pass in every Technique.
void setCullingMode(CullingMode mode)
Sets the culling mode for each pass based on the 'vertex winding'.
LodValueIterator getUserLodValueIterator(void) const
Gets an iterator over the user-defined list of values which are internally transfomed by the LodStrat...
void setLightingEnabled(bool enabled)
Sets whether or not dynamic lighting is enabled for every Pass.
void setSceneBlending(const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor)
Allows very fine control of blending every Pass with the existing contents of the scene.
Strategy for determining level of detail.
Technique * getTechnique(const String &name)
searches for the named technique.
void setTransparencyCastsShadows(bool enabled)
Sets whether objects using this material be classified as opaque to the shadow caster system.
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
LodValueList mUserLodValues
LodValueIterator getLodValueIterator(void) const
Gets an iterator over the list of values transformed by the LodStrategy at which each LOD comes into ...
void setShininess(Real val)
Sets the shininess properties of every Pass in every Technique.
SceneBlendFactor
Blending factors for manually blending objects with the scene.
void unloadImpl(void)
Unloads the material, frees resources etc.
Manages the organisation and rendering of a 'scene' i.e.
map< unsigned short, LodTechniques * >::type BestTechniquesBySchemeList
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 each pass.
const LodStrategy * mLodStrategy
vector< Real >::type LodValueList
distance list used to specify LOD
void setSeparateSceneBlending(const SceneBlendType sbt, const SceneBlendType sbta)
Sets the kind of blending every pass has with the existing contents of the scene, using individual fa...
void setDepthBias(float constantBias, float slopeScaleBias)
Sets the depth bias to be used for each Pass.
bool applyTextureAliases(const AliasTextureNamePairList &aliasList, const bool apply=true) const
Applies texture names to Texture Unit State with matching texture name aliases.
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
void _notifyNeedsRecompile(void)
Tells the material that it needs recompilation.
void prepareImpl(void)
Overridden from Resource.
void setPointSize(Real ps)
Sets the point size properties for every Pass in every Technique.
void setShadingMode(ShadeOptions mode)
Sets the type of light shading required.
CullingMode
Hardware culling modes based on vertex winding.
void setSpecular(Real red, Real green, Real blue, Real alpha)
Sets the specular colour reflectance properties of every Pass in every Technique.
Defines a generic resource handler.
void setManualCullingMode(ManualCullingMode mode)
Sets the manual culling mode, performed by CPU rather than hardware.
MaterialPtr clone(const String &newName, bool changeGroup=false, const String &newGroup=StringUtil::BLANK) const
Creates a new copy of this material with the same settings but a new name.
unsigned short getNumLodLevels(const String &schemeName) const
Gets the number of levels-of-detail this material has in the given scheme, based on Technique::setLod...
void setColourWriteEnabled(bool enabled)
Sets whether or not colour buffer writing is enabled for each Pass.
static const ColourValue White
unsigned short getNumTechniques(void) const
Retrieves the number of techniques.
void setAmbient(Real red, Real green, Real blue)
Sets the ambient colour reflectance properties for every Pass in every Technique.
void unprepareImpl(void)
Overridden from Resource.
TechniqueIterator getTechniqueIterator(void)
Get an iterator over the Techniques in this Material.
bool mTransparencyCastsShadows
void setReceiveShadows(bool enabled)
Sets whether objects using this material will receive shadows.
Abstract class representing a loadable resource (e.g.
void setTextureAnisotropy(int maxAniso)
Sets the anisotropy level to be used for all textures.
void removeAllTechniques(void)
Removes all the techniques in this Material.
Techniques mTechniques
All techniques, supported and unsupported.
std::map< K, V, P, A > type
Class representing colour.
void setSeparateSceneBlending(const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor, const SceneBlendFactor sourceFactorAlpha, const SceneBlendFactor destFactorAlpha)
Allows very fine control of blending every Pass with the existing contents of the scene,...
Abstract class defining the interface all renderable objects must implement.
void setDepthWriteEnabled(bool enabled)
Sets whether or not each Pass renders with depth-buffer writing on or not.
ShadeOptions
Light shading modes.
Material & operator=(const Material &rhs)
Assignment operator to allow easy copying between materials.
Technique * createTechnique(void)
Creates a new Technique for this Material.
void touch(void)
'Touches' the resource to indicate it has been used.
ManualCullingMode
Manual culling modes based on vertex normals.
Technique * getBestTechnique(unsigned short lodIndex=0, const Renderable *rend=0)
Gets the best supported technique.
float Real
Software floating point type.
bool getReceiveShadows(void) const
Returns whether or not objects using this material will receive shadows.
bool getCompilationRequired() const
Gets the compilation status of the material.
void insertSupportedTechnique(Technique *t)
Insert a supported technique into the local collections.
Material(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual=false, ManualResourceLoader *loader=0)
Constructor - use resource manager's create method rather than this.
BestTechniquesBySchemeList mBestTechniquesBySchemeList
Map of scheme -> list of LOD techniques.
void setDepthFunction(CompareFunction func)
Sets the function used to compare depth values when depth checking is on.
Interface describing a manual resource loader.
unsigned short getNumLodLevels(unsigned short schemeIndex) const
Gets the number of levels-of-detail this material has in the given scheme, based on Technique::setLod...
void setAmbient(const ColourValue &ambient)
Sets the ambient colour reflectance properties for every Pass in every Technique.
Concrete IteratorWrapper for const access to the underlying container.
bool isTransparent(void) const
Determines if the material has any transparency with the rest of the scene (derived from whether any ...
SceneBlendType
Types of blending that you can specify between an object and the existing contents of the scene.
void setLodStrategy(LodStrategy *lodStrategy)
Set the LOD strategy used by this material.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.