OGRE  1.7
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ogre::GeneralFixedFuncState Class Reference

#include <OgreFixedFuncState.h>

Public Member Functions

 GeneralFixedFuncState ()
 Default constructor. More...
 
 GeneralFixedFuncState ()
 Default constructor. More...
 
 ~GeneralFixedFuncState ()
 
 ~GeneralFixedFuncState ()
 
void addOnetoLightTypeCount (const Light::LightTypes type)
 
void addOnetoLightTypeCount (const Light::LightTypes type)
 
CompareFunction getAlphaRejectFunction (void) const
 Gets the alpha reject function. More...
 
CompareFunction getAlphaRejectFunction (void) const
 Gets the alpha reject function. More...
 
FogMode getFogMode (void) const
 Returns the fog mode for this pass. More...
 
FogMode getFogMode (void) const
 Returns the fog mode for this pass. More...
 
bool getLightingEnabled (void) const
 Returns whether or not dynamic lighting is enabled. More...
 
bool getLightingEnabled (void) const
 Returns whether or not dynamic lighting is enabled. More...
 
const uint8 getLightTypeCount (const Light::LightTypes type) const
 
const uint8 getLightTypeCount (const Light::LightTypes type) const
 
bool getNormaliseNormals (void) const
 Returns true if this pass has auto-normalisation of normals set. More...
 
bool getNormaliseNormals (void) const
 Returns true if this pass has auto-normalisation of normals set. More...
 
ShadeOptions getShadingMode (void) const
 Returns the type of light shading to be used. More...
 
ShadeOptions getShadingMode (void) const
 Returns the type of light shading to be used. More...
 
const uint8 getTotalNumberOfLights () const
 
const uint8 getTotalNumberOfLights () const
 
void resetLightTypeCounts ()
 
void resetLightTypeCounts ()
 
void setAlphaRejectFunction (CompareFunction func)
 Sets the alpha reject function. More...
 
void setAlphaRejectFunction (CompareFunction func)
 Sets the alpha reject function. More...
 
void setFogMode (FogMode mode)
 Sets the fogging mode applied to this pass. More...
 
void setFogMode (FogMode mode)
 Sets the fogging mode applied to this pass. More...
 
void setLightingEnabled (bool enabled)
 Sets whether or not dynamic lighting is enabled. More...
 
void setLightingEnabled (bool enabled)
 Sets whether or not dynamic lighting is enabled. More...
 
void setLightTypeCount (const Light::LightTypes type, const uint8 val)
 
void setLightTypeCount (const Light::LightTypes type, const uint8 val)
 
void setNormaliseNormals (bool normalise)
 If set to true, this forces normals to be normalised dynamically by the hardware for this pass. More...
 
void setNormaliseNormals (bool normalise)
 If set to true, this forces normals to be normalised dynamically by the hardware for this pass. More...
 
void setShadingMode (ShadeOptions mode)
 Sets the type of light shading required. More...
 
void setShadingMode (ShadeOptions mode)
 Sets the type of light shading required. More...
 

Protected Attributes

CompareFunction mAlphaRejectFunc
 
FogMode mFogMode
 
uint8 mLightFromTypeCount [LIGHT_TYPES_COUNT]
 
bool mLightingEnabled
 Lighting enabled? More...
 
bool mNormaliseNormals
 Normalisation. More...
 
ShadeOptions mShadeOptions
 Shading options. More...
 

Detailed Description

Definition at line 101 of file Direct3D10/include/OgreFixedFuncState.h.

Constructor & Destructor Documentation

Ogre::GeneralFixedFuncState::GeneralFixedFuncState ( )

Default constructor.

Ogre::GeneralFixedFuncState::~GeneralFixedFuncState ( )
Ogre::GeneralFixedFuncState::GeneralFixedFuncState ( )

Default constructor.

Ogre::GeneralFixedFuncState::~GeneralFixedFuncState ( )

Member Function Documentation

void Ogre::GeneralFixedFuncState::addOnetoLightTypeCount ( const Light::LightTypes  type)
void Ogre::GeneralFixedFuncState::addOnetoLightTypeCount ( const Light::LightTypes  type)
CompareFunction Ogre::GeneralFixedFuncState::getAlphaRejectFunction ( void  ) const

