Public Member Functions | Protected Member Functions

sp::scene::BaseCollisionPhysicsObject Class Reference
[Collision System]

#include <spBaseCollisionPhysicsObject.hpp>

Inheritance diagram for sp::scene::BaseCollisionPhysicsObject:
sp::scene::CharacterController

List of all members.

Public Member Functions

virtual ~BaseCollisionPhysicsObject ()
void arrestGravityForces ()
void reduceVelocity (const dim::vector3df &FactorVec)
void setGravity (const dim::vector3df &Gravity)
 Sets the gravity force which will be applied to the object.
dim::vector3df getGravity () const
 Returns the gravity used for this object. By default (0, 0, 0).
void setMass (f32 Mass)
f32 getMass () const
 Returns the object's mass. By default 1.0.
void setFriction (f32 Friction)
 Sets the friction factor. This must be in the range [0.0 .. 1.0].
f32 getFriction () const
 Returns the friction factor. By default 0.5.
void setForce (const dim::vector3df &Force)
void addForce (const dim::vector3df &Force)
dim::vector3df getForce () const
void setVelocity (const dim::vector3df &Velocity)
void addVelocity (const dim::vector3df &Velocity)
dim::vector3df getVelocity () const

Protected Member Functions

 BaseCollisionPhysicsObject ()
void integrate (CollisionNode *Node)
 Compute physics integration.
void applyFriction ()

Detailed Description

This is the base class for simple collision-physics objects. This does not include actual physics simulation. It only holds gravity, mass and force information which will affect the object's position.


Constructor & Destructor Documentation

sp::scene::BaseCollisionPhysicsObject::~BaseCollisionPhysicsObject (  )  [virtual]
sp::scene::BaseCollisionPhysicsObject::BaseCollisionPhysicsObject (  )  [protected]

Member Function Documentation

void sp::scene::BaseCollisionPhysicsObject::addForce ( const dim::vector3df Force  )  [inline]
void sp::scene::BaseCollisionPhysicsObject::addVelocity ( const dim::vector3df Velocity  )  [inline]
void sp::scene::BaseCollisionPhysicsObject::applyFriction (  )  [protected]
void sp::scene::BaseCollisionPhysicsObject::arrestGravityForces (  ) 
dim::vector3df sp::scene::BaseCollisionPhysicsObject::getForce (  )  const [inline]
f32 sp::scene::BaseCollisionPhysicsObject::getFriction (  )  const [inline]

Returns the friction factor. By default 0.5.

dim::vector3df sp::scene::BaseCollisionPhysicsObject::getGravity (  )  const [inline]

Returns the gravity used for this object. By default (0, 0, 0).

f32 sp::scene::BaseCollisionPhysicsObject::getMass (  )  const [inline]

Returns the object's mass. By default 1.0.

dim::vector3df sp::scene::BaseCollisionPhysicsObject::getVelocity (  )  const [inline]
void sp::scene::BaseCollisionPhysicsObject::integrate ( CollisionNode Node  )  [protected]

Compute physics integration.

void sp::scene::BaseCollisionPhysicsObject::reduceVelocity ( const dim::vector3df FactorVec  ) 
void sp::scene::BaseCollisionPhysicsObject::setForce ( const dim::vector3df Force  )  [inline]
void sp::scene::BaseCollisionPhysicsObject::setFriction ( f32  Friction  )  [inline]

Sets the friction factor. This must be in the range [0.0 .. 1.0].

void sp::scene::BaseCollisionPhysicsObject::setGravity ( const dim::vector3df Gravity  )  [inline]

Sets the gravity force which will be applied to the object.

void sp::scene::BaseCollisionPhysicsObject::setMass ( f32  Mass  )  [inline]

Sets the object's mass. By default 1.0.

Parameters:
Mass,: Specifies the new mass. This value must be greater than 0.0.
void sp::scene::BaseCollisionPhysicsObject::setVelocity ( const dim::vector3df Velocity  )  [inline]

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