#include <_src_physics_physics_aircraft.hh>
Public Types | |
| enum | eTurning { eNotTurning, eTurningLeft, eTurningRight } |
Public Member Functions | |
| AircraftPhysics (SafePtr< Aircraft > aircraft, const AircraftSpecs &specs) | |
| ~AircraftPhysics () | |
| void | Enable (bool enable) |
| bool | IfEnabled (void) |
| void | Reset (void) |
| void | Tick (const Milliseconds timeElapsed) |
| void | SetSpeed (const Speed speed) |
| Speed | ComputeSpeed (void) |
| Speed | ComputeMaxSpeed (void) |
| Velocity | ComputeVelocity (void) |
| Speed | ComputeStallSpeed (void) |
| Speed | ComputeLiftoffSpeed (void) |
| void | SetThrust (const Newton1 thrust) |
| Newton1 | ComputeMaxThrust (void) |
| void | EnableBrakes (const bool enable) |
| bool | IfBrakes (void) |
| bool | IfWheelBrakes (void) |
| bool | IfAirBrakes (void) |
| Newton | ComputeThrustForce (void) |
| Newton | ComputeDragForce (void) |
| Newton | ComputeLiftForce (void) |
| Newton | ComputeWeightForce (void) |
| Degree | ComputeAngleOfAttack (const bool ifVelocity) |
| Degree | ComputeAngleOfAttack (void) |
| Degree | ComputeRollRate (void) |
| Degree | ComputePitchRate (void) |
| Degree | ComputeYawRate (void) |
| eTurning | ComputeTurningDir (void) |
| bool | IfTurning (void) |
| bool | IfStall (void) |
| fp | ComputeStall (void) |
Private Member Functions | |
| bool | AnimateAircraft (const Milliseconds timeElapsed) |
| bool | AnimateAircraftLanding (const Milliseconds timeElapsed) |
| bool | IfVelocity (void) |
| bool | IfForwardVelocity (const Matrix &aircraftMatrix) |
| bool | IfDownwardVelocity (void) |
| Vector3 | AircraftAxisThrust (const Matrix &m) |
| Vector3 | AircraftAxisLift (const Matrix &m) |
| fp | ComputeRotationFactor (void) |
Private Attributes | |
| CLASS_CONST int | THRUST_DIR = -1 |
| multiplier/sign | |
| CLASS_CONST int | LIFT_DIR = 1 |
| multiplier/sign | |
| bool | mEnable |
| enable this instance | |
| SafePtr< Aircraft > | mAircraft |
| (cannot be shptr!!) the Object this AircraftPhysics instance controls | |
| AircraftSpecs | mSpecs |
| specifications/characteristics of a type of Aircraft | |
| Milliseconds | mPrevTick |
| MotionSpace | mWorld |
| motion in world space | |
| Newton1 | mThrustMag |
| magnitude (current thrust) | |
| bool | mBrakes |
Classes | |
| struct | MotionSpace |
| Defines motion in a coordinate system. More... | |
Thrust/drag/lift: The AircraftPhysics class doesn't need to transform thrust/drag/lift (excluding weight). These force vectors are relative to a Aircraft and therefore exist in local space. Ultimately these are passed to Aircraft::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.
Compute() methods: Many methods that just get a value are named Compute() since ideally they would compute a physical parameter.
Aircraft state enums: The state enums (flying, landing, etc) are kept in the Aircraft class. Both Aircraft and AircraftPhysics can affect the state.
| physics::AircraftPhysics::AircraftPhysics | ( | SafePtr< Aircraft > | aircraft, | |
| const AircraftSpecs & | specs | |||
| ) |
| physics::AircraftPhysics::~AircraftPhysics | ( | ) |
| void physics::AircraftPhysics::Enable | ( | bool | enable | ) |
Enable physics.
| bool physics::AircraftPhysics::IfEnabled | ( | void | ) |
If physics is enabled.
| void physics::AircraftPhysics::Reset | ( | void | ) |
Called when Aircraft is reset.
| void physics::AircraftPhysics::Tick | ( | const Milliseconds | timeElapsed | ) |
| bool physics::AircraftPhysics::AnimateAircraft | ( | const Milliseconds | timeElapsed | ) | [private] |
| bool physics::AircraftPhysics::AnimateAircraftLanding | ( | const Milliseconds | timeElapsed | ) | [private] |
| void physics::AircraftPhysics::SetSpeed | ( | const Speed | speed | ) |
Set speed.
| Speed physics::AircraftPhysics::ComputeSpeed | ( | void | ) |
Compute speed.
| Speed physics::AircraftPhysics::ComputeMaxSpeed | ( | void | ) |
Compute maximum speed of aircraft at current altitude.
| Velocity physics::AircraftPhysics::ComputeVelocity | ( | void | ) | [inline] |
| Speed physics::AircraftPhysics::ComputeStallSpeed | ( | void | ) | [inline] |
| Speed physics::AircraftPhysics::ComputeLiftoffSpeed | ( | void | ) | [inline] |
| bool physics::AircraftPhysics::IfVelocity | ( | void | ) | [private] |
| bool physics::AircraftPhysics::IfForwardVelocity | ( | const Matrix & | aircraftMatrix | ) | [private] |
| bool physics::AircraftPhysics::IfDownwardVelocity | ( | void | ) | [private] |
| void physics::AircraftPhysics::SetThrust | ( | const Newton1 | thrustMag | ) |
Set current thrust (magnitude).
| Newton1 physics::AircraftPhysics::ComputeMaxThrust | ( | void | ) | [inline] |
| void physics::AircraftPhysics::EnableBrakes | ( | const bool | enable | ) | [inline] |
| bool physics::AircraftPhysics::IfBrakes | ( | void | ) | [inline] |
| bool physics::AircraftPhysics::IfWheelBrakes | ( | void | ) |
| bool physics::AircraftPhysics::IfAirBrakes | ( | void | ) | [inline] |
| Newton physics::AircraftPhysics::ComputeThrustForce | ( | void | ) | [inline] |
| Newton physics::AircraftPhysics::ComputeDragForce | ( | void | ) | [inline] |
| Newton physics::AircraftPhysics::ComputeLiftForce | ( | void | ) | [inline] |
| Newton physics::AircraftPhysics::ComputeWeightForce | ( | void | ) | [inline] |
| Vector3 physics::AircraftPhysics::AircraftAxisThrust | ( | const Matrix & | m | ) | [private] |
| Vector3 physics::AircraftPhysics::AircraftAxisLift | ( | const Matrix & | m | ) | [private] |
| Degree physics::AircraftPhysics::ComputeAngleOfAttack | ( | const bool | ifVelocity | ) |
| Degree physics::AircraftPhysics::ComputeAngleOfAttack | ( | void | ) | [inline] |
| Degree physics::AircraftPhysics::ComputeRollRate | ( | void | ) |
Compute rate of roll,pitch,yaw. Rate is affected by speed.
| Degree physics::AircraftPhysics::ComputePitchRate | ( | void | ) |
| Degree physics::AircraftPhysics::ComputeYawRate | ( | void | ) |
| fp physics::AircraftPhysics::ComputeRotationFactor | ( | void | ) | [private] |
When aircraft is moving slowly, control surfaces barely work. Known deficiency: Airspeed's direction, not just magnitude, should be a factor.
| AircraftPhysics::eTurning physics::AircraftPhysics::ComputeTurningDir | ( | void | ) |
Determine if the user seems to be doing a normal banked turn.
| bool physics::AircraftPhysics::IfTurning | ( | void | ) |
| bool physics::AircraftPhysics::IfStall | ( | void | ) |
| fp physics::AircraftPhysics::ComputeStall | ( | void | ) |
Compute fraction indicating the amount of stalling. Might return > 1.0 for severe stall.
CLASS_CONST int physics::AircraftPhysics::THRUST_DIR = -1 [private] |
multiplier/sign
CLASS_CONST int physics::AircraftPhysics::LIFT_DIR = 1 [private] |
multiplier/sign
bool physics::AircraftPhysics::mEnable [private] |
enable this instance
Reference-counting problem: AircraftPhysics is a member of Aircraft. A reference-counted class cannot have any reference to itself else it would never be destroyed. Therefore, AircraftPhysics has a SafePtr<Aircraft> back to Aircraft.
SafePtr<Aircraft> physics::AircraftPhysics::mAircraft [private] |
(cannot be shptr!!) the Object this AircraftPhysics instance controls
specifications/characteristics of a type of Aircraft
Milliseconds physics::AircraftPhysics::mPrevTick [private] |
MotionSpace physics::AircraftPhysics::mWorld [private] |
motion in world space
Newton1 physics::AircraftPhysics::mThrustMag [private] |
magnitude (current thrust)
bool physics::AircraftPhysics::mBrakes [private] |
Palomino Flight Simulator documents generated by doxygen 1.5.6 on Tue Sep 28 11:37:50 2010