|
NcEngine
|
A vehicle that can be added to a RigidBody. More...
#include <Vehicle.h>
Public Member Functions | |
| Vehicle (VehicleInfo &&info, VehicleHandle handle, VehicleId id) | |
Vehicle Input | |
Throttle values range from [-1, 1] indicating reverse/forward direction and throttle amount. Steering values range from [-1, 1] indicating left/right steering angle and amount. Brake values range from [0, 1] indicating brake amount. | |
| auto | GetThrottle () const -> float |
| auto | GetSteering () const -> float |
| auto | GetBrake () const -> float |
| auto | GetHandBrake () const -> float |
| void | SetThrottle (float throttle) |
| void | SetSteering (float steering) |
| void | SetBrake (float brake) |
| void | SetHandBrake (float brake) |
| void | SetInput (float throttle, float steering, float brake, float handBrake) |
| void | HardStopEngine () |
Vehicle Settings | |
| |
| auto | GetVehicleInfo () const -> const VehicleInfo & |
| auto | GetOrientation () const -> const VehicleOrientation & |
| auto | GetEngine () -> VehicleEngine & |
| auto | GetEngine () const -> const VehicleEngine & |
| auto | GetTransmission () -> VehicleTransmission & |
| auto | GetTransmission () const -> const VehicleTransmission & |
| auto | GetWheelAssemblies () -> std::span< WheelAssembly > |
| auto | GetWheelAssemblies () const -> std::span< const WheelAssembly > |
| auto | GetAssemblyCount () const -> size_t |
| auto | GetWheelCount () const -> size_t |
| auto | GetDifferentialCount () const -> size_t |
Commit Vehicle Settings Modifications | |
Notify the physics engine that vehicle settings have been modified and internal state should be rebuilt. Notification isn't necessary when updating an animation target. The following restrictions apply:
| |
| void | SetMaxRollAngle (float angle) |
| void | NotifyModifyEngine () |
| void | NotifyModifyTransmission () |
| void | NotifyModifyWheelAssembly (size_t assemblyIndex) |
| void | AddWheelAssembly (const WheelAssembly &info) |
| void | RemoveWheelAssembly (size_t assemblyIndex) |
Vehicle Enable State | |
| void | Enable (bool enabled) |
| auto | IsEnabled () const -> bool |
Unique Identifiers | |
| auto | GetId () const -> VehicleId |
| auto | GetHandle () const -> VehicleHandle |
A vehicle that can be added to a RigidBody.