OMK::Vis::IMaterialAction Class Reference

#include <OMKMaterial.h>

Inheritance diagram for OMK::Vis::IMaterialAction:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~IMaterialAction ()
 Destructor.
virtual bool nodeAction (NodeMaterial *node) const
 Method called by doAction for the current node.
virtual bool entityAction (EntityMaterial *entity) const
 Method called by doAction for the current entity.
virtual void subEntityAction (SubEntityMaterial *subEntity) const
 Method called by doAction for the current sub-entity.

Protected Member Functions

 IMaterialAction ()
 Constructor.

Static Protected Member Functions

static Ogre::Pass * getFirstPassOfFirstTechnique (SubEntityMaterial *subEntity)
 Get first pass of the subentity.

Detailed Description

Definition at line 45 of file OMKMaterial.h.


Constructor & Destructor Documentation

OMK::Vis::IMaterialAction::IMaterialAction (  )  [inline, protected]

Constructor.

It is protected because only sons can use it.

Definition at line 50 of file OMKMaterial.h.

00050 {}

virtual OMK::Vis::IMaterialAction::~IMaterialAction (  )  [inline, virtual]

Destructor.

Definition at line 53 of file OMKMaterial.h.

00053 {}


Member Function Documentation

virtual bool OMK::Vis::IMaterialAction::nodeAction ( NodeMaterial node  )  const [inline, virtual]

Method called by doAction for the current node.

Returns:
true if the action must execute the loop for the entities
The default does nothing. Can call a method of the node.

Definition at line 59 of file OMKMaterial.h.

Referenced by OMK::Vis::NodeMaterialOrig::doAction(), and OMK::Vis::NodeMaterial::doAction().

00059 { return true ; }

virtual bool OMK::Vis::IMaterialAction::entityAction ( EntityMaterial entity  )  const [inline, virtual]

Method called by doAction for the current entity.

Returns:
true if the action must execute the loop for the sub-entities
The default does nothing. Can call a method of the entity.

Reimplemented in OMK::Vis::MaterialSetTransparency, OMK::Vis::MaterialAddPickUDO, and OMK::Vis::MaterialRemovePickUDO.

Definition at line 65 of file OMKMaterial.h.

Referenced by OMK::Vis::EntityMaterial::doAction().

00065 { return true ; }

virtual void OMK::Vis::IMaterialAction::subEntityAction ( SubEntityMaterial subEntity  )  const [inline, virtual]

Method called by doAction for the current sub-entity.

The default does nothing. Most of the time calls a method of the sub-entity.

Reimplemented in OMK::Vis::IMaterialPassAction, OMK::Vis::MaterialSetMaterialName, OMK::Vis::IsProgrammable, and OMK::Vis::MaterialSetShader.

Definition at line 69 of file OMKMaterial.h.

Referenced by OMK::Vis::SubEntityMaterial::doAction().

00069 {}

Ogre::Pass * IMaterialAction::getFirstPassOfFirstTechnique ( SubEntityMaterial subEntity  )  [static, protected]

Get first pass of the subentity.

Definition at line 413 of file OMKMaterial.cpp.

References OMK::Vis::SubEntityMaterial::getMaterial(), and OMASSERTM.

Referenced by OMK::Vis::MaterialSetShader::subEntityAction(), and OMK::Vis::IsProgrammable::subEntityAction().

00414 {  
00415   OMASSERTM( 0 < subEntity->getMaterial()->getNumTechniques(), "Don't get Any Tecnnique on Material" << subEntity->getMaterial()->getName() );
00416   Ogre::Technique * technique = subEntity->getMaterial()->getTechnique( 0 );
00417   OMASSERTM( 0 < technique->getNumPasses(), "Don't get Any PASS on Material " << subEntity->getMaterial()->getName() );
00418   return technique->getPass( 0 ) ;
00419 }


logo OpenMask

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

Generated with doxygen by Dimitri van Heesch ,   1997-2007