#include <SoPhysicsCylinder.h>
Public Member Functions | |
SoPhysicsCylinder (const SbString &nodeName="") | |
Static Public Member Functions | |
static void | initClass () |
Public Attributes | |
SoSFFloat | height |
SoSFFloat | radius |
Protected Member Functions | |
virtual dMass | getInitialMass () |
virtual void | updateDependentObjects () |
Private Member Functions | |
SO_KIT_HEADER (SoPhysicsCylinder) |
This physics object is scaleable.
A cylinder
Definition at line 31 of file SoPhysicsCylinder.h.
SoPhysicsCylinder::SoPhysicsCylinder | ( | const SbString & | nodeName = "" |
) |
The constructor of SoPhysicsCylinder.
nodeName | name of the node in the Inventor scenegraph |
We need to rotate the coin appearance for the cylinder because open inventor aligns cylinders along the Y-axis while ODE aligns cylinders along z-axis. So we add a corrective rotation for the visualisation here.
Definition at line 63 of file SoPhysicsCylinder.cpp.
References SoPhysics::CoinRefTransform, height, radius, and SoPhysics::updateDependentObjectsTrigger.
dMass SoPhysicsCylinder::getInitialMass | ( | ) | [protected, virtual] |
This method returns the mass of the cylinder object. The mass of the object that will be returned is calculated by taking care of changes in scaling.
Reimplemented from SoPhysics.
Reimplemented in SoPhysicsCapsule.
Definition at line 97 of file SoPhysicsCylinder.cpp.
References height, SoPhysics::inertia, SoPhysics::mass, radius, and SoPhysics::scale.
void SoPhysicsCylinder::initClass | ( | ) | [static] |
Initialises the class and it's type id variables.
Reimplemented from SoPhysics.
Reimplemented in SoPhysicsCapsule.
Definition at line 53 of file SoPhysicsCylinder.cpp.
SoPhysicsCylinder::SO_KIT_HEADER | ( | SoPhysicsCylinder | ) | [private] |
void SoPhysicsCylinder::updateDependentObjects | ( | ) | [protected, virtual] |
If one of the fields of the object changes these changes are propagated to the collision and visualisation shape if they are of the same type as the physics object. If the field SoPhysics::AUTO_UPDATE_COLLISION_SHAPE is set to FALSE the collision shape doesn't get uptdated.
Reimplemented from SoPhysics.
Reimplemented in SoPhysicsCapsule.
Definition at line 133 of file SoPhysicsCylinder.cpp.
References SoPhysics::AUTO_UPDATE_COLLISION_SHAPE, SoCollisionShapeCylinder::height, height, SoCollisionShapeCylinder::radius, and radius.
The height of the cylinder (default = 1.0f).
Definition at line 42 of file SoPhysicsCylinder.h.
Referenced by getInitialMass(), SoPhysicsCylinder(), and updateDependentObjects().
The radius of the cylinder (default = 1.0f).
Definition at line 41 of file SoPhysicsCylinder.h.
Referenced by getInitialMass(), SoPhysicsCylinder(), and updateDependentObjects().
Generated on Sat Mar 10 20:00:21 2012 for IPSA by 1.5.8 |