Panda3D
Public Member Functions | Static Public Member Functions

BulletWheel Class Reference

One wheel of a BulletVehicle. More...

#include "bulletWheel.h"

List of all members.

Public Member Functions

 BulletWheel (btWheelInfo &info)
PN_stdfloat get_brake () const
 Returns the amount of braking force currently applied.
LPoint3 get_chassis_connection_point_cs () const
 Returns the point where the wheel is connected to the chassis.
PN_stdfloat get_clipped_inv_connection_point_cs () const
PN_stdfloat get_delta_rotation () const
PN_stdfloat get_engine_force () const
 Returns the amount of accelleration force currently applied.
PN_stdfloat get_friction_slip () const
 Returns how slippery the tyres are.
PN_stdfloat get_max_suspension_force () const
 Returns the maximum force (weight) the suspension can handle.
PN_stdfloat get_max_suspension_travel_cm () const
PandaNodeget_node () const
 Returns the PandaNode which representates the visual appearance of this wheel, if such a representation has been set previously.
PN_stdfloat get_roll_influence () const
 Returns the factor by which roll forces are scaled.
PN_stdfloat get_rotation () const
PN_stdfloat get_skid_info () const
PN_stdfloat get_steering () const
 Returns the steering angle in degrees.
PN_stdfloat get_suspension_relative_velocity () const
PN_stdfloat get_suspension_rest_length () const
 Returns the length of the suspension when the vehicle is standing still.
PN_stdfloat get_suspension_stiffness () const
 Returns the stiffness of the suspension.
LVector3 get_wheel_axle_cs () const
 Returns the normal vector of the wheel axle.
LVector3 get_wheel_direction_cs () const
 Returns the wheel's forward vector relative to the chassis.
PN_stdfloat get_wheel_radius () const
 Returns the wheel radius.
PN_stdfloat get_wheels_damping_compression () const
 Returns the damping applied to the compressing suspension.
PN_stdfloat get_wheels_damping_relaxation () const
 Returns the damping applied to the relaxing suspension.
PN_stdfloat get_wheels_suspension_force () const
LMatrix4 get_world_transform () const
bool is_front_wheel () const
 Determines if a wheel is steerable.
void set_brake (PN_stdfloat value)
void set_chassis_connection_point_cs (const LPoint3 &pos)
 Sets the point where the wheel is connected to the chassis.
void set_clipped_inv_connection_point_cs (PN_stdfloat value)
void set_delta_rotation (PN_stdfloat value)
void set_engine_force (PN_stdfloat value)
 Defines how much force should be used to rotate the wheel.
void set_friction_slip (PN_stdfloat value)
 Sets the slipperyness of the tyre.
void set_front_wheel (bool value)
 Sets if the wheel is steerable.
void set_max_suspension_force (PN_stdfloat value)
 Sets the maximum suspension force the wheel can handle.
void set_max_suspension_travel_cm (PN_stdfloat value)
 Sets the maximum distance the suspension can travel out of the resting position in centimeters.
void set_node (PandaNode *node)
 Sets the PandaNode which representates the visual appearance of this wheel.
void set_roll_influence (PN_stdfloat value)
 Defines a scaling factor for roll forces that affect the chassis.
void set_rotation (PN_stdfloat value)
void set_skid_info (PN_stdfloat value)
void set_steering (PN_stdfloat value)
 Sets the steering angle.
void set_suspension_relative_velocity (PN_stdfloat value)
void set_suspension_stiffness (PN_stdfloat value)
 Sets how stiff the suspension shall be.
void set_wheel_axle_cs (const LVector3 &axle)
 Determines the wheel axle normal vector.
void set_wheel_direction_cs (const LVector3 &dir)
 Sets the wheel's forward vector.
void set_wheel_radius (PN_stdfloat value)
 Sets the wheel radius.
void set_wheels_damping_compression (PN_stdfloat value)
 Sets the damping forces applied when the suspension gets compressed.
void set_wheels_damping_relaxation (PN_stdfloat value)
 Sets the damping forces applied when the suspension relaxes.
void set_wheels_suspension_force (PN_stdfloat value)
void set_world_transform (const LMatrix4 &mat)

Static Public Member Functions

static BulletWheel empty ()
 Named constructor intended to be used for asserts with have to return a concrete value.

Detailed Description

One wheel of a BulletVehicle.

Instances should not be created directly but using the factory method BulletVehicle::create_wheel().

Definition at line 32 of file bulletWheel.h.


Member Function Documentation

BulletWheel BulletWheel::empty ( ) [inline, static]

Named constructor intended to be used for asserts with have to return a concrete value.

Definition at line 32 of file bulletWheel.I.

Referenced by BulletVehicle::get_wheel().

PN_stdfloat BulletWheel::get_brake ( ) const

Returns the amount of braking force currently applied.

Definition at line 335 of file bulletWheel.cxx.

LPoint3 BulletWheel::get_chassis_connection_point_cs ( ) const

Returns the point where the wheel is connected to the chassis.

Definition at line 448 of file bulletWheel.cxx.

PN_stdfloat BulletWheel::get_engine_force ( ) const

Returns the amount of accelleration force currently applied.

Definition at line 312 of file bulletWheel.cxx.

