Class SwingTwistConstraint

All Implemented Interfaces:
ConstConstraint, ConstJoltPhysicsObject, ConstTwoBodyConstraint, RefTarget, AutoCloseable, Comparable<JoltPhysicsObject>

public class SwingTwistConstraint extends TwoBodyConstraint
A TwoBodyConstraint that only allows limited rotation.
  • Method Details

    • getSwingMotorSettings

      public MotorSettings getSwingMotorSettings()
      Access the settings of the swing motor.
      Returns:
      a new JVM object with the pre-existing native object assigned
    • getTwistMotorSettings

      public MotorSettings getTwistMotorSettings()
      Access the settings of the twist motor.
      Returns:
      a new JVM object with the pre-existing native object assigned
    • setMaxFrictionTorque

      public void setMaxFrictionTorque(float torque)
      Alter the maximum friction torque when not driven by a motor.
      Parameters:
      torque - the desired limit (in Newton.meters)
    • setNormalHalfConeAngle

      public void setNormalHalfConeAngle(float angle)
      Alter the normal half-cone angle.
      Parameters:
      angle - the desired angle (in radians)
    • setPlaneHalfConeAngle

      public void setPlaneHalfConeAngle(float angle)
      Alter the half-angle of the plane cone.
      Parameters:
      angle - the desired limit (in radians)
    • setSwingMotorState

      public void setSwingMotorState(EMotorState motorState)
      Alter the state of the swing motor.
      Parameters:
      motorState - an enum value (not null)
    • setTwistMaxAngle

      public void setTwistMaxAngle(float angle)
      Alter the maximum twist angle.
      Parameters:
      angle - the desired limit (in radians, ≥-Pi, ≤Pi)
    • setTwistMinAngle

      public void setTwistMinAngle(float angle)
      Alter the minimum twist angle.
      Parameters:
      angle - the desired limit (in radians ≥-Pi, ≤Pi)
    • setTwistMotorState

      public void setTwistMotorState(EMotorState motorState)
      Alter the state of the twist motor.
      Parameters:
      motorState - an enum value (not null)
    • setTargetAngularVelocityCs

      public void setTargetAngularVelocityCs(Vec3Arg omega)
      Alter the target angular velocity of body 2 in the constraint space of body 2. (native method: SetTargetAngularVelocityCS)
      Parameters:
      omega - the desired angular velocity (in radians per second, not null, unaffected)
    • setTargetOrientationCs

      public void setTargetOrientationCs(QuatArg orientation)
      Alter the target orientation in constraint space. (native method: SetTargetOrientationCS)
      Parameters:
      orientation - the desired orientation (not null, unaffected)