PrismaticJoint constructor
PrismaticJoint(
- JointConfig config,
- dynamic lowerTranslation,
- dynamic upperTranslation
A prismatic joint allows only for relative translation of rigid bodies along the axis.
config
configuration profile of the joint
lowerTranslation
the min movment the joint will travel
upperTranslation
the max movment the joint will travel
Implementation
PrismaticJoint(JointConfig config, lowerTranslation, upperTranslation ):super(config){
type = JointType.prismatic;
localAxis1 = config.localAxis1.clone()..normalize();
localAxis2 = config.localAxis2.clone()..normalize();
ac = AngularConstraint(this, Quaternion(0,0,0,1).setFromUnitVectors(localAxis1, localAxis2));
limitMotor = LimitMotor(nor, true);
limitMotor.lowerLimit = lowerTranslation;
limitMotor.upperLimit = upperTranslation;
t3 = Translational3Constraint(this, limitMotor, LimitMotor(tan, true), LimitMotor(bin, true));
}