Public Member Functions | Protected Member Functions | Protected Attributes

sp::physics::DynamicPhysicsObject Class Reference

#include <spPhysicsDynamicObject.hpp>

Inheritance diagram for sp::physics::DynamicPhysicsObject:
sp::physics::PhysicsBaseObject sp::BaseObject sp::physics::RigidBody sp::physics::NewtonRigidBody sp::physics::PhysXRigidBody

List of all members.

Public Member Functions

virtual ~DynamicPhysicsObject ()
virtual void setGravity (const dim::vector3df &Gravity)
 Sets the individual gravity for this rigid body.
virtual void setMass (f32 Mass)
 Sets the body's mass factor (by default 25.0).
virtual void setAutoSleep (bool Enable)
 Enables or disables the auto sleep and freeze mode. By default disabled. This can be used for optimization purposes.
virtual void setGravityCallback (const PhysicsGravityCallback &Callback)
 Sets the gravity callback. By default 0.
virtual void setMassCenter (const dim::vector3df &LocalPoint)=0
 Sets the balance point (or rather center of mass) of the rigid body in object space. By default (0 | 0 | 0).
virtual dim::vector3df getMassCenter () const =0
 Returns the balance point (or rather center of mass).
virtual void addVelocity (const dim::vector3df &Direction)=0
virtual void setVelocity (const dim::vector3df &Direction)=0
virtual dim::vector3df getVelocity () const =0
virtual void addImpulse (const dim::vector3df &Direction, const dim::vector3df &PivotPoint)=0
virtual void setForce (const dim::vector3df &Direction)=0
dim::vector3df getGravity () const
 Returns the individual gravity for this rigid body.
f32 getMass () const
 Returns the body's mass factor.
bool getAutoSleep () const
 Returns true if the auto sleep and freeze mode is enabled.
PhysicsGravityCallback getGravityCallback () const
 Returns the gravity callback.

Protected Member Functions

 DynamicPhysicsObject ()

Protected Attributes

dim::vector3df Gravity_
f32 Mass_
bool AutoSleep_
PhysicsGravityCallback GravityCallback_

Constructor & Destructor Documentation

virtual sp::physics::DynamicPhysicsObject::~DynamicPhysicsObject (  )  [virtual]
sp::physics::DynamicPhysicsObject::DynamicPhysicsObject (  )  [protected]

Member Function Documentation

virtual void sp::physics::DynamicPhysicsObject::addImpulse ( const dim::vector3df Direction,
const dim::vector3df PivotPoint 
) [pure virtual]

Adds the specified impulse to the body. E.g. use this when you shoot at a box and the box shall throw away.

Parameters:
Direction,: Specifies the direction in which the impulse is to be pointed.
PivotPoint,: Specifies the global point where the impulse is to be performed.
virtual void sp::physics::DynamicPhysicsObject::addVelocity ( const dim::vector3df Direction  )  [pure virtual]
bool sp::physics::DynamicPhysicsObject::getAutoSleep (  )  const [inline]

Returns true if the auto sleep and freeze mode is enabled.

dim::vector3df sp::physics::DynamicPhysicsObject::getGravity (  )  const [inline]

Returns the individual gravity for this rigid body.

PhysicsGravityCallback sp::physics::DynamicPhysicsObject::getGravityCallback (  )  const [inline]

Returns the gravity callback.

f32 sp::physics::DynamicPhysicsObject::getMass (  )  const [inline]

Returns the body's mass factor.

virtual dim::vector3df sp::physics::DynamicPhysicsObject::getMassCenter (  )  const [pure virtual]

Returns the balance point (or rather center of mass).

virtual dim::vector3df sp::physics::DynamicPhysicsObject::getVelocity (  )  const [pure virtual]
virtual void sp::physics::DynamicPhysicsObject::setAutoSleep ( bool  Enable  )  [virtual]

Enables or disables the auto sleep and freeze mode. By default disabled. This can be used for optimization purposes.

virtual void sp::physics::DynamicPhysicsObject::setForce ( const dim::vector3df Direction  )  [pure virtual]

Sets the force for this object. This is actually only used to apply the g-force.

Note:
This function can only be used internally. Otherwise it has no effect.
virtual void sp::physics::DynamicPhysicsObject::setGravity ( const dim::vector3df Gravity  )  [virtual]

Sets the individual gravity for this rigid body.

virtual void sp::physics::DynamicPhysicsObject::setGravityCallback ( const PhysicsGravityCallback Callback  )  [virtual]

Sets the gravity callback. By default 0.

virtual void sp::physics::DynamicPhysicsObject::setMass ( f32  Mass  )  [virtual]

Sets the body's mass factor (by default 25.0).

virtual void sp::physics::DynamicPhysicsObject::setMassCenter ( const dim::vector3df LocalPoint  )  [pure virtual]

Sets the balance point (or rather center of mass) of the rigid body in object space. By default (0 | 0 | 0).

virtual void sp::physics::DynamicPhysicsObject::setVelocity ( const dim::vector3df Direction  )  [pure virtual]

Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines