Public Member Functions |
|
virtual TypeHandle | force_init_type () |
| float | get_axle_speed () const |
| | Retrieves the current axle rotation speed.
|
| float | get_brake_torque () const |
| | Must be nonnegative.
|
| float | get_inverse_wheel_mass () const |
| | Returns the inverse mass of the wheel.
|
| float | get_motor_torque () const |
| | Retrieves the sum engine torque on the wheel axle.
|
| float | get_radius () const |
| | Returns the radius of the sphere.
|
| float | get_steer_angle () const |
| | Retrieves the steering angle, around shape Y axis.
|
| float | get_steer_angle_rad () const |
| | Retrieves the steering angle, around shape Y axis.
|
| float | get_suspension_travel () const |
| | Returns the suspension travel.
|
|
virtual TypeHandle | get_type () const |
| bool | get_wheel_flag (PhysxWheelShapeFlag flag) const |
| | Returns the value of the specified wheel shape flag.
|
|
void | link (NxShape *shapePtr) |
|
NxShape * | ptr () const |
| void | save_to_desc (PhysxWheelShapeDesc &shapeDesc) const |
| | Saves the state of the shape object to a descriptor.
|
| void | set_axle_speed (float speed) |
| | Set the current axle rotation speed.
|
| void | set_brake_torque (float torque) |
| | Must be nonnegative.
|
| void | set_inverse_wheel_mass (float invMass) |
| | Set the inverse mass of the wheel.
|
| void | set_motor_torque (float torque) |
| | Set the sum engine torque on the wheel axle.
|
| void | set_radius (float radius) |
| | Sets the sphere radius.
|
| void | set_steer_angle (float angle) |
| | Set the steering angle, around shape Y axis.
|
| void | set_steer_angle_rad (float angle) |
| | Set the steering angle, around shape Y axis.
|
| void | set_suspension (const PhysxSpringDesc &spring) |
| | Set the data intended for car wheel suspension effects.
|
| void | set_suspension_travel (float travel) |
| | Set the maximum extension distance of suspension along shape's -Y axis.
|
| void | set_wheel_flag (PhysxWheelShapeFlag flag, bool value) |
| | Turns the specified wheel shape flag on or off.
|
|
void | unlink () |
Static Public Member Functions |
|
static TypeHandle | get_class_type () |
| static void | init_type () |
| | This function is declared non-inline to work around a compiler bug in g++ 2.96.
|
A special shape used for simulating a car wheel.
The -Y axis should be directed toward the ground.
A ray is cast from the shape's origin along the -Y axis. When the ray strikes something, and the distance is:
- less than wheelRadius from the shape origin: a hard contact is created
- between wheelRadius and (suspensionTravel + wheelRadius): a soft suspension contact is created
- greater than (suspensionTravel + wheelRadius): no contact is created.
Thus at the point of greatest possible suspension compression the wheel axle will pass through at the shape's origin. At the point greatest suspension extension the wheel axle will be a distance of suspensionTravel from the shape's origin.
The suspension's targetValue is 0 for real cars, which means that the suspension tries to extend all the way. Otherwise one can specify values [0,1] for suspensions which have a spring to pull the wheel up when it is extended too far. 0.5 will then fall halfway along suspensionTravel.
The +Z axis is the 'forward' direction of travel for the wheel. -Z is backwards. The wheel rolls forward when rotating around the positive direction around the X axis.
A positive wheel steering angle corresponds to a positive rotation around the shape's Y axis. (Castor angles are not modeled.)
The coordinate frame of the shape is rigidly fixed on the car.
Definition at line 69 of file physxWheelShape.h.