Class PathConstraintPath

All Implemented Interfaces:
ConstJoltPhysicsObject, RefTarget, AutoCloseable, Comparable<JoltPhysicsObject>
Direct Known Subclasses:
PathConstraintPathHermite

public class PathConstraintPath extends SerializableObject implements RefTarget
The path for a path constraint.
  • Method Details

    • getClosestPoint

      public float getClosestPoint(Vec3Arg location, float fractionHint)
      Return the path amount of the location on the path that's closest to the specified location. The path is unaffected.
      Parameters:
      location - the input location (in system coordinates, not null, unaffected)
      fractionHint - where to start searching
      Returns:
      the path amount (≥0)
    • getPathMaxFraction

      public float getPathMaxFraction()
      Return the path amount of the end of the path. The path is unaffected.
      Returns:
      the path amount (≥0)
    • getPointOnPath

      public void getPointOnPath(float amount, Vec3 storeLocation, Vec3 storeTangent, Vec3 storeNormal, Vec3 storeBinormal)
      Calculate the location, normal, and binormal of the location on the path with the specified path amount. The path is unaffected.
      Parameters:
      amount - the path amount (≥0)
      storeLocation - storage for the location (in system coordinates)
      storeTangent - storage for the tangent direction (in system coordinates)
      storeNormal - storage for the normal direction (in system coordinates)
      storeBinormal - storage for the binormal direction (in system coordinates)
    • isLooping

      public boolean isLooping()
      Test whether the path is looping. The path is unaffected.
      Returns:
      true if looping, otherwise false
    • setIsLooping

      public void setIsLooping(boolean setting)
      Alter whether the path is looping.
      Parameters:
      setting - true for looping, or false for no looping (default=false)
    • getRefCount

      public int getRefCount()
      Count the active references to the native PathConstraintPath. The path is unaffected.
      Specified by:
      getRefCount in interface RefTarget
      Returns:
      the count (≥0)
    • setEmbedded

      public void setEmbedded()
      Mark the native PathConstraintPath as embedded.
      Specified by:
      setEmbedded in interface RefTarget
    • toRef

      public PathConstraintPathRef toRef()
      Create a counted reference to the native PathConstraintPath.
      Specified by:
      toRef in interface RefTarget
      Returns:
      a new JVM object with a new native object assigned