OMK::Vis Namespace Reference


Classes

class  Animator
 Animator which updates the visual object thanks to the informations found by its plug. More...
class  AnimatorCreator
 Ancestor of animator creator class used by the PrototypeFactory. More...
class  AnimatorCreatorT
 Animator creator class to be parametrised by the descendants of Animator This class creates the new animator. More...
class  AnimatorEventPlug
class  AnimatorEventPlugT
 The plug to retrieve information the handler needs. More...
class  AnimatorInputPlugT
 The plug to retrieve information the handler needs. More...
class  AnimatorPlug
 The plug to retrieve information the animators needs. More...
class  AnimatorPlugT
 A typed plug offering the interface to retrieve information the animator needs. More...
class  AnimatorT
 Animator which computes the visualisation with the associated value found by the plug. More...
class  IAnimatorEventPlug
 The event plug interface to set an animator by event. More...
class  IMaterialAction
class  IUpdateMaterial
class  NodeMaterial
class  EntityMaterial
class  SubEntityMaterial
class  NodeMaterialOrig
class  EntityMaterialOrig
class  SubEntityMaterialOrig
class  NodeMaterialCopy
class  EntityMaterialCopy
class  SubEntityMaterialCopy
class  OgreAnimatorCommon
 Ancestor class for the Ogre animators. More...
class  OgreAnimator
class  OgreAnimatorT
 Ancestor class for the Ogre animators. More...
class  OgreObject
 OgreObject creates a new scene node named with the id of this VisualObject and adds it into the subtree of root _sceneNode. More...
class  OgreObjectScene
 OgreObjectScene loads a dotScene file into the subtree of root _sceneNode. More...
class  OgreVis
 Specialization of VisBase for the Ogre3D library. More...
class  TransformAnimator
 Handler which computes the visualisation with the associated information found by the plug. More...
class  VisBase
 Visualization. More...
class  VisObjectExtension
 Input listener to control the bounding boxes around objects. More...
class  VisServiceExtension
 Visu Message Service. More...
class  VisualObject
 Visual object used by the visualisation to visualise the simulated objects. More...
class  VisualObjectCreator
 ancestor of the VisualObject creator class used by the PrototypeFactory More...
class  VisualObjectCreatorT
 VisualObject creator class to be parametrized by the descendants of VisualObject. More...
class  AwarenessAnimator
 Awareness animator to change the highlight color of a object. More...
class  AwarenessColorAnimator
 Awareness animator to change the highlight color of a object. More...
class  IMaterialPassAction
 A class which calls the action for each pass of each technique. More...
class  MaterialSetMaterialName
  More...
class  MaterialSetSceneBlending
 Action to set the scene blending. More...
class  MaterialSetTransparency
 Action to change this instance transparency. More...
class  MaterialSetAwareness
 Action to set the awareness color. More...
class  IsProgrammable
 Action to know if is programmable. More...
class  MaterialSetShader
 Action to set shader. More...
class  MaterialAddPickUDO
 Action to add PickUDO to the entity to improve picking from user. More...
class  MaterialRemovePickUDO
 Action to remove PickUDO of the entity. More...
class  HumanoAnimator
 Handler which computes the visualisation with the associated information found by the plug. More...
class  MaterialAnimator
 Animator to change the material. More...
class  PickUDO
 UserDefinedObject to specify witch entity need to be picked and in wich we have to find the vertex picked. More...
class  SwitchAnimator
 Handler which computes the visualisation with the associated information found by the plug. More...
class  TransparencyAnimAnimator
 Animator to animate the transparency of an object. More...
class  TransparencyBoolAnimator
 Animator to animate the transparency of an object. More...
class  TransparencyValueAnimator
 Animator to animate the transparency of an object. More...
class  CameraBaseExtension
 This extension adds an attribute containing camera's Transform. More...
class  AvatarVisualObject
 This visual object defines an humano avatar. More...

Typedefs

typedef OBT::Singleton< OBT::PrototypeFactory<
OMK::Name, Vis::AnimatorCreator > > 
AnimatorFactory
typedef std::map< std::string,
EntityMaterial * > 
EntityMaterialMap
typedef Ogre::MapIterator<
EntityMaterialMap
EntityMaterialIterator
typedef std::stack< IUpdateMaterial * > UpdateMaterialStack
typedef std::vector< SubEntityMaterial * > SubEntityMaterialVector
typedef Ogre::VectorIterator<
SubEntityMaterialVector
SubEntityMaterialIterator
typedef std::vector< NodeMaterialOrig * > NodeMaterialOrigVector
typedef OBT::Singleton< OBT::PrototypeFactory<
OMK::Name, VisualObjectCreator > > 
VisualObjectFactory

Functions

std::string debugMsg (const Vis::Animator *anim)
 Message formatting for animator.
Ogre::Node * getOgreNode (const Ogre::Node &rootNode, const std::string &nodeName)
 Function retrieving a named node in a subtree of root rootNode.
Ogre::Node * getChildWithDelimiterOMK (const Ogre::Node &node, const std::string &name)
 Function with handle delimterOMK on DotScene.
std::string getNameWithoutDelimiterOMK (const std::string &name)
 Function with handle delimterOMK on DotScene.
std::string debugMsg (const Vis::VisualObject *visObj)
 Message formatting for visual object.
Conversion functions
These functions allow the user to convert the objects from Wm4 library to Ogre library and reciprocally.

See The types use by the visualisation of OpenMASK.

Wm4::Quaternionf convert (const Ogre::Quaternion &q)
 Convert quaternions.
Ogre::Quaternion convert (const Wm4::Quaternionf &q)
Wm4::Vector3f convert (const Ogre::Vector3 &v)
 Convert vector of 3.
Ogre::Vector3 convert (const Wm4::Vector3f &v)
Wm4::Matrix3f convert (const Ogre::Matrix3 &m)
 Convert matrix of 3 by 3.
Ogre::Matrix3 convert (const Wm4::Matrix3f &m)
Wm4::Matrix4f convert (const Ogre::Matrix4 &m)
 Convert matrix of 4 by 4.
Ogre::Matrix4 convert (const Wm4::Matrix4f &m)
Wm4::Plane3f convert (const Ogre::Plane &p)
 Convert plane 3D Be carreful, the constant with Ogre is negative and positive for Wm4.
Ogre::Plane convert (const Wm4::Plane3f &p)
void convert (const Type::Transform &transform, Ogre::Node &node)
 Convert a transform to an Ogre node.
void convert (const Ogre::Node &node, Type::Transform &transform)


Typedef Documentation

typedef OBT::Singleton< OBT::PrototypeFactory< OMK::Name, Vis::AnimatorCreator > > OMK::Vis::AnimatorFactory

Definition at line 247 of file OMKAnimator.h.

typedef Ogre::MapIterator< EntityMaterialMap > OMK::Vis::EntityMaterialIterator

Definition at line 91 of file OMKMaterial.h.

typedef std::map< std::string, EntityMaterial* > OMK::Vis::EntityMaterialMap

Definition at line 90 of file OMKMaterial.h.

typedef std::vector< NodeMaterialOrig* > OMK::Vis::NodeMaterialOrigVector

Definition at line 158 of file OMKMaterial.h.

typedef Ogre::VectorIterator< SubEntityMaterialVector > OMK::Vis::SubEntityMaterialIterator

Definition at line 119 of file OMKMaterial.h.

typedef std::vector< SubEntityMaterial* > OMK::Vis::SubEntityMaterialVector

Definition at line 118 of file OMKMaterial.h.

typedef std::stack< IUpdateMaterial* > OMK::Vis::UpdateMaterialStack

Definition at line 92 of file OMKMaterial.h.

typedef OBT::Singleton< OBT::PrototypeFactory< OMK::Name, VisualObjectCreator > > OMK::Vis::VisualObjectFactory

Definition at line 243 of file OMKVisualObject.h.


Function Documentation

void OMK::Vis::convert ( const Ogre::Node &  node,
Type::Transform &  transform 
) [inline]

Definition at line 121 of file OMKConversion.h.

References convert(), OMK::Type::Transform::setRotate(), OMK::Type::Transform::setScale(), and OMK::Type::Transform::setTranslate().

Referenced by OMK::MKMHumano::computeParameters(), and OMK::StaticHumano::getInitialiseSequence().

00122 {
00123         transform.setTranslate( convert( node.getPosition() ) ) ;
00124         Wm4::Quaternionf quaternion( convert( node.getOrientation() ) ) ;
00125         Wm4::Matrix3f matrix ;
00126         quaternion.ToRotationMatrix( matrix ) ;
00127         transform.setRotate( matrix ) ;
00128         transform.setScale( convert( node.getScale() ) ) ;
00129 }

void OMK::Vis::convert ( const Type::Transform &  transform,
Ogre::Node &  node 
) [inline]

Convert a transform to an Ogre node.

Definition at line 111 of file OMKConversion.h.

References OMK::Type::Transform::getQuaternionRotate(), OMK::Type::Transform::getScale(), and OMK::Type::Transform::getTranslate().

00112 {        
00113         const Wm4::Vector3f& translate( transform.getTranslate() ) ;
00114         node.setPosition( translate.X(), translate.Y(), translate.Z() ) ;
00115         const Wm4::Quaternionf& quaternion( transform.getQuaternionRotate() ) ; ;
00116         node.setOrientation( quaternion.W(), quaternion.X(), quaternion.Y(), quaternion.Z() ) ;
00117         const Wm4::Vector3f& scale( transform.getScale() ) ;
00118         node.setScale( scale.X(), scale.Y(), scale.Z() ) ;
00119 }

Ogre::Plane OMK::Vis::convert ( const Wm4::Plane3f &  p  )  [inline]

Definition at line 103 of file OMKConversion.h.

References convert().

00104 {
00105   return Ogre::Plane( convert( p.Normal ), p.Constant ) ;
00106 }

Wm4::Plane3f OMK::Vis::convert ( const Ogre::Plane &  p  )  [inline]

Convert plane 3D Be carreful, the constant with Ogre is negative and positive for Wm4.

Definition at line 99 of file OMKConversion.h.

References convert().

00100 {
00101   return Wm4::Plane3f( convert( p.normal ), -p.d ) ;
00102 }

Ogre::Matrix4 OMK::Vis::convert ( const Wm4::Matrix4f &  m  )  [inline]

Definition at line 88 of file OMKConversion.h.

00089 {
00090   return Ogre::Matrix4( m[0][0], m[0][1], m[0][2], m[0][3],
00091                         m[1][0], m[1][1], m[1][2], m[1][3],
00092                         m[2][0], m[2][1], m[2][2], m[2][3],
00093                         m[3][0], m[3][1], m[3][2], m[3][3] ) ;
00094 }

Wm4::Matrix4f OMK::Vis::convert ( const Ogre::Matrix4 &  m  )  [inline]

Convert matrix of 4 by 4.

Definition at line 81 of file OMKConversion.h.

00082 {
00083   return Wm4::Matrix4f( m[0][0], m[0][1], m[0][2], m[0][3],
00084                         m[1][0], m[1][1], m[1][2], m[1][3],
00085                         m[2][0], m[2][1], m[2][2], m[2][3],
00086                         m[3][0], m[3][1], m[3][2], m[3][3] ) ;
00087 }

Ogre::Matrix3 OMK::Vis::convert ( const Wm4::Matrix3f &  m  )  [inline]

Definition at line 72 of file OMKConversion.h.

00073 {
00074   return Ogre::Matrix3( m[0][0], m[0][1], m[0][2],
00075                         m[1][0], m[1][1], m[1][2],
00076                         m[2][0], m[2][1], m[2][2] ) ;
00077 }

Wm4::Matrix3f OMK::Vis::convert ( const Ogre::Matrix3 &  m  )  [inline]

Convert matrix of 3 by 3.

Definition at line 66 of file OMKConversion.h.

00067 {
00068   return Wm4::Matrix3f( m[0][0], m[0][1], m[0][2],
00069                         m[1][0], m[1][1], m[1][2],
00070                         m[2][0], m[2][1], m[2][2] ) ;
00071 }

Ogre::Vector3 OMK::Vis::convert ( const Wm4::Vector3f &  v  )  [inline]

Definition at line 59 of file OMKConversion.h.

00060 {
00061   return Ogre::Vector3( v.X(), v.Y(), v.Z() ) ;
00062 }

Wm4::Vector3f OMK::Vis::convert ( const Ogre::Vector3 &  v  )  [inline]

Convert vector of 3.

Definition at line 55 of file OMKConversion.h.

00056 {
00057   return Wm4::Vector3f( v.x, v.y, v.z ) ;
00058 }

Ogre::Quaternion OMK::Vis::convert ( const Wm4::Quaternionf &  q  )  [inline]

Definition at line 48 of file OMKConversion.h.

00049 {
00050   return Ogre::Quaternion( q.W(), q.X(), q.Y(), q.Z() ) ;
00051 }

Wm4::Quaternionf OMK::Vis::convert ( const Ogre::Quaternion &  q  )  [inline]

Convert quaternions.

Definition at line 44 of file OMKConversion.h.

Referenced by convert(), OMK::Vis::OgreObject::OgreObject(), and OMK::Vis::TransformAnimator::selfProcessVis().

00045 {
00046   return Wm4::Quaternionf( q.w, q.x, q.y, q.z ) ;
00047 }

std::string OMKVIS_API OMK::Vis::debugMsg ( const Vis::VisualObject visObj  ) 

Message formatting for visual object.

Returns:
the following string
  • visual object "VisualObjectName"
    or :
  • visual object "null"
    if the visual object is null

Definition at line 30 of file OMKVisualObject.cpp.

References OMK::Vis::VisualObject::getId(), and OMK::Name::getString().

00031 {
00032   std::ostringstream txt ;
00033   txt << "visual object \"" << (visObj ? visObj->getId().getString() : std::string( "null" ) ) 
00034     << "\"" ;
00035   return txt.str() ;
00036 }

std::string OMKVIS_API OMK::Vis::debugMsg ( const Vis::Animator anim  ) 

Message formatting for animator.

Definition at line 30 of file OMKAnimator.cpp.

References OMK::Name::getCString(), OMK::Vis::VisualObject::getId(), OMK::Vis::Animator::getId(), OMK::Name::getString(), and OMK::Vis::Animator::getVisualObject().

Referenced by OMK::Vis::Animator::Animator(), OMK::Vis::OgreAnimatorCommon::findOgreNode(), OMK::Vis::OgreObjectScene::loadConfigurationParameters(), OMK::Vis::OgreObjectScene::loadGeometry(), OMK::Vis::OgreVis::loadParameters(), OMK::Vis::OgreVis::loadSceneFile(), OMK::Vis::VisBase::processAddAnimatorEvent(), OMK::Vis::VisualObject::readConfigurationParameters(), OMK::Vis::VisualObject::VisualObject(), OMK::Vis::Animator::~Animator(), and OMK::Vis::VisualObject::~VisualObject().

00031 {
00032   std::ostringstream txt ;
00033   txt << "animator \"" << (anim ? anim->getId().getString() : std::string( "null" ) ) 
00034     << "\" of visual object \"" << (anim ? anim->getVisualObject().getId().getCString() : "unknow" ) << "\"" ;
00035   return txt.str() ;
00036 }

OMKVIS_API Ogre::Node * OMK::Vis::getChildWithDelimiterOMK ( const Ogre::Node &  node,
const std::string &  name 
)

Function with handle delimterOMK on DotScene.

Definition at line 76 of file OMKOgreAnimatorT.cpp.

References getNameWithoutDelimiterOMK().

Referenced by getOgreNode().

00077 {
00078   Ogre::Node::ConstChildNodeIterator iter( node.getChildIterator() ) ;
00079   while( iter.hasMoreElements() )
00080   {
00081     Ogre::Node* pChild( static_cast< Ogre::Node* >( iter.getNext() ) ) ;
00082     if( getNameWithoutDelimiterOMK( pChild->getName().c_str() ) == name )
00083     {
00084          return pChild;
00085     }
00086   }
00087   return 0;
00088 }

OMKVIS_API std::string OMK::Vis::getNameWithoutDelimiterOMK ( const std::string &  fileName  ) 

Function with handle delimterOMK on DotScene.

Definition at line 91 of file OMKOgreAnimatorT.cpp.

Referenced by getChildWithDelimiterOMK(), and getOgreNode().

00092 {
00093   static const std::string s_delimiter( "_#_" ) ;
00094   size_t delimiterPlace( fileName.rfind( s_delimiter ) ) ;
00095   std::string s( fileName ) ;
00096   if( delimiterPlace != std::string::npos )
00097   {
00098     s.erase( delimiterPlace, fileName.size() ) ;
00099   }
00100   return s ;
00101 }

OMKVIS_API Ogre::Node * OMK::Vis::getOgreNode ( const Ogre::Node &  rootNode,
const std::string &  nodeName 
)

Function retrieving a named node in a subtree of root rootNode.

Definition at line 41 of file OMKOgreAnimatorT.cpp.

References getChildWithDelimiterOMK(), and getNameWithoutDelimiterOMK().

Referenced by OMK::Vis::OgreAnimatorCommon::findOgreNode().

00042 {
00043   if (getNameWithoutDelimiterOMK(rootNode.getName()) == nodeName)
00044     return const_cast<Ogre::Node*>(&rootNode);
00045 
00046         Ogre::Node* node( 0 ) ;
00047         // look for the node in rootNode children, Ogre throws an exception if
00048         // nodeName is not the name of a child of rootNode. The exception is
00049         // catched and node set to NULL
00050 /*      try
00051         {
00052                 node = rootNode.getChild( getNameWithoutDelimiterOMK(nodeName) ) ;
00053         }
00054         catch( Ogre::Exception& )
00055         {
00056                 node = NULL ;
00057         }
00058 */
00059   node = getChildWithDelimiterOMK( rootNode, nodeName ) ;
00060 
00061         // if nodeName was not one of rootNode children we look deeper in the subtree,
00062         // the children of rootNode becoming the new rootNodes
00063         if( node == 0 )
00064         {
00065                 Ogre::Node::ConstChildNodeIterator ite( rootNode.getChildIterator() ) ;
00066                 for( unsigned short i( 0 ) ; ( node == 0 ) && ( i < rootNode.numChildren() ) ; ++i )
00067                 {
00068                         node = getOgreNode( *ite.getNext(), getNameWithoutDelimiterOMK( nodeName ) ) ;
00069                 }
00070 
00071         }  
00072         return node ;
00073 }


logo OpenMask

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

Generated with doxygen by Dimitri van Heesch ,   1997-2007