blaze.dynamics.joints.prismaticJoint
- class
PrismaticJointDef
: blaze.dynamics.joints.joint.JointDef;
- Prismatic joint definition. This requires defining a line of
motion using an axis and an anchor point. The definition uses local
anchor points and a local axis so that the initial configuration
can violate the constraint slightly. The joint translation is zero
when the local anchor points coincide in world space. Using local
anchors and a local axis helps when saving and loading a game.
- this(Body body1, Body body2, bVec2 anchor, bVec2 axis);
- Initialize the bodies, anchors, axis, and reference angle using the world
anchor and world axis.
- bVec2
localAnchor1
;
- The local anchor point relative to body1's origin.
- bVec2
localAnchor2
;
- The local anchor point relative to body2's origin.
- bVec2
localAxis1
;
- The local translation axis in body1.
- float
referenceAngle
;
- The constrained angle between the bodies: body2_angle - body1_angle.
- bool
enableLimit
;
- Enable/disable the joint limit.
- float
lowerTranslation
;
- The lower translation limit, usually in meters.
- float
upperTranslation
;
- The upper translation limit, usually in meters.
- bool
enableMotor
;
- Enable/disable the joint motor.
- float
maxMotorForce
;
- The maximum motor torque, usually in N-m.
- float
motorSpeed
;
- The desired motor speed in radians per second.
- class
PrismaticJoint
: blaze.dynamics.joints.joint.Joint;
- A prismatic joint. This joint provides one degree of freedom: translation
along an axis fixed in body1. Relative rotation is prevented. You can
use a joint limit to restrict the range of motion and a joint motor to
drive the motion or to model joint friction.
- float
jointTranslation
();
- Get the current joint translation, usually in meters.
- float
jointSpeed
();
- Get the current joint translation speed, usually in meters per second.
- bool
isLimitEnabled
();
- Is the joint limit enabled?
- void
enableLimit
(bool flag);
- Enable/disable the joint limit.
- float
lowerLimit
();
- Get the lower joint limit, usually in meters.
- float
upperLimit
();
- Get the upper joint limit, usually in meters.
- void
limits
(float lower, float upper);
- Set the joint
limits
, usually in meters.
- bool
isMotorEnabled
();
- Is the joint motor enabled?
- void
enableMotor
(bool flag);
- Enable/disable the joint motor.
- void
motorSpeed
(float speed);
- Set the motor speed, usually in meters per second.
- float
motorSpeed
();
- Get the motor speed, usually in meters per second.
- void
maxMotorForce
(float force);
- Set the maximum motor force, usually in N.
- float
motorForce
();
- Get the current motor force, usually in N.
|