Class ConeConstraintSettings

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

public class ConeConstraintSettings extends TwoBodyConstraintSettings
Settings used to construct a ConeConstraint.
  • Constructor Details

    • ConeConstraintSettings

      public ConeConstraintSettings()
      Instantiate default settings.
  • Method Details

    • getHalfConeAngle

      public float getHalfConeAngle()
      Return one-half the maximum angle between the twist axes of body 1 and body 2. The settings are unaffected. (native attribute: mHalfConeAngle)
      Returns:
      the half angle (in radians)
    • getPoint1

      public RVec3 getPoint1()
      Copy the constraint location for body 1. The settings are unaffected. (native attribute: mPoint1)
      Returns:
      a new location vector
    • getPoint2

      public RVec3 getPoint2()
      Copy the constraint location for body 2. The settings are unaffected. (native attribute: mPoint2)
      Returns:
      a new location vector
    • getSpace

      public EConstraintSpace getSpace()
      Return which space the other properties are specified in. The settings are unaffected. (native attribute: mSpace)
      Returns:
      an enum value (not null)
    • getTwistAxis1

      public Vec3 getTwistAxis1()
      Copy the twist axis of body 1. The settings are unaffected. (native attribute: mTwistAxis1)
      Returns:
      a new direction vector
    • getTwistAxis2

      public Vec3 getTwistAxis2()
      Copy the twist axis of body 2. The settings are unaffected. (native attribute: mTwistAxis2)
      Returns:
      a new direction vector
    • setHalfConeAngle

      public void setHalfConeAngle(float halfAngle)
      Alter the maximum angle between the twist axes of body 1 and body 2. (native attribute: mHalfConeAngle)
      Parameters:
      halfAngle - the desired half angle (in radians, default=0)
    • setPoint1

      public RVec3Arg setPoint1(RVec3Arg location)
      Alter the constraint location for body 1. (native attribute: mPoint1)
      Parameters:
      location - the desired location (not null, unaffected, default=(0,0,0))
      Returns:
      the argument, for chaining
    • setPoint2

      public RVec3Arg setPoint2(RVec3Arg location)
      Alter the constraint location for body 2. (native attribute: mPoint2)
      Parameters:
      location - the desired location (not null, unaffected, default=(0,0,0))
      Returns:
      the argument, for chaining
    • setSpace

      public void setSpace(EConstraintSpace space)
      Alter which space the other properties are specified in. (native attribute: mSpace)
      Parameters:
      space - enum value (not null, default=WorldSpace)
    • setTwistAxis1

      public Vec3Arg setTwistAxis1(Vec3Arg direction)
      Alter the twist axis of body 1. (native attribute: mTwistAxis1)
      Parameters:
      direction - the desired axis direction (not null, unaffected, default=(1,0,0))
      Returns:
      the argument, for chaining
    • setTwistAxis2

      public Vec3Arg setTwistAxis2(Vec3Arg direction)
      Alter the twist axis of body 2. (native attribute: mTwistAxis2)
      Parameters:
      direction - the desired axis direction (not null, unaffected, default=(1,0,0))
      Returns:
      the argument, for chaining