Package com.github.stephengold.joltjni
Class VehicleCollisionTesterRay
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.VehicleCollisionTester
com.github.stephengold.joltjni.VehicleCollisionTesterRay
- All Implemented Interfaces:
ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<ConstJoltPhysicsObject>
A
VehicleCollisionTester that uses ray casts.-
Constructor Summary
ConstructorsConstructorDescriptionVehicleCollisionTesterRay(int objectLayer) Instantiate a tester for the specified layer.VehicleCollisionTesterRay(int objectLayer, Vec3Arg up) Instantiate a tester with the specified properties.VehicleCollisionTesterRay(int objectLayer, Vec3Arg up, float maxSlopeAngle) Instantiate a tester with the specified properties. -
Method Summary
Modifier and TypeMethodDescriptionintCount the active references to the nativeVehicleCollisionTester.voidMark the nativeVehicleCollisionTesterRayas embedded.toRef()Create a counted reference to the nativeVehicleCollisionTesterRay.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, toString, va
-
Constructor Details
-
VehicleCollisionTesterRay
public VehicleCollisionTesterRay(int objectLayer) Instantiate a tester for the specified layer.- Parameters:
objectLayer- the index of the desired object layer for collisions
-
VehicleCollisionTesterRay
Instantiate a tester with the specified properties.- Parameters:
objectLayer- the index of the desired object layer for collisionsup- the "up" direction (in system coordinates, not null, unaffected, default=(0,1,0))
-
VehicleCollisionTesterRay
Instantiate a tester with the specified properties.- Parameters:
objectLayer- the index of the desired object layer for collisionsup- the "up" direction (in system coordinates, not null, unaffected, default=(0,1,0))maxSlopeAngle- the maximum angle to consider for colliding wheels (in radians, default=4*Pi/9)
-
-
Method Details
-
getRefCount
public int getRefCount()Count the active references to the nativeVehicleCollisionTester. The tester is unaffected.- Specified by:
getRefCountin interfaceRefTarget- Returns:
- the count (≥0)
-
setEmbedded
public void setEmbedded()Mark the nativeVehicleCollisionTesterRayas embedded.- Specified by:
setEmbeddedin interfaceRefTarget
-
toRef
Create a counted reference to the nativeVehicleCollisionTesterRay.
-