Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
#include <Body.h>
Public Member Functions | |
virtual void | applyAngularImpulse (const core::vector3d &angularImpulse) |
virtual void | applyForce (const core::vector3d &force) |
virtual void | applyLinearImpulse (const core::vector3d &linearImpulse) |
virtual void | applyTorque (const core::vector3d &torque) |
Body (const std::string &name, BodyData *bodyData) | |
Body (BodyData *bodyData) | |
f32 | getAngularDamping () const |
Returns the amount of angular damping on this body. | |
const core::vector3d | getAngularVelocity () |
Gets the angular velocity of the body. | |
BodyData * | getBodyData () const |
BodyType | getBodyType () |
f32 | getLinearDamping () const |
Returns the amount of linear damping on this body. | |
const core::vector3d | getLinearVelocity () |
Gets the linear velocity of the body. | |
f32 | getMass () const |
Returns the mass. | |
Material * | getMaterial () const |
f32 | getSleepiness () const |
Returns the body's sleepiness level. | |
bool | isEnabled () const |
Returns true if the Solid is enabled. | |
bool | isSleeping () const |
Returns true if the Solid is sleeping. | |
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 | setBodyData (const std::string &filename) |
Sets the body data this body will use. | |
void | setBodyData (BodyData *bodyData) |
void | setBodyType (BodyType type) |
virtual void | setEnabled (bool enabled) |
Sets whether the Solid can collide with other Solids and be physically simulated. | |
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. | |
virtual void | setMaterial (Material *material) |
virtual 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 | ~Body () |
Protected Member Functions | |
void | copyProperties () |
virtual void | initializeImpl () |
void | initProperties () |
virtual void | updateTransformImpl () |
Protected Attributes | |
f32 | mAngularDamping |
The amount of damping applied to the body's angular motion. | |
core::vector3d | mAngularImpulse |
core::vector3d | mAngularVelocity |
The body's angular velocity. | |
BodyData * | mBodyData |
BodyType | mBodyType |
Determines what type the body is. | |
bool | mEnabled |
Determines whether the body is enabled. | |
core::vector3d | mForce |
f32 | mLinearDamping |
The amount of damping applied to the body's linear motion. | |
core::vector3d | mLinearImpulse |
core::vector3d | mLinearVelocity |
The body's linear velocity in global coordinates. | |
f32 | mMass |
The total mass of the body. | |
Material * | mMaterial |
The material this body uses. | |
f32 | mSleepiness |
The body's sleepiness level which determines how fast falls asleep. | |
bool | mSleeping |
Determines whether the body is sleeping. | |
core::vector3d | mTorque |
Static Protected Attributes | |
static u32 | msNextGeneratedActorIndex = 0 |
Defines an actor in the physics world. Author: Kat'Oun version: 1.0
physics::Body::Body | ( | BodyData * | bodyData | ) |
physics::Body::Body | ( | const std::string & | name, |
BodyData * | bodyData | ||
) |
physics::Body::~Body | ( | ) | [virtual] |
References mBodyData, and engine::Object::removeDependency().
void physics::Body::applyAngularImpulse | ( | const core::vector3d & | angularImpulse | ) | [virtual] |
Applys an angular impulse to the body. This will cause a change in the angular momentum, and subsequently a change in the angular velocity.
References mAngularImpulse, and scene::Node::mOrientation.
void physics::Body::applyForce | ( | const core::vector3d & | force | ) | [virtual] |
Applies a force to the body. This applies a force with the direction and strength represented by the input vector.
References mForce, and scene::Node::mOrientation.
void physics::Body::applyLinearImpulse | ( | const core::vector3d & | linearImpulse | ) | [virtual] |
Applys a linear impulse to the body. In classical physics, momentum is related to velocity by where p is the Momentum, m is the Mass, and v is the Velocity. An impulse is simply a change in momentum.
References mLinearImpulse, and scene::Node::mOrientation.
void physics::Body::applyTorque | ( | const core::vector3d & | torque | ) | [virtual] |
Applies a torque on the body. In classical physics, torque is related to angular acceleration by where T is the Torque, I is the moment of inertia, and is angular acceleration.
References scene::Node::mOrientation, and mTorque.
void physics::Body::copyProperties | ( | ) | [protected] |
References physics::BodyData::getAngularDamping(), physics::BodyData::getAngularVelocity(), physics::BodyData::getBodyType(), physics::BodyData::getLinearDamping(), physics::BodyData::getLinearVelocity(), physics::BodyData::getMass(), physics::BodyData::getMaterial(), physics::BodyData::getSleepiness(), physics::BodyData::getSleeping(), mAngularDamping, mAngularVelocity, mBodyData, mBodyType, mLinearDamping, mLinearVelocity, mMass, mMaterial, mSleepiness, and mSleeping.
Referenced by Body(), and initializeImpl().
f32 physics::Body::getAngularDamping | ( | ) | const |
Returns the amount of angular damping on this body.
References mAngularDamping.
const core::vector3d physics::Body::getAngularVelocity | ( | ) |
Gets the angular velocity of the body.
References mAngularVelocity.
f32 physics::Body::getLinearDamping | ( | ) | const |
Returns the amount of linear damping on this body.
References mLinearDamping.
const core::vector3d physics::Body::getLinearVelocity | ( | ) |
Gets the linear velocity of the body.
References mLinearVelocity.
f32 physics::Body::getSleepiness | ( | ) | const |
Returns the body's sleepiness level.
References mSleepiness.
void physics::Body::initializeImpl | ( | ) | [protected, virtual] |
Reimplemented from engine::Object.
References copyProperties().
void physics::Body::initProperties | ( | ) | [protected] |
Reimplemented from scene::Node.
References mAngularImpulse, mEnabled, mForce, mLinearImpulse, mTorque, and core::vector3d::ORIGIN_3D.
Referenced by Body().
bool physics::Body::isEnabled | ( | ) | const |
Returns true if the Solid is enabled.
References mEnabled.
bool physics::Body::isSleeping | ( | ) | const |
Returns true if the Solid is sleeping.
References mSleeping.
void physics::Body::setAngularDamping | ( | f32 | angularDamping | ) |
Sets the amount of angular damping on this body.
References mAngularDamping.
void physics::Body::setAngularVelocity | ( | const core::vector3d & | velocity | ) |
Sets the angular velocity of the body.
References mAngularVelocity.
void physics::Body::setBodyData | ( | BodyData * | bodyData | ) |
void physics::Body::setBodyData | ( | const std::string & | filename | ) |
Sets the body data this body will use.
References engine::Object::addDependency(), resource::ResourceManager::getInstance(), mBodyData, engine::Object::removeDependency(), resource::RT_RESOURCE_BODY_DATA, and engine::Object::uninitialize().
void physics::Body::setEnabled | ( | bool | enabled | ) | [virtual] |
Sets whether the Solid can collide with other Solids and be physically simulated.
References mEnabled.
void physics::Body::setLinearDamping | ( | f32 | linearDamping | ) |
Sets the amount of linear damping on this body.
References mLinearDamping.
void physics::Body::setLinearVelocity | ( | const core::vector3d & | velocity | ) |
Sets the linear velocity of the body.
References mLinearVelocity.
void physics::Body::setMaterial | ( | const std::string & | filename | ) | [virtual] |
Sets the name of the material which this body will use.
References physics::PhysicsManager::createMaterial(), physics::PhysicsManager::getInstance(), and mMaterial.
void physics::Body::setSleepiness | ( | f32 | sleepiness | ) |
Sets the Solid's sleepiness level.
References mSleepiness.
void physics::Body::setSleeping | ( | bool | sleeping | ) |
Sets whether the body is sleeping.
References mSleeping.
void physics::Body::updateTransformImpl | ( | ) | [protected, virtual] |
Reimplemented from scene::Node.
f32 physics::Body::mAngularDamping [protected] |
The amount of damping applied to the body's angular motion.
Referenced by copyProperties(), getAngularDamping(), and setAngularDamping().
core::vector3d physics::Body::mAngularImpulse [protected] |
Referenced by applyAngularImpulse(), and initProperties().
core::vector3d physics::Body::mAngularVelocity [protected] |
The body's angular velocity.
Referenced by copyProperties(), getAngularVelocity(), and setAngularVelocity().
BodyData* physics::Body::mBodyData [protected] |
Referenced by Body(), copyProperties(), getBodyData(), setBodyData(), and ~Body().
BodyType physics::Body::mBodyType [protected] |
Determines what type the body is.
Referenced by copyProperties(), getBodyType(), and setBodyType().
bool physics::Body::mEnabled [protected] |
Determines whether the body is enabled.
Referenced by initProperties(), isEnabled(), and setEnabled().
core::vector3d physics::Body::mForce [protected] |
Referenced by applyForce(), and initProperties().
f32 physics::Body::mLinearDamping [protected] |
The amount of damping applied to the body's linear motion.
Referenced by copyProperties(), getLinearDamping(), and setLinearDamping().
core::vector3d physics::Body::mLinearImpulse [protected] |
Referenced by applyLinearImpulse(), and initProperties().
core::vector3d physics::Body::mLinearVelocity [protected] |
The body's linear velocity in global coordinates.
Referenced by copyProperties(), getLinearVelocity(), and setLinearVelocity().
f32 physics::Body::mMass [protected] |
The total mass of the body.
Referenced by copyProperties(), getMass(), and setMass().
Material* physics::Body::mMaterial [protected] |
The material this body uses.
Referenced by copyProperties(), getMaterial(), and setMaterial().
f32 physics::Body::mSleepiness [protected] |
The body's sleepiness level which determines how fast falls asleep.
Referenced by copyProperties(), getSleepiness(), and setSleepiness().
bool physics::Body::mSleeping [protected] |
Determines whether the body is sleeping.
Referenced by copyProperties(), isSleeping(), and setSleeping().
u32 physics::Body::msNextGeneratedActorIndex = 0 [static, protected] |
core::vector3d physics::Body::mTorque [protected] |
Referenced by applyTorque(), and initProperties().
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:07 by
Doxygen
(1.7.4)
|