#include <OMKEntityMaterialAction.h>
Inheritance diagram for OMK::Vis::MaterialSetTransparency:
Public Member Functions | |
MaterialSetTransparency (Ogre::Real transparency) | |
The contructor stores the argument. | |
virtual | ~MaterialSetTransparency () |
Destructor. | |
Protected Attributes | |
Ogre::Real | _transparency |
The argument. | |
Private Member Functions | |
virtual bool | entityAction (EntityMaterial *entity) const |
The action update the entity. | |
virtual void | passAction (SubEntityMaterial *subEntity, Ogre::Pass *passDest, Ogre::Pass *passSrc) const |
The action for each pass of each technique. |
transparency | The new transparency. Values will be clamped to [0.0f..1.0f]. |
If transparency equals 0, it will use the original material instead of the copy (the copy is mandatory transparent, and thus might be slower than the original).
Definition at line 73 of file OMKEntityMaterialAction.h.
MaterialSetTransparency::MaterialSetTransparency | ( | Ogre::Real | transparency | ) |
The contructor stores the argument.
Definition at line 46 of file OMKEntityMaterialAction.cpp.
00047 : IMaterialPassAction(), 00048 _transparency( transparency < 0.0f ? 0.0 : ( 1.0f < transparency ? 1.0f : transparency ) ) 00049 { 00050 }
virtual OMK::Vis::MaterialSetTransparency::~MaterialSetTransparency | ( | ) | [inline, virtual] |
bool MaterialSetTransparency::entityAction | ( | EntityMaterial * | entity | ) | const [private, virtual] |
The action update the entity.
Reimplemented from OMK::Vis::IMaterialAction.
Definition at line 52 of file OMKEntityMaterialAction.cpp.
References _transparency, and OMK::Vis::EntityMaterial::getOgreEntity().
00053 { 00054 entity->getOgreEntity()->setVisible( 1.0f != _transparency ) ; 00055 return true ; 00056 }
virtual void OMK::Vis::MaterialSetTransparency::passAction | ( | SubEntityMaterial * | subEntity, | |
Ogre::Pass * | passDest, | |||
Ogre::Pass * | passSrc | |||
) | const [private, virtual] |
Ogre::Real OMK::Vis::MaterialSetTransparency::_transparency [protected] |
The argument.
It is given to the function.
Definition at line 83 of file OMKEntityMaterialAction.h.
Referenced by entityAction().
Documentation generated on Mon Jun 9 11:46:05 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |