sofa::component::visualmodel::OgreVisualModel Class Reference

#include <OgreVisualModel.h>

Inheritance diagram for sofa::component::visualmodel::OgreVisualModel:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::visualmodel::OgreVisualModel:

Collaboration graph
[legend]

Public Member Functions

int getNbTriangles ()
 OgreVisualModel ()
std::string getOgreName ()
void parse (core::objectmodel::BaseObjectDescription *)
 Parse the given description to assign values to this object's fields and potentially other parameters.
void reinit ()
 Update method called when variables used in precomputation are modified.
virtual void attach (Ogre::SceneManager *sceneMgr)
virtual void draw ()
 Render internal data of this object, for debugging purposes.
virtual void initTextures ()
 Initialize the textures, or other graphical resources.
virtual void updateVisual ()
 used to update the model if necessary.

Data Fields

Data< std::string > materialname
float dx
float dy
float dz
float scale
int meshRevision
Ogre::MeshPtr ogreMesh
Ogre::Entity * ogreEntity
Ogre::SceneNode * ogreNode
Ogre::HardwareVertexBufferSharedPtr vBuffer
Ogre::HardwareIndexBufferSharedPtr iBuffer

Static Public Attributes

static bool lightSwitched
static int counter

Protected Member Functions

void uploadVertices ()
void uploadIndices ()
void computeNormals ()
void computeBounds ()
void updateMaterial (Ogre::MaterialPtr &mat)
std::string uniqueName (void)

Protected Attributes

ResizableExtVector< Vec
< 2, float > > 
mirror_tex
std::string submesh_material

Detailed Description

Definition at line 62 of file OgreVisualModel.h.


Constructor & Destructor Documentation

sofa::component::visualmodel::OgreVisualModel::OgreVisualModel (  ) 

Definition at line 52 of file OgreVisualModel.cpp.


Member Function Documentation

void sofa::component::visualmodel::OgreVisualModel::attach ( Ogre::SceneManager *  sceneMgr  )  [virtual]

void sofa::component::visualmodel::OgreVisualModel::computeBounds (  )  [protected]

void sofa::component::visualmodel::OgreVisualModel::computeNormals (  )  [protected, virtual]

virtual void sofa::component::visualmodel::OgreVisualModel::draw (  )  [inline, virtual]

Render internal data of this object, for debugging purposes.

Reimplemented from sofa::core::objectmodel::BaseObject.

Definition at line 104 of file OgreVisualModel.h.

int sofa::component::visualmodel::OgreVisualModel::getNbTriangles (  )  [inline]

std::string sofa::component::visualmodel::OgreVisualModel::getOgreName (  ) 

virtual void sofa::component::visualmodel::OgreVisualModel::initTextures (  )  [inline, virtual]

Initialize the textures, or other graphical resources.

Deprecated:
Use initVisual() instead.

Reimplemented from sofa::core::VisualModel.

Definition at line 106 of file OgreVisualModel.h.

void sofa::component::visualmodel::OgreVisualModel::parse ( core::objectmodel::BaseObjectDescription *  arg  )  [virtual]

Parse the given description to assign values to this object's fields and potentially other parameters.

Reimplemented from sofa::component::visualmodel::VisualModelImpl.

Definition at line 72 of file OgreVisualModel.cpp.

References dx, dy, dz, sofa::core::objectmodel::BaseObjectDescription::getAttribute(), and scale.

void sofa::component::visualmodel::OgreVisualModel::reinit (  )  [virtual]

Update method called when variables used in precomputation are modified.

Reimplemented from sofa::core::objectmodel::BaseObject.

Definition at line 200 of file OgreVisualModel.cpp.

References submesh_material, updateMaterial(), and updateVisual().

std::string sofa::component::visualmodel::OgreVisualModel::uniqueName ( void   )  [protected]

Definition at line 59 of file OgreVisualModel.cpp.

References counter, and getOgreName().

Referenced by attach().

void sofa::component::visualmodel::OgreVisualModel::updateMaterial ( Ogre::MaterialPtr &  mat  )  [protected]

void sofa::component::visualmodel::OgreVisualModel::updateVisual (  )  [virtual]

void sofa::component::visualmodel::OgreVisualModel::uploadIndices (  )  [protected]

void sofa::component::visualmodel::OgreVisualModel::uploadVertices (  )  [protected]


Field Documentation

Definition at line 111 of file OgreVisualModel.h.

Referenced by uniqueName().

Definition at line 71 of file OgreVisualModel.h.

Referenced by parse(), and uploadVertices().

Definition at line 71 of file OgreVisualModel.h.

Referenced by parse(), and uploadVertices().

Definition at line 71 of file OgreVisualModel.h.

Referenced by parse(), and uploadVertices().

Ogre::HardwareIndexBufferSharedPtr sofa::component::visualmodel::OgreVisualModel::iBuffer

Definition at line 90 of file OgreVisualModel.h.

Referenced by attach(), and uploadIndices().

Definition at line 67 of file OgreVisualModel.h.

Referenced by attach().

Definition at line 73 of file OgreVisualModel.h.

Referenced by updateVisual(), and uploadIndices().

Definition at line 113 of file OgreVisualModel.h.

Definition at line 86 of file OgreVisualModel.h.

Referenced by attach().

Definition at line 85 of file OgreVisualModel.h.

Referenced by attach(), computeBounds(), updateVisual(), uploadIndices(), and uploadVertices().

Definition at line 87 of file OgreVisualModel.h.

Referenced by attach(), and computeBounds().

Reimplemented from sofa::component::visualmodel::VisualModelImpl.

Definition at line 71 of file OgreVisualModel.h.

Referenced by parse(), and uploadVertices().

Definition at line 124 of file OgreVisualModel.h.

Referenced by attach(), and reinit().

Ogre::HardwareVertexBufferSharedPtr sofa::component::visualmodel::OgreVisualModel::vBuffer

Definition at line 89 of file OgreVisualModel.h.

Referenced by attach(), and uploadVertices().


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

Generated on Sun Nov 23 04:21:56 2008 for Sofa by  doxygen 1.5.7.1