Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
Public Member Functions | Private Member Functions | Private Attributes | Friends
physics::BodyData Class Reference

#include <BodyData.h>

Inheritance diagram for physics::BodyData:
resource::Resource engine::Object

List of all members.

Public Member Functions

void addShape (Shape *shape)
 BodyData (const std::string &name, resource::Serializer *serializer)
f32 getAngularDamping ()
 Gets the amount of angular damping on this body.
const core::vector3dgetAngularVelocity () const
 Gets the angular velocity of the body.
const BodyTypegetBodyType () const
 Gets what type the Body is: static, dynamic or kinetic.
f32 getLinearDamping ()
 Gets the amount of linear damping on this body.
const core::vector3dgetLinearVelocity () const
 Gets the linear velocity of the body.
f32 getMass ()
 Gets the mass.
MaterialgetMaterial ()
std::list< Shape * > & getShapes ()
f32 getSleepiness ()
 Gets the Solid's sleepiness level.
bool getSleeping ()
 Gets whether the body is sleeping.
void removeAllShapes ()
 Removes all texture unit.
void setAngularDamping (f32 angularDamping)
 Sets the amount of angular damping on this body.
void setAngularVelocity (const core::vector3d &velocity)
 Sets the angular velocity of the body.
void setBodyType (BodyType type)
 Sets what type the Body should be: static, dynamic or kinetic.
void setLinearDamping (f32 linearDamping)
 Sets the amount of linear damping on this body.
void setLinearVelocity (const core::vector3d &velocity)
 Sets the linear velocity of the body.
void setMass (f32 mass)
 Sets the mass.
void setMaterial (const std::string &filename)
 Sets the name of the material which this body will use.
void setSleepiness (f32 sleepiness)
 Sets the Solid's sleepiness level.
void setSleeping (bool sleeping)
 Sets whether the body is sleeping.
virtual ~BodyData ()

Private Member Functions

void initProperties ()
void unloadImpl ()

Private Attributes

f32 mAngularDamping
 The amount of damping applied to the body's angular motion.
core::vector3d mAngularVelocity
 The body's angular velocity.
BodyType mBodyType
 Determines what type the body is.
f32 mLinearDamping
 The amount of damping applied to the body's linear motion.
core::vector3d mLinearVelocity
 The body's linear velocity in global coordinates.
f32 mMass
 The total mass of the body.
MaterialmMaterial
 The material this body uses.
std::list< Shape * > mShapes
f32 mSleepiness
 The body's sleepiness level which determines how fast falls asleep.
bool mSleeping
 Determines whether the body is sleeping.

Friends

class Body

Detailed Description

Defines a body resource. Author: Kat'Oun version: 1.0


Constructor & Destructor Documentation

physics::BodyData::BodyData ( const std::string &  name,
resource::Serializer serializer 
)
physics::BodyData::~BodyData ( ) [virtual]

Member Function Documentation

void physics::BodyData::addShape ( Shape shape)

References mShapes.

f32 physics::BodyData::getAngularDamping ( )

Gets the amount of angular damping on this body.

References mAngularDamping.

Referenced by physics::Body::copyProperties().

const core::vector3d & physics::BodyData::getAngularVelocity ( ) const

Gets the angular velocity of the body.

References mAngularVelocity.

Referenced by physics::Body::copyProperties().

const BodyType & physics::BodyData::getBodyType ( ) const

Gets what type the Body is: static, dynamic or kinetic.

References mBodyType.

Referenced by physics::Body::copyProperties().

f32 physics::BodyData::getLinearDamping ( )

Gets the amount of linear damping on this body.

References mLinearDamping.

Referenced by physics::Body::copyProperties().

const core::vector3d & physics::BodyData::getLinearVelocity ( ) const

Gets the linear velocity of the body.

References mLinearVelocity.

Referenced by physics::Body::copyProperties().

f32 physics::BodyData::getMass ( )

Gets the mass.

References mMass.

Referenced by physics::Body::copyProperties().

Material * physics::BodyData::getMaterial ( )

References mMaterial.

Referenced by physics::Body::copyProperties().

std::list< Shape * > & physics::BodyData::getShapes ( )

References mShapes.

f32 physics::BodyData::getSleepiness ( )

Gets the Solid's sleepiness level.

References mSleepiness.

Referenced by physics::Body::copyProperties().

bool physics::BodyData::getSleeping ( )

Gets whether the body is sleeping.

References mSleeping.

Referenced by physics::Body::copyProperties().

void physics::BodyData::initProperties ( ) [private]
void physics::BodyData::removeAllShapes ( )

Removes all texture unit.

References mShapes.

Referenced by unloadImpl().

void physics::BodyData::setAngularDamping ( f32  angularDamping)

Sets the amount of angular damping on this body.

References mAngularDamping.

void physics::BodyData::setAngularVelocity ( const core::vector3d velocity)

Sets the angular velocity of the body.

References mAngularVelocity.

void physics::BodyData::setBodyType ( BodyType  type)

Sets what type the Body should be: static, dynamic or kinetic.

References mBodyType.

void physics::BodyData::setLinearDamping ( f32  linearDamping)

Sets the amount of linear damping on this body.

References mLinearDamping.

void physics::BodyData::setLinearVelocity ( const core::vector3d velocity)

Sets the linear velocity of the body.

References mLinearVelocity.

void physics::BodyData::setMass ( f32  mass)

Sets the mass.

References mMass.

void physics::BodyData::setMaterial ( const std::string &  filename)

Sets the name of the material which this body will use.

References physics::PhysicsManager::createMaterial(), physics::PhysicsManager::getInstance(), and mMaterial.

void physics::BodyData::setSleepiness ( f32  sleepiness)

Sets the Solid's sleepiness level.

References mSleepiness.

void physics::BodyData::setSleeping ( bool  sleeping)

Sets whether the body is sleeping.

References mSleeping.

void physics::BodyData::unloadImpl ( ) [private, virtual]

Friends And Related Function Documentation

friend class Body [friend]

Member Data Documentation

The amount of damping applied to the body's angular motion.

Referenced by getAngularDamping(), initProperties(), setAngularDamping(), and unloadImpl().

The body's angular velocity.

Referenced by getAngularVelocity(), initProperties(), setAngularVelocity(), and unloadImpl().

Determines what type the body is.

Referenced by getBodyType(), initProperties(), setBodyType(), and unloadImpl().

The amount of damping applied to the body's linear motion.

Referenced by getLinearDamping(), initProperties(), setLinearDamping(), and unloadImpl().

The body's linear velocity in global coordinates.

Referenced by getLinearVelocity(), initProperties(), setLinearVelocity(), and unloadImpl().

The total mass of the body.

Referenced by getMass(), initProperties(), setMass(), and unloadImpl().

The material this body uses.

Referenced by getMaterial(), initProperties(), setMaterial(), and unloadImpl().

std::list<Shape*> physics::BodyData::mShapes [private]

The body's sleepiness level which determines how fast falls asleep.

Referenced by getSleepiness(), initProperties(), setSleepiness(), and unloadImpl().

Determines whether the body is sleeping.

Referenced by getSleeping(), initProperties(), setSleeping(), and unloadImpl().


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

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:07 by Doxygen (1.7.4)