Class FixedConstraintSettings

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

public class FixedConstraintSettings extends TwoBodyConstraintSettings
Settings used to construct a FixedConstraint.
  • Constructor Details

    • FixedConstraintSettings

      public FixedConstraintSettings()
      Instantiate default settings.
  • Method Details

    • getAutoDetectPoint

      public boolean getAutoDetectPoint()
      Test whether to configure the attachment points based on the positions of the bodies when the constraint is created. The settings are unaffected. (native attribute: mAutoDetectPoint)
      Returns:
      true to use body positions, false for explicit configuration
    • getAxisX1

      public Vec3 getAxisX1()
      Copy the X axis for body 1. The settings are unaffected. (native attribute: mAxisX1)
      Returns:
      a new direction vector
    • getAxisX2

      public Vec3 getAxisX2()
      Copy the X axis for body 2. The settings are unaffected. (native attribute: mAxisX2)
      Returns:
      a new direction vector
    • getAxisY1

      public Vec3 getAxisY1()
      Copy the Y axis for body 1. The settings are unaffected. (native attribute: mAxisY1)
      Returns:
      a new direction vector
    • getAxisY2

      public Vec3 getAxisY2()
      Copy the Y axis for body 2. The settings are unaffected. (native attribute: mAxisY2)
      Returns:
      a new direction vector
    • 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)
    • setAutoDetectPoint

      public void setAutoDetectPoint(boolean setting)
      Alter whether to configure the attachment points based on the positions of the bodies when the constraint is created. (native attribute: mAutoDetectPoint)
      Parameters:
      setting - true to use body positions, false for explicit configuration (default=false)
    • setAxisX1

      public void setAxisX1(Vec3Arg axis)
      Alter the X axis for body 1. (native attribute: mAxisX1)
      Parameters:
      axis - the desired direction vector (default=(1,0,0))
    • setAxisX2

      public void setAxisX2(Vec3Arg axis)
      Alter the X axis for body 2. (native attribute: mAxisX2)
      Parameters:
      axis - the desired direction vector (default=(1,0,0))
    • setAxisY1

      public void setAxisY1(Vec3Arg axis)
      Alter the Y axis for body 1. (native attribute: mAxisY1)
      Parameters:
      axis - the desired direction vector (default=(0,1,0))
    • setAxisY2

      public void setAxisY2(Vec3Arg axis)
      Alter the Y axis for body 2. (native attribute: mAxisY2)
      Parameters:
      axis - the desired direction vector (default=(0,1,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)