Class PulleyConstraintSettings

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

public class PulleyConstraintSettings extends TwoBodyConstraintSettings
Settings used to construct a PulleyConstraint.
  • Constructor Details

    • PulleyConstraintSettings

      public PulleyConstraintSettings()
      Instantiate default settings.
  • Method Details

    • getBodyPoint1

      public RVec3 getBodyPoint1()
      Copy the location at which the constraint will attach to body 1. The settings are unaffected. (native attribute: mBodyPoint1)
      Returns:
      a location vector
    • getBodyPoint2

      public RVec3 getBodyPoint2()
      Copy the location at which the constraint will attach to body 2. The settings are unaffected. (native attribute: mBodyPoint2)
      Returns:
      a location vector
    • getFixedPoint1

      public RVec3 getFixedPoint1()
      Copy the location to which body 1 is connected. The settings are unaffected. (native attribute: mFixedPoint1)
      Returns:
      a location vector (in system coordinates)
    • getFixedPoint2

      public RVec3 getFixedPoint2()
      Copy the location to which body 2 is connected. The settings are unaffected. (native attribute: mFixedPoint2)
      Returns:
      a location vector (in system coordinates)
    • getMaxLength

      public float getMaxLength()
      Return the maximum length of the line segments. The settings are unaffected. (native attribute: mMaxLength)
      Returns:
      the length (in meters, or -1 to use the creation length)
    • getMinLength

      public float getMinLength()
      Return the minimum length of the line segments. The settings are unaffected. (native attribute: mMinLength)
      Returns:
      the length (in meters, or -1 to use the creation length)
    • getRatio

      public float getRatio()
      Return the ratio between the 2 line segments. The settings are unaffected. (native attribute: mRatio)
      Returns:
      the ratio
    • getSpace

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

      public void setBodyPoint1(RVec3Arg location)
      Alter the location at which the constraint will attach to body 1. (native attribute: mBodyPoint1)
      Parameters:
      location - the desired location (not null, unaffected, default=(0,0,0))
    • setBodyPoint2

      public void setBodyPoint2(RVec3Arg location)
      Alter the location at which the constraint will attach to body 2. (native attribute: mBodyPoint2)
      Parameters:
      location - the desired location (not null, unaffected, default=(0,0,0))
    • setFixedPoint1

      public void setFixedPoint1(RVec3Arg location)
      Alter the location to which body 1 is connected. (native attribute: mFixedPoint1)
      Parameters:
      location - the desired location (in system coordinates, not null, unaffected, default=(0,0,0))
    • setFixedPoint2

      public void setFixedPoint2(RVec3Arg location)
      Alter the location to which body 2 is connected. (native attribute: mFixedPoint2)
      Parameters:
      location - the desired location (in system coordinates, not null, unaffected, default=(0,0,0))
    • setMaxLength

      public float setMaxLength(float length)
      Alter the maximum length of the line segments. (native attribute: mMaxLength)
      Parameters:
      length - (in meters, or -1 to use the creation length, default=-1)
      Returns:
      the argument, for chaining
    • setMinLength

      public float setMinLength(float length)
      Alter the minimum length of the line segments. (native attribute: mMinLength)
      Parameters:
      length - (in meters, or -1 to use the creation length, default=0)
      Returns:
      the argument, for chaining
    • setRatio

      public void setRatio(float ratio)
      Alter the ratio between the 2 line segments. (native attribute: mRatio)
      Parameters:
      ratio - the desired ratio (default=1)
    • setSpace

      public void setSpace(EConstraintSpace space)
      Alter which space the body points are specified in. (native attribute: mSpace)
      Parameters:
      space - the desired constraint space (not null, default=WorldSpace)