Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
|
#include <PhysicsObject.h>
Public Member Functions | |
PhysicsObject () | |
virtual | ~PhysicsObject () |
virtual void | Update (float dt)=0 |
virtual float | GetDragArea ()=0 |
virtual float | GetDragCoefficient ()=0 |
virtual float | GetLiftCoefficient ()=0 |
virtual float | GetVolumeUnderHeight (float height)=0 |
virtual void | SetMass (const float m) |
virtual float | GetMass () const |
virtual float | GetMassInv () const |
virtual float | GetVolume () const |
virtual void | SetLift (const float lVal, const Vector3D &lVec) |
virtual float | GetLift () const |
virtual Vector3D | GetLiftVec () const |
virtual float | GetSpeed () const |
virtual Vector3D | GetOldPosition () const |
virtual void | SetPosition (const Vector3D &pos) |
virtual Vector3D | GetPosition () |
virtual void | SetForce (const Vector3D &f) |
virtual Vector3D | GetForce () const |
virtual void | AddForce (const Vector3D &f) |
virtual void | SetVelocity (const Vector3D &v) |
virtual Vector3D | GetVelocity () const |
virtual void | AddVelocity (const Vector3D &v) |
virtual Vector3D | GetAcceleration () const |
virtual Matrix4x4 | GetTransformation ()=0 |
Protected Attributes | |
float | mMass |
float | mMassInv |
float | mVolume |
float | mLift |
float | mSpeed |
Vector3D | mOldPosition |
Vector3D | mPosition |
Vector3D | mForce |
Vector3D | mVelocity |
Vector3D | mAcceleration |
Vector3D | mLiftVector |
Base class for a body with mass, volume, acceleration, velocity, force, lift
|
inline |
PhysicsObject constructor
|
inlinevirtual |
PhysicsObject destructor
|
inlinevirtual |
Adds the input force to the current object forces.
|
inlinevirtual |
Adds the input to the object's current velocity.
|
inlinevirtual |
Returns the object's current acceleration.
|
pure virtual |
Implementation specific drag area;
Implemented in Ult::PointMass.
|
pure virtual |
Implementation specificy drag coefficient.
Implemented in Ult::PointMass.
|
inlinevirtual |
Returns the current sum of object forces.
|
inlinevirtual |
Returns the object's lift.
|
pure virtual |
Implementation specific lift coefficient.
Implemented in Ult::PointMass.
|
inlinevirtual |
Returns the object's lift vector.
|
inlinevirtual |
Returns the object's mass
|
inlinevirtual |
Returns the object's inverse mass.
|
inlinevirtual |
Returns the object's position as of the previous Update.
|
inlinevirtual |
Returns the object's current position.
|
inlinevirtual |
Returns the object's speed.
|
pure virtual |
Returns a transformation of the object's current position/rotation. Must be implemented by the inheriting class.
Implemented in Ult::PointMass.
|
inlinevirtual |
Returns the object's current velocity.
|
inlinevirtual |
Returns the object's volume.
|
pure virtual |
Implementation specific volume - for liquid/water simulation.
Implemented in Ult::PointMass.
|
inlinevirtual |
Sets the sum of forces on the the object.
|
inlinevirtual |
Set the object's life and lift vector.
|
inlinevirtual |
Set the object's mass and inverse mass. Assumes mass is not 0.
|
inlinevirtual |
Sets the obect's current position.
|
inlinevirtual |
Sets the object's current velocity.
|
pure virtual |
Update the object for the input delta time (in seconds). Must be implemented by the inheriting class.
Implemented in Ult::PointMass.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |