#include <mod_base_physics.hh>
Public Member Functions | |
| Physics (SharedPtr< Dyna > dyna) | |
| ~Physics () | |
| CLASS_METHOD void | EnableAll (bool enable) |
| void | Enable (bool enable) |
| void | SetEyeCraft (void) |
| void | Reset (void) |
| void | MoveObject (void) |
| Vector3 | ComputeSpeed (void) |
| fp | ComputeSpeedMach (void) |
| fp | GetMaxMach (void) |
| bool | IfStall (void) |
| fp | ComputeStall (void) |
| void | SetSpeedMach (const fp mach) |
| void | SetThrust (const Vector3 &thrust) |
| void | SetMaxThrust (const Vector3 &maxThrust) |
| void | SetMaxSpeed (const Vector3 &maxSpeed) |
| void | SetMaxMach (const fp maxMach) |
| void | SetStallMach (const fp stallMach) |
Private Member Functions | |
| fp | Mach2Speed (const fp mach) |
| fp | Speed2Mach (const fp speed) |
Private Attributes | |
| CLASS_VAR bool | msEnable = true |
| all instances, to disable moving F-14 in the demo mode | |
| bool | mEnable |
| this instance | |
| shptr< Dyna > | mDyna |
| the Object this Physics instance controls | |
| fp | mStepDir |
| -1 or +1 | |
| fp | mUpDir |
| -1 or +1 | |
| fp | mWeightDir |
| -1 or +1 | |
| Vector3 | mThrust |
| acceleration vector | |
| Vector3 | mDrag |
| acceleration vector | |
| Vector3 | mLift |
| acceleration vector | |
| Vector3 | mWeight |
| acceleration vector | |
| Vector3 | mSpeed |
| worldCoord / timerTick | |
| Vector3 | mSpeedStall |
| Vector3 | mMaxThrust |
| Vector3 | mMaxSpeed |
| fp | mMaxMach |
Thrust/drag/lift: The Physics class doesn't need to transform thrust/drag/lift (excluding weight). These force vectors are relative to a Craft and therefore exist in local space. Ultimately these are passed to Dyna::Translate(Vector3) which transforms them.
Weight: The direction of the weight vector is fixed/absolute of course. Weight acceleration can be applied using Object::GetPosition()/SetPosition() to directly add weight vector in terms of a world vertex.
| mod_base::Physics::Physics | ( | SharedPtr< Dyna > | dyna | ) |
| mod_base::Physics::~Physics | ( | ) |
| void mod_base::Physics::EnableAll | ( | bool | enable | ) |
Enable all instances or this instance.
| void mod_base::Physics::Enable | ( | bool | enable | ) |
| void mod_base::Physics::SetEyeCraft | ( | void | ) |
| void mod_base::Physics::Reset | ( | void | ) |
Called when Craft is reset.
| void mod_base::Physics::MoveObject | ( | void | ) |
Move Object in World Space according to net force vectors. Manipulates Object using Object interface.
| Vector3 mod_base::Physics::ComputeSpeed | ( | void | ) |
Compute speed. Really return mSpeed computed prior.
| fp mod_base::Physics::ComputeSpeedMach | ( | void | ) |
| fp mod_base::Physics::GetMaxMach | ( | void | ) |
| bool mod_base::Physics::IfStall | ( | void | ) |
| fp mod_base::Physics::ComputeStall | ( | void | ) |
Compute fraction indicating the amount of stalling (1.0 is total stall).
| void mod_base::Physics::SetSpeedMach | ( | const fp | mach | ) |
Setters.
| void mod_base::Physics::SetThrust | ( | const Vector3 & | thrust | ) |
| void mod_base::Physics::SetMaxThrust | ( | const Vector3 & | maxThrust | ) |
| void mod_base::Physics::SetMaxSpeed | ( | const Vector3 & | maxSpeed | ) |
| void mod_base::Physics::SetMaxMach | ( | const fp | maxMach | ) |
| void mod_base::Physics::SetStallMach | ( | const fp | stallMach | ) |
Convert between artificial speed and Mach.
bool mod_base::Physics::msEnable = true [private] |
all instances, to disable moving F-14 in the demo mode
bool mod_base::Physics::mEnable [private] |
this instance
shptr<Dyna> mod_base::Physics::mDyna [private] |
the Object this Physics instance controls
fp mod_base::Physics::mStepDir [private] |
-1 or +1
fp mod_base::Physics::mUpDir [private] |
-1 or +1
fp mod_base::Physics::mWeightDir [private] |
-1 or +1
Vector3 mod_base::Physics::mThrust [private] |
acceleration vector
Vector3 mod_base::Physics::mDrag [private] |
acceleration vector
Vector3 mod_base::Physics::mLift [private] |
acceleration vector
Vector3 mod_base::Physics::mWeight [private] |
acceleration vector
Vector3 mod_base::Physics::mSpeed [private] |
worldCoord / timerTick
Vector3 mod_base::Physics::mSpeedStall [private] |
Vector3 mod_base::Physics::mMaxThrust [private] |
Vector3 mod_base::Physics::mMaxSpeed [private] |
fp mod_base::Physics::mMaxMach [private] |
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:30 2007