sofa::component::collision::PointModel Class Reference

#include <PointModel.h>

Inheritance diagram for sofa::component::collision::PointModel:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::collision::PointModel:

Collaboration graph
[legend]

Public Types

typedef Vec3Types InDataTypes
typedef Vec3Types DataTypes
typedef DataTypes::VecCoord VecCoord
typedef DataTypes::VecDeriv VecDeriv
typedef DataTypes::Coord Coord
typedef DataTypes::Deriv Deriv
typedef Point Element

Public Member Functions

 PointModel ()
virtual void init ()
 Initialization method called at graph modification, during bottom-up traversal.
virtual void resize (int size)
 Set the number of elements.
virtual void computeBoundingTree (int maxDepth=0)
 Create or update the bounding volume hierarchy.
virtual void computeContinuousBoundingTree (double dt, int maxDepth=0)
 Create or update the bounding volume hierarchy, accounting for motions within the given timestep.
void draw (int index)
 Render an collision element.
void draw ()
 Render the whole collision model.
virtual bool canCollideWithElement (int index, CollisionModel *model2, int index2)
 Test if two elements can collide with each other.
core::componentmodel::behavior::MechanicalState
< Vec3Types > * 
getMechanicalState ()

Protected Member Functions

void updateNormals ()

Protected Attributes

core::componentmodel::behavior::MechanicalState
< Vec3Types > * 
mstate
Data< bool > computeNormals
VecDeriv normals

Friends

class Point

Detailed Description

Definition at line 62 of file PointModel.h.


Member Typedef Documentation

Definition at line 69 of file PointModel.h.

Definition at line 66 of file PointModel.h.

Definition at line 70 of file PointModel.h.

Definition at line 71 of file PointModel.h.

Definition at line 65 of file PointModel.h.

Definition at line 67 of file PointModel.h.

Definition at line 68 of file PointModel.h.


Constructor & Destructor Documentation

sofa::component::collision::PointModel::PointModel (  ) 

Definition at line 69 of file PointModel.cpp.


Member Function Documentation

bool sofa::component::collision::PointModel::canCollideWithElement ( int  ,
CollisionModel *  ,
int   
) [virtual]

Test if two elements can collide with each other.

This method should be implemented by models supporting self-collisions to prune tests between adjacent elements.

Default to true. Note that this method assumes that canCollideWith(model2) was already used to test if the collision models can collide.

Reimplemented from sofa::core::CollisionModel.

Definition at line 144 of file PointModel.cpp.

References sofa::core::CollisionModel::bSelfCollision, sofa::core::CollisionModel::canCollideWithElement(), sofa::core::objectmodel::BaseObject::getContext(), and sofa::core::objectmodel::Data< T >::getValue().

void sofa::component::collision::PointModel::computeBoundingTree ( int  maxDepth = 0  )  [virtual]

void sofa::component::collision::PointModel::computeContinuousBoundingTree ( double  ,
int  maxDepth = 0 
) [virtual]

void sofa::component::collision::PointModel::draw (  )  [virtual]

void sofa::component::collision::PointModel::draw ( int   )  [virtual]

Render an collision element.

Reimplemented from sofa::core::CollisionModel.

Definition at line 96 of file PointModel.cpp.

References sofa::helper::gl::glVertexT(), normals, and sofa::component::collision::Point::p().

core::componentmodel::behavior::MechanicalState<Vec3Types>* sofa::component::collision::PointModel::getMechanicalState (  )  [inline]

Definition at line 92 of file PointModel.h.

References mstate.

void sofa::component::collision::PointModel::init ( void   )  [virtual]

void sofa::component::collision::PointModel::resize ( int  s  )  [virtual]

void sofa::component::collision::PointModel::updateNormals (  )  [protected]


Friends And Related Function Documentation

friend class Point [friend]

Definition at line 72 of file PointModel.h.


Field Documentation

Definition at line 102 of file PointModel.h.

Referenced by computeBoundingTree(), computeContinuousBoundingTree(), and init().

Definition at line 104 of file PointModel.h.

Referenced by draw(), and updateNormals().


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

Generated on Sun Nov 23 04:17:31 2008 for Sofa by  doxygen 1.5.7.1