OMK::Vis::TransparencyBoolAnimator Class Reference
[Animators]

Animator to animate the transparency of an object. More...

#include <OMKTransparencyAnimator.h>

Inheritance diagram for OMK::Vis::TransparencyBoolAnimator:

Inheritance graph
[legend]
Collaboration diagram for OMK::Vis::TransparencyBoolAnimator:

Collaboration graph
[legend]
List of all members.

Protected Member Functions

virtual void update (NodeMaterial *node)
virtual Ogre::String getMaterialName (const Ogre::String &name) const

Protected Attributes

float _transparency
bool _state
NodeMaterialOrig_node
 pointer to the node to animate

Private Member Functions

 DECLARE_ANIMATOR_FACTORY (TransparencyBoolAnimator)
virtual void selfProcessVis (const OMK::Type::BoolType &value)
 Called by the partner to process the visualisation.

Detailed Description

Animator to animate the transparency of an object.

Author:
BenoƮt Chanclou, bunraku <bchanclo@irisa.fr>
The boolean value activates or not the transparency defined in the parameters.
Configuration parameters :
The configuration parameters are those of any animator and:
  Animator
  {
      myTransparencyAnimator
      {
        Class TransparencyBoolAnimator
        NodeName Robot
        Transparency 0.5 // default value
      }
  } 

Definition at line 95 of file OMKTransparencyAnimator.h.


Member Function Documentation

OMK::Vis::TransparencyBoolAnimator::DECLARE_ANIMATOR_FACTORY ( TransparencyBoolAnimator   )  [private]

virtual void OMK::Vis::TransparencyBoolAnimator::selfProcessVis ( const OMK::Type::BoolType value  )  [private, virtual]

Called by the partner to process the visualisation.

Called by the public version if the value was changed. Must be overwrite by sons.

void TransparencyBoolAnimator::update ( NodeMaterial node  )  [protected, virtual]

Implements OMK::Vis::IUpdateMaterial.

Definition at line 164 of file OMKTransparencyAnimator.cpp.

References _transparency, and OMK::Vis::NodeMaterial::doAction().

00165 {
00166   node->doAction( MaterialSetSceneBlending( Ogre::SBT_TRANSPARENT_ALPHA ) ) ;
00167   node->doAction( MaterialSetTransparency( _transparency ) ) ;
00168 }

Ogre::String TransparencyBoolAnimator::getMaterialName ( const Ogre::String &  name  )  const [protected, virtual]

Reimplemented from OMK::Vis::IUpdateMaterial.

Definition at line 173 of file OMKTransparencyAnimator.cpp.

References OMK::Vis::IUpdateMaterial::getUniqueMaterialName().

00174 { 
00175   return  getUniqueMaterialName( name + "_Transparency" ) ;
00176 }


Member Data Documentation

float OMK::Vis::TransparencyBoolAnimator::_transparency [protected]

Definition at line 108 of file OMKTransparencyAnimator.h.

Referenced by update().

bool OMK::Vis::TransparencyBoolAnimator::_state [protected]

Definition at line 109 of file OMKTransparencyAnimator.h.

NodeMaterialOrig* OMK::Vis::TransparencyBoolAnimator::_node [protected]

pointer to the node to animate

Reimplemented from OMK::Vis::OgreAnimatorCommon.

Definition at line 110 of file OMKTransparencyAnimator.h.


logo OpenMask

Documentation generated on Mon Jun 9 11:46:05 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007