Interface ConstPathConstraintPath
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
,ConstSerializableObject
- All Known Implementing Classes:
PathConstraintPath
,PathConstraintPathHermite
Read-only access to a
PathConstraintPath
. (native type: const
PathConstraintPath)-
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.boolean
Test whether the path is looping.void
saveBinaryState
(StreamOut stream) Save the path to the specified binary stream.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstSerializableObject
getRtti
-
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
float getPathMaxFraction()Return the path amount of the end of the path. The path is unaffected.- Returns:
- the path amount (≥0)
-
getPointOnPath
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
boolean isLooping()Test whether the path is looping. The path is unaffected.- Returns:
true
if looping, otherwisefalse
-
saveBinaryState
Save the path to the specified binary stream. The path is unaffected.- Parameters:
stream
- the stream to write to (not null)
-