sofa::component::collision::LineModel Class Reference

#include <LineModel.h>

Inheritance diagram for sofa::component::collision::LineModel:

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

Collaboration graph
[legend]

Data Structures

struct  LineData

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 Line Element

Public Member Functions

 LineModel ()
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 void handleTopologyChange ()
 Handle topological Changes.
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

virtual void updateFromTopology ()

Protected Attributes

sofa::helper::vector< LineData > elems
bool needsUpdate
core::componentmodel::behavior::MechanicalState
< Vec3Types > * 
mstate
Topology * topology
PointModel * mpoints
int meshRevision

Friends

class Line

Detailed Description

Definition at line 71 of file LineModel.h.


Member Typedef Documentation

Definition at line 91 of file LineModel.h.

Definition at line 88 of file LineModel.h.

Definition at line 92 of file LineModel.h.

Definition at line 93 of file LineModel.h.

Definition at line 87 of file LineModel.h.

Definition at line 89 of file LineModel.h.

Definition at line 90 of file LineModel.h.


Constructor & Destructor Documentation

sofa::component::collision::LineModel::LineModel (  ) 

Definition at line 62 of file LineModel.cpp.


Member Function Documentation

bool sofa::component::collision::LineModel::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 389 of file LineModel.cpp.

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

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

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

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

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

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

Definition at line 117 of file LineModel.h.

References mstate.

void sofa::component::collision::LineModel::handleTopologyChange (  )  [virtual]

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

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

Set the number of elements.

Reimplemented from sofa::core::CollisionModel.

Definition at line 77 of file LineModel.cpp.

References elems.

Referenced by handleTopologyChange(), init(), and updateFromTopology().

void sofa::component::collision::LineModel::updateFromTopology (  )  [protected, virtual]


Friends And Related Function Documentation

friend class Line [friend]

Definition at line 95 of file LineModel.h.


Field Documentation

Definition at line 126 of file LineModel.h.

Referenced by updateFromTopology().

Definition at line 125 of file LineModel.h.

Referenced by canCollideWithElement(), and init().

Definition at line 123 of file LineModel.h.

Referenced by getMechanicalState(), init(), and updateFromTopology().

Definition at line 124 of file LineModel.h.


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

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