sofa::component::visualmodel::OglTetrahedralModel< DataTypes > Class Template Reference

Render 3D models with tetrahedra. More...

#include <OglTetrahedralModel.h>

Inheritance diagram for sofa::component::visualmodel::OglTetrahedralModel< DataTypes >:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::visualmodel::OglTetrahedralModel< DataTypes >:

Collaboration graph
[legend]

Public Types

typedef DataTypes::Coord Coord
typedef DataTypes::VecCoord VecCoord

Public Member Functions

 OglTetrahedralModel ()
virtual ~OglTetrahedralModel ()
void init ()
 Initialization method called at graph modification, during bottom-up traversal.
void drawTransparent ()
 Display transparent surfaces.
bool addBBox (double *minBBox, double *maxBBox)
 used to add the bounding-box of this visual model to the given bounding box in order to compute the scene bounding box or cull hidden objects.
virtual std::string getTemplateName () const
 Get the template type names (if any) used to instantiate this object.

Static Public Member Functions

static std::string templateName (const OglTetrahedralModel< DataTypes > *=NULL)
template<class T >
static bool canCreate (T *&obj, core::objectmodel::BaseContext *context, core::objectmodel::BaseObjectDescription *arg)
 Pre-construction check method called by ObjectFactory.

Private Attributes

core::componentmodel::topology::BaseMeshTopology * topo
core::componentmodel::behavior::MechanicalState
< DataTypes > * 
nodes
Data< bool > depthTest
Data< bool > blending

Detailed Description

template<class DataTypes>
class sofa::component::visualmodel::OglTetrahedralModel< DataTypes >

Render 3D models with tetrahedra.

This is a basic class using tetrehedra for the rendering instead of common triangles. It loads its data with a BaseMeshTopology and a MechanicalState. This rendering is only available with Nvidia's >8 series and Ati's >2K series.

Definition at line 52 of file OglTetrahedralModel.h.


Member Typedef Documentation

template<class DataTypes >
typedef DataTypes::Coord sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::Coord

Definition at line 55 of file OglTetrahedralModel.h.

template<class DataTypes >
typedef DataTypes::VecCoord sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::VecCoord

Definition at line 56 of file OglTetrahedralModel.h.


Constructor & Destructor Documentation

template<class DataTypes >
sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::OglTetrahedralModel (  )  [inline]

Definition at line 42 of file OglTetrahedralModel.inl.

template<class DataTypes >
sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::~OglTetrahedralModel (  )  [inline, virtual]

Definition at line 49 of file OglTetrahedralModel.inl.


Member Function Documentation

template<class DataTypes >
bool sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::addBBox ( double *  ,
double *   
) [inline, virtual]

used to add the bounding-box of this visual model to the given bounding box in order to compute the scene bounding box or cull hidden objects.

Returns:
false if the visual model does not define any bounding box, which should only be the case for "debug" objects, as this lack of information might affect performances and leads to incorrect scene bounding box.

Reimplemented from sofa::core::VisualModel.

Definition at line 108 of file OglTetrahedralModel.inl.

References sofa::core::componentmodel::topology::BaseMeshTopology::getTetras(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getX(), sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::nodes, and sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::topo.

template<class DataTypes >
template<class T >
static bool sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::canCreate ( T *&  obj,
core::objectmodel::BaseContext *  context,
core::objectmodel::BaseObjectDescription *  arg 
) [inline, static]

Pre-construction check method called by ObjectFactory.

Check that DataTypes matches the MechanicalState.

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

Definition at line 86 of file OglTetrahedralModel.h.

References sofa::core::objectmodel::BaseContext::getMechanicalState().

Referenced by sofa::component::visualmodel::OglTetrahedralModel< gpu::cuda::CudaVectorTypes< TCoord, TDeriv, TReal > >::canCreate().

template<class DataTypes >
void sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::drawTransparent (  )  [inline, virtual]

template<class DataTypes >
virtual std::string sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::getTemplateName (  )  const [inline, virtual]

Get the template type names (if any) used to instantiate this object.

Reimplemented from sofa::core::objectmodel::Base.

Definition at line 73 of file OglTetrahedralModel.h.

References sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::templateName().

template<class DataTypes >
void sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::init ( void   )  [inline, virtual]

template<class DataTypes >
static std::string sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::templateName ( const OglTetrahedralModel< DataTypes > *  = NULL  )  [inline, static]


Field Documentation

template<class DataTypes >
Data<bool> sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::blending [private]

template<class DataTypes >
Data<bool> sofa::component::visualmodel::OglTetrahedralModel< DataTypes >::depthTest [private]


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

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