SoCollisionShapeBox Class Reference
[libipsa classesCollisionShape classes]

Defines a CollisionShape of type Box. More...

#include <SoCollisionShapeBox.h>

Inheritance diagram for SoCollisionShapeBox:

Inheritance graph
[legend]
Collaboration diagram for SoCollisionShapeBox:

Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Static Public Member Functions

static void initClass ()

Public Attributes

SoSFVec3f dimension

Protected Member Functions

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

Private Member Functions

 SO_KIT_HEADER (SoCollisionShapeBox)


Detailed Description

Defines a CollisionShape of type Box.

This box is used for collision handling.

Box.png

A box

Definition at line 33 of file SoCollisionShapeBox.h.


Constructor & Destructor Documentation

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

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

Parameters:
nodeName name of the node in the Inventor scenegraph

Definition at line 58 of file SoCollisionShapeBox.cpp.

References dimension, and SoCollisionShape::updateOdePropertiesTrigger.


Member Function Documentation

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

Creates a box geom object. This method creates a box geom using the values from the variable dimension, and returns its ID. The point of reference for a box is its center.

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

Reimplemented from SoCollisionShape.

Definition at line 115 of file SoCollisionShapeBox.cpp.

References dimension, and SoCollisionShape::space.

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

The overwritten copy() method

Parameters:
copyConnections copy connections if true

Reimplemented from SoCollisionShape.

Definition at line 78 of file SoCollisionShapeBox.cpp.

References SoCollisionShape::setUpConnections().

void SoCollisionShapeBox::initClass (  )  [static]

Initialises the class and it's type id variables.

Reimplemented from SoCollisionShape.

Definition at line 46 of file SoCollisionShapeBox.cpp.

SoCollisionShapeBox::SO_KIT_HEADER ( SoCollisionShapeBox   )  [private]

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

Creates a box default visualisation object. This method creates an SoCube node using the values from the variable dimension. The dimension is continuously updated according to the collision shape.

Reimplemented from SoCollisionShape.

Definition at line 92 of file SoCollisionShapeBox.cpp.

References dimension, and SoCollisionShape::geometry.


Member Data Documentation

The dimension of the SoCollisionShapeBox (default = {1.0f, 1.0f, 1.0f}).

Definition at line 45 of file SoCollisionShapeBox.h.

Referenced by cGeom(), SoCollisionShapeBox(), SoPhysicsBox::updateDependentObjects(), and updateVisualisationAndOdeProperties().


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