Gets the alpha reject function.

See setAlphaRejectSettings for more information.

CompareFunction Ogre::GeneralFixedFuncState::getAlphaRejectFunction ( void  ) const

Gets the alpha reject function.

See setAlphaRejectSettings for more information.

FogMode Ogre::GeneralFixedFuncState::getFogMode ( void  ) const

Returns the fog mode for this pass.

Note
Only valid if getFogOverride is true.
FogMode Ogre::GeneralFixedFuncState::getFogMode ( void  ) const

Returns the fog mode for this pass.

Note
Only valid if getFogOverride is true.
bool Ogre::GeneralFixedFuncState::getLightingEnabled ( void  ) const

Returns whether or not dynamic lighting is enabled.

bool Ogre::GeneralFixedFuncState::getLightingEnabled ( void  ) const

Returns whether or not dynamic lighting is enabled.

const uint8 Ogre::GeneralFixedFuncState::getLightTypeCount ( const Light::LightTypes  type) const
const uint8 Ogre::GeneralFixedFuncState::getLightTypeCount ( const Light::LightTypes  type) const
bool Ogre::GeneralFixedFuncState::getNormaliseNormals ( void  ) const

Returns true if this pass has auto-normalisation of normals set.

bool Ogre::GeneralFixedFuncState::getNormaliseNormals ( void  ) const

Returns true if this pass has auto-normalisation of normals set.

ShadeOptions Ogre::GeneralFixedFuncState::getShadingMode ( void  ) const

Returns the type of light shading to be used.

ShadeOptions Ogre::GeneralFixedFuncState::getShadingMode ( void  ) const

Returns the type of light shading to be used.

const uint8 Ogre::GeneralFixedFuncState::getTotalNumberOfLights ( ) const
const uint8 Ogre::GeneralFixedFuncState::getTotalNumberOfLights ( ) const
void Ogre::GeneralFixedFuncState::resetLightTypeCounts ( )
void Ogre::GeneralFixedFuncState::resetLightTypeCounts ( )
void Ogre::GeneralFixedFuncState::setAlphaRejectFunction ( CompareFunction  func)

Sets the alpha reject function.

See setAlphaRejectSettings for more information.

void Ogre::GeneralFixedFuncState::setAlphaRejectFunction ( CompareFunction  func)

Sets the alpha reject function.

See setAlphaRejectSettings for more information.

void Ogre::GeneralFixedFuncState::setFogMode ( FogMode  mode)

Sets the fogging mode applied to this pass.

Remarks
Fogging is an effect that is applied as polys are rendered. Sometimes, you want fog to be applied to an entire scene. Other times, you want it to be applied to a few polygons only. This pass-level specification of fog parameters lets you easily manage both.
The SceneManager class also has a setFog method which applies scene-level fog. This method lets you change the fog behaviour for this pass compared to the standard scene-level fog.
Parameters
overrideSceneIf true, you authorise this pass to override the scene's fog params with it's own settings. If you specify false, so other parameters are necessary, and this is the default behaviour for passes.
modeOnly applicable if overrideScene is true. You can disable fog which is turned on for the rest of the scene by specifying FOG_NONE. Otherwise, set a pass-specific fog mode as defined in the enum FogMode.
colourThe colour of the fog. Either set this to the same as your viewport background colour, or to blend in with a skydome or skybox.
expDensityThe density of the fog in FOG_EXP or FOG_EXP2 mode, as a value between 0 and 1. The default is 0.001.
linearStartDistance in world units at which linear fog starts to encroach. Only applicable if mode is FOG_LINEAR.
linearEndDistance in world units at which linear fog becomes completely opaque. Only applicable if mode is FOG_LINEAR.
void Ogre::GeneralFixedFuncState::setFogMode ( FogMode  mode)

Sets the fogging mode applied to this pass.

