The hinge constraint lets two bodies rotate around a given axis while adhering to specified limits. More...
Public Member Functions | |
BulletHingeConstraint (BulletRigidBodyNode const node_a, BulletRigidBodyNode const node_b, Point3 const pivot_a, Point3 const pivot_b, Vec3 const axis_a, Vec3 const axis_b, bool use_frame_a) | |
Creates a hinge connecting node_a to node_b. | |
BulletHingeConstraint (BulletRigidBodyNode const node_a, BulletRigidBodyNode const node_b, Point3 const pivot_a, Point3 const pivot_b, Vec3 const axis_a, Vec3 const axis_b) | |
Creates a hinge connecting node_a to node_b. | |
BulletHingeConstraint (BulletRigidBodyNode const node_a, Point3 const pivot_a, Vec3 const axis_a, bool use_frame_a) | |
Creates a hinge constraint in the same way as the other constructor, but uses the world as second body so that node_a is fixed to some point in mid-air for example. | |
BulletHingeConstraint (BulletRigidBodyNode const node_a, Point3 const pivot_a, Vec3 const axis_a) | |
Creates a hinge constraint in the same way as the other constructor, but uses the world as second body so that node_a is fixed to some point in mid-air for example. | |
enableAngularMotor (bool enable, float target_velocity, float max_impulse) | |
Applies an impulse to the constraint so that the angle changes at target_velocity (probably degrees/second) where max_impulse is the maximum impulse that is used for achieving the specified velocity. | |
enableMotor (bool enable) | |
bool | getAngularOnly () |
float | getHingeAngle () |
Returns the angle between node_a and node_b in degrees. | |
float | getLowerLimit () |
Returns the lower angular limit in degrees. | |
float | getUpperLimit () |
Returns the upper angular limit in degrees. | |
setAngularOnly (bool value) | |
setAxis (Vec3 const axis) | |
Sets the hinge's rotation axis in world coordinates. | |
setLimit (float low, float high, float softness, float bias, float relaxation) | |
Sets the lower and upper rotational limits in degrees. | |
setLimit (float low, float high, float softness, float bias) | |
Sets the lower and upper rotational limits in degrees. | |
setLimit (float low, float high, float softness) | |
Sets the lower and upper rotational limits in degrees. | |
setLimit (float low, float high) | |
Sets the lower and upper rotational limits in degrees. | |
setMaxMotorImpulse (float max_impulse) | |
Sets the maximum impulse used to achieve the velocity set in enable_angular_motor. | |
setMotorTarget (Quat const quat, float dt) | |
setMotorTarget (float target_angle, float dt) | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
The hinge constraint lets two bodies rotate around a given axis while adhering to specified limits.
It's motor can apply angular force to them.
BulletHingeConstraint | ( | BulletRigidBodyNode const | node_a, |
BulletRigidBodyNode const | node_b, | ||
Point3 const | pivot_a, | ||
Point3 const | pivot_b, | ||
Vec3 const | axis_a, | ||
Vec3 const | axis_b, | ||
bool | use_frame_a | ||
) |
Creates a hinge connecting node_a to node_b.
The pivot point is the point at which the body is fixed to the constraint. In other words: It specifies where on each body the rotation axis should be. This axis is specified using axis_a and axis_b. Remember, everything is specified in the bodies own coordinate system!
BulletHingeConstraint | ( | BulletRigidBodyNode const | node_a, |
BulletRigidBodyNode const | node_b, | ||
Point3 const | pivot_a, | ||
Point3 const | pivot_b, | ||
Vec3 const | axis_a, | ||
Vec3 const | axis_b | ||
) |
Creates a hinge connecting node_a to node_b.
The pivot point is the point at which the body is fixed to the constraint. In other words: It specifies where on each body the rotation axis should be. This axis is specified using axis_a and axis_b. Remember, everything is specified in the bodies own coordinate system!
BulletHingeConstraint | ( | BulletRigidBodyNode const | node_a, |
Point3 const | pivot_a, | ||
Vec3 const | axis_a, | ||
bool | use_frame_a | ||
) |
Creates a hinge constraint in the same way as the other constructor, but uses the world as second body so that node_a is fixed to some point in mid-air for example.
BulletHingeConstraint | ( | BulletRigidBodyNode const | node_a, |
Point3 const | pivot_a, | ||
Vec3 const | axis_a | ||
) |
Creates a hinge constraint in the same way as the other constructor, but uses the world as second body so that node_a is fixed to some point in mid-air for example.
enableAngularMotor | ( | bool | enable, |
float | target_velocity, | ||
float | max_impulse | ||
) |
Applies an impulse to the constraint so that the angle changes at target_velocity (probably degrees/second) where max_impulse is the maximum impulse that is used for achieving the specified velocity.
enableMotor | ( | bool | enable | ) |
bool getAngularOnly | ( | ) |
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from BulletConstraint.
float getHingeAngle | ( | ) |
Returns the angle between node_a and node_b in degrees.
float getLowerLimit | ( | ) |
Returns the lower angular limit in degrees.
float getUpperLimit | ( | ) |
Returns the upper angular limit in degrees.
setAngularOnly | ( | bool | value | ) |
setAxis | ( | Vec3 const | axis | ) |
Sets the hinge's rotation axis in world coordinates.
setLimit | ( | float | low, |
float | high, | ||
float | softness, | ||
float | bias, | ||
float | relaxation | ||
) |
Sets the lower and upper rotational limits in degrees.
setLimit | ( | float | low, |
float | high, | ||
float | softness, | ||
float | bias | ||
) |
Sets the lower and upper rotational limits in degrees.
setLimit | ( | float | low, |
float | high, | ||
float | softness | ||
) |
Sets the lower and upper rotational limits in degrees.
setLimit | ( | float | low, |
float | high | ||
) |
Sets the lower and upper rotational limits in degrees.
setMaxMotorImpulse | ( | float | max_impulse | ) |
Sets the maximum impulse used to achieve the velocity set in enable_angular_motor.
setMotorTarget | ( | Quat const | quat, |
float | dt | ||
) |
setMotorTarget | ( | float | target_angle, |
float | dt | ||
) |