SoCollisionShapePlane Class Reference
[libipsa classesCollisionShape classes]

Defines a CollisionShape of type Plane. More...

#include <SoCollisionShapePlane.h>

Inheritance diagram for SoCollisionShapePlane:

Inheritance graph
[legend]
Collaboration diagram for SoCollisionShapePlane:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual SoCollisionShapecopy (SbBool copyConnections) const
 SoCollisionShapePlane (const SbString &nodeName="")
virtual void updateGeomPosition (const SbMatrix &mm)

Static Public Member Functions

static void initClass ()

Public Attributes

SoSFFloat distance
SoSFVec3f normal

Protected Member Functions

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

Private Member Functions

 SO_KIT_HEADER (SoCollisionShapePlane)


Detailed Description

Defines a CollisionShape of type Plane.

Definition at line 34 of file SoCollisionShapePlane.h.


Constructor & Destructor Documentation

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

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

Parameters:
nodeName name of the node in the Inventor scenegraph

Definition at line 62 of file SoCollisionShapePlane.cpp.

References distance, normal, and SoCollisionShape::updateOdePropertiesTrigger.


Member Function Documentation

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

Creates a plane geom object. This method creates a plane geom using SoCollisionShape::nomral and SoCollisionShape::distance returning its ID afterwards. The point of reference for a box is its center.

Additionally set SoCollisionShape::transform to place the collisionshape correctly.

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

Reimplemented from SoCollisionShape.

Definition at line 131 of file SoCollisionShapePlane.cpp.

References distance, normal, SoCollisionShape::space, and SoCollisionShape::transform.

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

The overwritten copy() method

Parameters:
copyConnections copy connections if true

Reimplemented from SoCollisionShape.

Definition at line 87 of file SoCollisionShapePlane.cpp.

References SoCollisionShape::setUpConnections().

void SoCollisionShapePlane::initClass (  )  [static]

Initialises the class and it's type id variables.

Reimplemented from SoCollisionShape.

Definition at line 50 of file SoCollisionShapePlane.cpp.

SoCollisionShapePlane::SO_KIT_HEADER ( SoCollisionShapePlane   )  [private]

void SoCollisionShapePlane::updateGeomPosition ( const SbMatrix &  mm  )  [virtual]

ODE Planes are non-placeable geoms, so dont update position.

Parameters:
mm the model matrix of the current node

Reimplemented from SoCollisionShape.

Definition at line 115 of file SoCollisionShapePlane.cpp.

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

Creates a flat box default visualisation object for plane.

Reimplemented from SoCollisionShape.

Definition at line 99 of file SoCollisionShapePlane.cpp.


Member Data Documentation

The distance of the SoCollisionShapePlane to the origin (default = 0.0f).

Definition at line 49 of file SoCollisionShapePlane.h.

Referenced by cGeom(), and SoCollisionShapePlane().

The normal of the SoCollisionShapePlane (default = {0.0f, 1.0f, 0.0f}).

Definition at line 48 of file SoCollisionShapePlane.h.

Referenced by cGeom(), and SoCollisionShapePlane().


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