SoCollisionShapeTriMesh Class Reference
[libipsa classesCollisionShape classes]

Defines a CollisionShape with the shape of the attached TriMesh. More...

#include <SoCollisionShapeTriMesh.h>

Inheritance diagram for SoCollisionShapeTriMesh:

Inheritance graph
[legend]
Collaboration diagram for SoCollisionShapeTriMesh:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual SoCollisionShapecopy (SbBool copyConnections) const
 SoCollisionShapeTriMesh (const SbString &nodeName="")

Static Public Member Functions

static void initClass ()

Public Attributes

SoSFNode ivModel

Protected Member Functions

virtual dGeomID cGeom (const SbMatrix &mm)
virtual void updateVisualisationAndOdeProperties ()

Private Member Functions

 SO_KIT_HEADER (SoCollisionShapeTriMesh)


Detailed Description

Defines a CollisionShape with the shape of the attached TriMesh.

This TriMesh is used for collision handling.

TriMesh.png

A TriMesh

Definition at line 38 of file SoCollisionShapeTriMesh.h.


Constructor & Destructor Documentation

SoCollisionShapeTriMesh::SoCollisionShapeTriMesh ( const SbString &  nodeName = ""  ) 

The constructor of SoCollisionShapeTriMesh. It changes the type of SoCollisionShape::visualisation to SoNode creates all necessary sensors and calls SoCollisionShapeTriMesh::setUpConnections().

Parameters:
nodeName name of the node in the Inventor scenegraph

Definition at line 62 of file SoCollisionShapeTriMesh.cpp.

References ivModel, and SoCollisionShape::updateOdePropertiesTrigger.


Member Function Documentation

dGeomID SoCollisionShapeTriMesh::cGeom ( const SbMatrix &  mm  )  [protected, virtual]

Creates a TriMesh geom object. This method creates a TriMesh geom using the inventor model stored in the ivModel field, and return its ID.

Parameters:
mm the model matrix of the current node
Returns:
dGeomID: The dGeomID of the created trimesh geom.

Reimplemented from SoCollisionShape.

Definition at line 111 of file SoCollisionShapeTriMesh.cpp.

References SoCollisionShape::COG, TriangleExtractor::execute(), TriangleExtractor::getResult(), VertexStorage< T >::indices, ivModel, VertexStorage< T >::MAX_INDEX_COUNT, VertexStorage< T >::MAX_VERTEX_COUNT, SoCollisionShape::space, and VertexStorage< T >::vertices.

SoCollisionShape * SoCollisionShapeTriMesh::copy ( SbBool  copyConnections  )  const [virtual]

The overwritten copy() method

Parameters:
copyConnections copy connections if true

Reimplemented from SoCollisionShape.

Definition at line 82 of file SoCollisionShapeTriMesh.cpp.

References SoCollisionShape::setUpConnections().

void SoCollisionShapeTriMesh::initClass (  )  [static]

Initialises the class and it's type id variables.

Reimplemented from SoCollisionShape.

Definition at line 50 of file SoCollisionShapeTriMesh.cpp.

SoCollisionShapeTriMesh::SO_KIT_HEADER ( SoCollisionShapeTriMesh   )  [private]

void SoCollisionShapeTriMesh::updateVisualisationAndOdeProperties (  )  [protected, virtual]

This method sets the visualisation shape to the new trimesh node.

Warning:
DEFAULT VISUALISATION FOR SoCollisionShapeTriMesh IS NOT IMPLEMENTED YET !

Todo:
Update this->geometry with a new dGeomID if the model changes

Reimplemented from SoCollisionShape.

Definition at line 97 of file SoCollisionShapeTriMesh.cpp.


Member Data Documentation

The Inventor Model which is used as a base for creating the ODE TriMesh object (default = NULL).

Definition at line 50 of file SoCollisionShapeTriMesh.h.

Referenced by cGeom(), and SoCollisionShapeTriMesh().


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

Get IPSA - Inventor Physics Simulation API at SourceForge.net. Fast, secure and Free Open Source software downloads
Generated on Sat Mar 10 20:00:20 2012 for IPSA by  doxygen 1.5.8