PN_stdfloat BulletWheel::get_friction_slip ( ) const

Returns how slippery the tyres are.

Definition at line 101 of file bulletWheel.cxx.

PN_stdfloat BulletWheel::get_max_suspension_force ( ) const

Returns the maximum force (weight) the suspension can handle.

Definition at line 125 of file bulletWheel.cxx.

PandaNode * BulletWheel::get_node ( ) const

Returns the PandaNode which representates the visual appearance of this wheel, if such a representation has been set previously.

Definition at line 566 of file bulletWheel.cxx.

PN_stdfloat BulletWheel::get_roll_influence ( ) const

Returns the factor by which roll forces are scaled.

See set_roll_influence.

Definition at line 200 of file bulletWheel.cxx.

PN_stdfloat BulletWheel::get_steering ( ) const

Returns the steering angle in degrees.

Definition at line 244 of file bulletWheel.cxx.

PN_stdfloat BulletWheel::get_suspension_rest_length ( ) const

Returns the length of the suspension when the vehicle is standing still.

Definition at line 34 of file bulletWheel.cxx.

PN_stdfloat BulletWheel::get_suspension_stiffness ( ) const

Returns the stiffness of the suspension.

Definition at line 56 of file bulletWheel.cxx.

LVector3 BulletWheel::get_wheel_axle_cs ( ) const

Returns the normal vector of the wheel axle.

Definition at line 496 of file bulletWheel.cxx.

LVector3 BulletWheel::get_wheel_direction_cs ( ) const

Returns the wheel's forward vector relative to the chassis.

Definition at line 473 of file bulletWheel.cxx.

PN_stdfloat BulletWheel::get_wheel_radius ( ) const

Returns the wheel radius.

Definition at line 222 of file bulletWheel.cxx.

PN_stdfloat BulletWheel::get_wheels_damping_compression ( ) const

Returns the damping applied to the compressing suspension.

Definition at line 149 of file bulletWheel.cxx.

PN_stdfloat BulletWheel::get_wheels_damping_relaxation ( ) const

Returns the damping applied to the relaxing suspension.

Definition at line 173 of file bulletWheel.cxx.

bool BulletWheel::is_front_wheel ( ) const

Determines if a wheel is steerable.

Definition at line 541 of file bulletWheel.cxx.

void BulletWheel::set_chassis_connection_point_cs ( const LPoint3 pos)

Sets the point where the wheel is connected to the chassis.

Definition at line 435 of file bulletWheel.cxx.

References LVecBase3f::is_nan().

void BulletWheel::set_engine_force ( PN_stdfloat  value)

Defines how much force should be used to rotate the wheel.

Definition at line 300 of file bulletWheel.cxx.

void BulletWheel::set_friction_slip ( PN_stdfloat  value)

Sets the slipperyness of the tyre.

Definition at line 90 of file bulletWheel.cxx.

void BulletWheel::set_front_wheel ( bool  value)

Sets if the wheel is steerable.

Definition at line 530 of file bulletWheel.cxx.

void BulletWheel::set_max_suspension_force ( PN_stdfloat  value)

Sets the maximum suspension force the wheel can handle.

Definition at line 113 of file bulletWheel.cxx.

void BulletWheel::set_max_suspension_travel_cm ( PN_stdfloat  value)

Sets the maximum distance the suspension can travel out of the resting position in centimeters.

Definition at line 68 of file bulletWheel.cxx.

void BulletWheel::set_node ( PandaNode node)

Sets the PandaNode which representates the visual appearance of this wheel.

Definition at line 553 of file bulletWheel.cxx.

void BulletWheel::set_roll_influence ( PN_stdfloat  value)

Defines a scaling factor for roll forces that affect the chassis.

0.0 means no roll - the chassis won't ever flip over - while 1.0 means original physical behaviour. Basically, this allows moving the center of mass up and down.

Definition at line 188 of file bulletWheel.cxx.

void BulletWheel::set_steering ( PN_stdfloat  value)

Sets the steering angle.

Definition at line 233 of file bulletWheel.cxx.

void BulletWheel::set_suspension_stiffness ( PN_stdfloat  value)

Sets how stiff the suspension shall be.

Definition at line 45 of file bulletWheel.cxx.

void BulletWheel::set_wheel_axle_cs ( const LVector3 axle)

Determines the wheel axle normal vector.

Definition at line 484 of file bulletWheel.cxx.

References LVecBase3f::is_nan().

void BulletWheel::set_wheel_direction_cs ( const LVector3 dir)

Sets the wheel's forward vector.

(Most likely orthogonal to the axle vector.)

Definition at line 460 of file bulletWheel.cxx.

References LVecBase3f::is_nan().

void BulletWheel::set_wheel_radius ( PN_stdfloat  value)

Sets the wheel radius.

Definition at line 211 of file bulletWheel.cxx.

void BulletWheel::set_wheels_damping_compression ( PN_stdfloat  value)

Sets the damping forces applied when the suspension gets compressed.

Definition at line 137 of file bulletWheel.cxx.

void BulletWheel::set_wheels_damping_relaxation ( PN_stdfloat  value)

Sets the damping forces applied when the suspension relaxes.

Definition at line 161 of file bulletWheel.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations