sofa::component::collision::GridModel Class Reference

#include <GridModel.h>

Inheritance diagram for sofa::component::collision::GridModel:

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

Collaboration graph
[legend]

Data Structures

class  GridSortPredicate

Public Types

typedef
core::CollisionElementIterator 
ChildIterator
typedef Vec3Types DataTypes
typedef GridCell Element

Public Member Functions

 GridModel ()
virtual void resize (int size)
 Set the number of elements.
virtual void computeBoundingTree (int maxDepth=0)
 Create or update the bounding volume hierarchy.
virtual std::pair
< core::CollisionElementIterator,
core::CollisionElementIterator > 
getInternalChildren (int index) const
 Return the list (as a pair of iterators) of internal children of an element.
virtual std::pair
< core::CollisionElementIterator,
core::CollisionElementIterator > 
getExternalChildren (int index) const
 Return the list (as a pair of iterators) of external children of an element.
virtual bool isLeaf (int index) const
 Checks if the element(index) is a leaf and a primitive of the collision model.
void draw (int index)
 Render an collision element.
void draw ()
 Render the whole collision model.

Friends

class GridCell

Detailed Description

Definition at line 59 of file GridModel.h.


Member Typedef Documentation

Definition at line 64 of file GridModel.h.

Definition at line 65 of file GridModel.h.

Definition at line 66 of file GridModel.h.


Constructor & Destructor Documentation

sofa::component::collision::GridModel::GridModel (  ) 

Definition at line 49 of file GridModel.cpp.


Member Function Documentation

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

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

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

Render an collision element.

Reimplemented from sofa::core::CollisionModel.

Definition at line 135 of file GridModel.cpp.

std::pair< core::CollisionElementIterator, core::CollisionElementIterator > sofa::component::collision::GridModel::getExternalChildren ( int   )  const [virtual]

Return the list (as a pair of iterators) of external children of an element.

External children are child elements of a different type than their parent (often corresponding to the final elements).

Default to empty (i.e. two identical iterators)

Reimplemented from sofa::core::CollisionModel.

Definition at line 213 of file GridModel.cpp.

std::pair< core::CollisionElementIterator, core::CollisionElementIterator > sofa::component::collision::GridModel::getInternalChildren ( int   )  const [virtual]

Return the list (as a pair of iterators) of internal children of an element.

Internal children are child elements of the same type as their parent (often corresponding to non-final elements). This distinction is used to optimize the intersection tests inside the hierarchy, as internal children can be processed without dynamically retrieving a new intersection method.

Default to empty (i.e. two identical iterators)

Reimplemented from sofa::core::CollisionModel.

Definition at line 208 of file GridModel.cpp.

bool sofa::component::collision::GridModel::isLeaf ( int   )  const [virtual]

Checks if the element(index) is a leaf and a primitive of the collision model.

Default to true since triangle model, line model, etc. does not have this method implemented and they are themselves (normally) leaves and primitives

Reimplemented from sofa::core::CollisionModel.

Definition at line 230 of file GridModel.cpp.

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


Friends And Related Function Documentation

friend class GridCell [friend]

Definition at line 67 of file GridModel.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