Package com.github.stephengold.joltjni
Class PathConstraintPath
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.PathConstraintPath
- All Implemented Interfaces:
ConstJoltPhysicsObject
,RefTarget
,AutoCloseable
,Comparable<JoltPhysicsObject>
- Direct Known Subclasses:
PathConstraintPathHermite
The path for a path constraint.
-
Method Summary
Modifier and TypeMethodDescriptionfloat
getClosestPoint
(Vec3Arg location, float fractionHint) Return the path amount of the location on the path that's closest to the specified location.float
Return the path amount of the end of the path.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.int
Count the active references to the nativePathConstraintPath
.boolean
Test whether the path is looping.void
Mark the nativePathConstraintPath
as embedded.void
setIsLooping
(boolean setting) Alter whether the path is looping.toRef()
Create a counted reference to the nativePathConstraintPath
.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Method Details
-
getClosestPoint
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, otherwisefalse
-
setIsLooping
public void setIsLooping(boolean setting) Alter whether the path is looping.- Parameters:
setting
-true
for looping, orfalse
for no looping (default=false)
-
getRefCount
public int getRefCount()Count the active references to the nativePathConstraintPath
. The path is unaffected.- Specified by:
getRefCount
in interfaceRefTarget
- Returns:
- the count (≥0)
-
setEmbedded
public void setEmbedded()Mark the nativePathConstraintPath
as embedded.- Specified by:
setEmbedded
in interfaceRefTarget
-
toRef
Create a counted reference to the nativePathConstraintPath
.
-