Remarks
Fogging is an effect that is applied as polys are rendered. Sometimes, you want fog to be applied to an entire scene. Other times, you want it to be applied to a few polygons only. This pass-level specification of fog parameters lets you easily manage both.
The SceneManager class also has a setFog method which applies scene-level fog. This method lets you change the fog behaviour for this pass compared to the standard scene-level fog.
Parameters
overrideSceneIf true, you authorise this pass to override the scene's fog params with it's own settings. If you specify false, so other parameters are necessary, and this is the default behaviour for passes.
modeOnly applicable if overrideScene is true. You can disable fog which is turned on for the rest of the scene by specifying FOG_NONE. Otherwise, set a pass-specific fog mode as defined in the enum FogMode.
colourThe colour of the fog. Either set this to the same as your viewport background colour, or to blend in with a skydome or skybox.
expDensityThe density of the fog in FOG_EXP or FOG_EXP2 mode, as a value between 0 and 1. The default is 0.001.
linearStartDistance in world units at which linear fog starts to encroach. Only applicable if mode is FOG_LINEAR.
linearEndDistance in world units at which linear fog becomes completely opaque. Only applicable if mode is FOG_LINEAR.
void Ogre::GeneralFixedFuncState::setLightingEnabled ( bool  enabled)

Sets whether or not dynamic lighting is enabled.

Parameters
enabledIf true, dynamic lighting is performed on geometry with normals supplied, geometry without normals will not be displayed.
If false, no lighting is applied and all geometry will be full brightness.
void Ogre::GeneralFixedFuncState::setLightingEnabled ( bool  enabled)

Sets whether or not dynamic lighting is enabled.

Parameters
enabledIf true, dynamic lighting is performed on geometry with normals supplied, geometry without normals will not be displayed.
If false, no lighting is applied and all geometry will be full brightness.
void Ogre::GeneralFixedFuncState::setLightTypeCount ( const Light::LightTypes  type,
const uint8  val 
)
void Ogre::GeneralFixedFuncState::setLightTypeCount ( const Light::LightTypes  type,
const uint8  val 
)
void Ogre::GeneralFixedFuncState::setNormaliseNormals ( bool  normalise)

If set to true, this forces normals to be normalised dynamically by the hardware for this pass.

Remarks
This option can be used to prevent lighting variations when scaling an object - normally because this scaling is hardware based, the normals get scaled too which causes lighting to become inconsistent. By default the SceneManager detects scaled objects and does this for you, but this has an overhead so you might want to turn that off through SceneManager::setNormaliseNormalsOnScale(false) and only do it per-Pass when you need to.
void Ogre::GeneralFixedFuncState::setNormaliseNormals ( bool  normalise)

If set to true, this forces normals to be normalised dynamically by the hardware for this pass.

Remarks
This option can be used to prevent lighting variations when scaling an object - normally because this scaling is hardware based, the normals get scaled too which causes lighting to become inconsistent. By default the SceneManager detects scaled objects and does this for you, but this has an overhead so you might want to turn that off through SceneManager::setNormaliseNormalsOnScale(false) and only do it per-Pass when you need to.
void Ogre::GeneralFixedFuncState::setShadingMode ( ShadeOptions  mode)

Sets the type of light shading required.

Note
The default shading method is Gouraud shading.
void Ogre::GeneralFixedFuncState::setShadingMode ( ShadeOptions  mode)

Sets the type of light shading required.

Note
The default shading method is Gouraud shading.

Member Data Documentation

CompareFunction Ogre::GeneralFixedFuncState::mAlphaRejectFunc
protected

Definition at line 108 of file Direct3D10/include/OgreFixedFuncState.h.

FogMode Ogre::GeneralFixedFuncState::mFogMode
protected

Definition at line 111 of file Direct3D10/include/OgreFixedFuncState.h.

uint8 Ogre::GeneralFixedFuncState::mLightFromTypeCount
protected

Definition at line 118 of file Direct3D10/include/OgreFixedFuncState.h.

bool Ogre::GeneralFixedFuncState::mLightingEnabled
protected

Lighting enabled?

Definition at line 114 of file Direct3D10/include/OgreFixedFuncState.h.

bool Ogre::GeneralFixedFuncState::mNormaliseNormals
protected

Normalisation.

Definition at line 105 of file Direct3D10/include/OgreFixedFuncState.h.

ShadeOptions Ogre::GeneralFixedFuncState::mShadeOptions
protected

Shading options.

Definition at line 120 of file Direct3D10/include/OgreFixedFuncState.h.


The documentation for this class was generated from the following file: