|
coastline 0.0.4
|
A rigid body: the body of a vehicle or of one of its wheels. More...
#include <rigidbody.h>

Public Attributes | |
| u32 | unreconstructed0 |
| struct RigidBody * | wheels [4] |
| u32 | unreconstructed14 |
| RigidBodyForce * | forces |
| s32 | kind |
| Vec3f | size |
| f32 | mass |
| f32 | inertia [3][3] |
| f32 | inverseInertia [3][3] |
| RigidBodyState | state |
| f32 | orientation [4][4] |
| Vec3f | force |
| Vec3f | torque |
| RigidBodyState | stepStates [2] |
| struct TrackTriangle * | ground |
| u8 | surface |
| union { | |
| Vec3f groundNormal | |
| f32 groundNormalComponents [3] | |
| }; | |
| f32 | groundOffset |
| s32 | contactFrames |
| f32 | springRate |
| f32 | damping |
| f32 | steerAngle |
| f32 | spinRate |
| f32 | radius |
| f32 | drive |
| f32 | brake |
| f32 | rollAngle |
| f32 | suspension |
| Vec3f | boxSize |
| f32 | boxCenterZ |
| Vec3f | impactPoint |
| s32 | uprightFrames |
| u8 | impactSpeed |
| u8 | tireType |
| u8 | vehicleImpactVolume |
| u8 | impactVolume |
| u8 | framesSinceImpact |
| u8 | framesSinceVehicleImpact |
| u8 | unreconstructed202 |
| u8 | landed |
| u8 | skidding |
A rigid body: the body of a vehicle or of one of its wheels.
A wheel uses the ground, steering, spin and suspension fields, the body of a vehicle the springs, box and collision fields.
| u32 RigidBody::unreconstructed0 |
Of unknown use; cleared on setup.
| struct RigidBody* RigidBody::wheels[4] |
The wheel bodies of the body of a vehicle, the rear two first and the front two after.
| u32 RigidBody::unreconstructed14 |
Of unknown use; cleared on setup.
| RigidBodyForce* RigidBody::forces |
The list of forces applied at each step.
| s32 RigidBody::kind |
The kind of body, a RIGID_BODY_ value.
| Vec3f RigidBody::size |
The sides of the box the inertia is computed from.
| f32 RigidBody::mass |
The mass, 1000 for the body of a vehicle and 0 for a wheel.
| f32 RigidBody::inertia[3][3] |
The inertia tensor in the frame of the body.
| f32 RigidBody::inverseInertia[3][3] |
The inverse inertia tensor; setup computes only its diagonal.
| RigidBodyState RigidBody::state |
The motion of the body at the current step.
| f32 RigidBody::orientation[4][4] |
The matrix of the orientation and position of the state.
| Vec3f RigidBody::force |
The sum of the forces of a step, then the linear acceleration it gives.
| Vec3f RigidBody::torque |
The sum of the torques of a step, then the angular acceleration it gives.
| RigidBodyState RigidBody::stepStates[2] |
The states of the steps of the integration.
| struct TrackTriangle* RigidBody::ground |
The triangle of the track under a wheel, or NULL.
| u8 RigidBody::surface |
The surface of the ground triangle, a TRACK_SURFACE_ value.
| Vec3f RigidBody::groundNormal |
The normal of the plane of the ground triangle.
| f32 RigidBody::groundNormalComponents[3] |
The normal components for indexed wheel physics.
| union { ... } RigidBody |
| f32 RigidBody::groundOffset |
The offset of the plane of the ground triangle along its normal.
| s32 RigidBody::contactFrames |
The frames a wheel has touched the ground, up to 100, or 0 off the ground.
| f32 RigidBody::springRate |
The rate of the suspension springs of the body of a vehicle, (4 times the suspension stiffness plus 20) times 16000.
| f32 RigidBody::damping |
The damping of the suspension of the body of a vehicle, -3000.
| f32 RigidBody::steerAngle |
The angle a front wheel is steered to, in radians.
| f32 RigidBody::spinRate |
How fast a wheel spins, in radians a second.
| f32 RigidBody::radius |
The radius of a wheel, 0.5 from setup.
| f32 RigidBody::drive |
The drive the throttle gives a wheel.
| f32 RigidBody::brake |
The braking of a wheel.
| f32 RigidBody::rollAngle |
How far a wheel has turned, in degrees; how far the body of a vehicle leans in a skid.
| f32 RigidBody::suspension |
How far below the body of a vehicle the ground is under a wheel.
| Vec3f RigidBody::boxSize |
The box of the body of a vehicle the track collides with.
| f32 RigidBody::boxCenterZ |
The height of the middle of the collision box.
| Vec3f RigidBody::impactPoint |
Where the last hard hit was.
| s32 RigidBody::uprightFrames |
35 while the vehicle is upright, then counting down each step it is upside down.
| u8 RigidBody::impactSpeed |
The recorded speed of the last hit.
| u8 RigidBody::tireType |
The tyres of the car, from 1; a higher type has less grip.
| u8 RigidBody::vehicleImpactVolume |
The loudest hit of another vehicle since the sounds played.
| u8 RigidBody::impactVolume |
The loudest hit of the track since the sounds played.
| u8 RigidBody::framesSinceImpact |
The steps since the track was hit, up to 40.
| u8 RigidBody::framesSinceVehicleImpact |
The steps since another vehicle was hit.
| u8 RigidBody::unreconstructed202 |
Of unknown use; the vehicle sounds clear it while no effect other than a skid or a roll plays.
| u8 RigidBody::landed |
Set to 0x80 when a wheel lands, then cleared when the sound plays.
| u8 RigidBody::skidding |
Set to 0x80 when the tyres skid.