SoPhysicsSphere Class Reference
[libipsa classesPhysic Classes]

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

#include <SoPhysicsSphere.h>

Inheritance diagram for SoPhysicsSphere:

Inheritance graph
[legend]
Collaboration diagram for SoPhysicsSphere:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SoPhysicsSphere (const SbString &nodeName="")

Static Public Member Functions

static void initClass ()

Public Attributes

SoSFFloat radius

Protected Member Functions

virtual dMass getInitialMass ()
virtual void updateDependentObjects ()

Private Member Functions

 SO_KIT_HEADER (SoPhysicsSphere)


Detailed Description

Defines a physics object with the properties of a sphere.

This physics object is scaleable.

Sphere.png

A sphere

Definition at line 31 of file SoPhysicsSphere.h.


Constructor & Destructor Documentation

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

The constructor of SoPhysicsSphere.

Parameters:
nodeName name of the node in the Inventor scenegraph

Definition at line 59 of file SoPhysicsSphere.cpp.

References radius, and SoPhysics::updateDependentObjectsTrigger.


Member Function Documentation

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

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

Returns:
mass: the mass of the sphere.

Reimplemented from SoPhysics.

Definition at line 84 of file SoPhysicsSphere.cpp.

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

void SoPhysicsSphere::initClass (  )  [static]

Initialises the class and it's type id variables.

Reimplemented from SoPhysics.

Definition at line 49 of file SoPhysicsSphere.cpp.

SoPhysicsSphere::SO_KIT_HEADER ( SoPhysicsSphere   )  [private]

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

If the radius field is changed this method is called which passes the changes on to the visualisation shape and collision shape if they are of type Sphere. 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 118 of file SoPhysicsSphere.cpp.

References SoPhysics::AUTO_UPDATE_COLLISION_SHAPE, SoCollisionShapeSphere::radius, and radius.


Member Data Documentation

The radius of the sphere (default = 1.0f).

Definition at line 41 of file SoPhysicsSphere.h.

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


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:21 2012 for IPSA by  doxygen 1.5.8