SoPhysicsBox Class Reference
[libipsa classesPhysic Classes]

Defines a physics object with the properties of a box. More...

#include <SoPhysicsBox.h>

Inheritance diagram for SoPhysicsBox:

Inheritance graph
Collaboration diagram for SoPhysicsBox:

Collaboration graph

List of all members.

Public Member Functions

 SoPhysicsBox (const SbString &nodeName="")

Static Public Member Functions

static void initClass ()

Public Attributes

SoSFVec3f dimension

Protected Member Functions

virtual dMass getInitialMass ()
virtual void updateDependentObjects ()

Private Member Functions

 SO_KIT_HEADER (SoPhysicsBox)

Detailed Description

Defines a physics object with the properties of a box.

This physics object is scaleable.


A box

Definition at line 30 of file SoPhysicsBox.h.

Constructor & Destructor Documentation

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

The constructor of SoPhysicsBox.

nodeName name of the node in the Inventor scenegraph

Definition at line 57 of file SoPhysicsBox.cpp.

References dimension, and SoPhysics::updateDependentObjectsTrigger.

Member Function Documentation

dMass SoPhysicsBox::getInitialMass (  )  [protected, virtual]

This method returns the mass of the box object. The mass of the object that will be returned is calculated by taking care of changes in scaling.

mass: the mass of the box.

Reimplemented from SoPhysics.

Definition at line 82 of file SoPhysicsBox.cpp.

References dimension, SoPhysics::inertia, SoPhysics::mass, and SoPhysics::scale.

void SoPhysicsBox::initClass (  )  [static]

Initialises the class and it's type id variables.

Reimplemented from SoPhysics.

Definition at line 48 of file SoPhysicsBox.cpp.

SoPhysicsBox::SO_KIT_HEADER ( SoPhysicsBox   )  [private]

void SoPhysicsBox::updateDependentObjects (  )  [protected, virtual]

If the dimension field is changed this method is called which passes the changes on to the visualisation shape and collision shape if they are of type Box. If the field SoPhysics::AUTO_UPDATE_COLLISION_SHAPE is set to FALSE the collision shape doesn't get uptdated.

Reimplemented from SoPhysics.

Definition at line 114 of file SoPhysicsBox.cpp.

References SoPhysics::AUTO_UPDATE_COLLISION_SHAPE, SoCollisionShapeBox::dimension, and dimension.

Member Data Documentation

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

Definition at line 41 of file SoPhysicsBox.h.

Referenced by getInitialMass(), SoPhysicsBox(), and updateDependentObjects().

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

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