Package com.github.stephengold.joltjni
Class CharacterVsCharacterCollisionSimple
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.CharacterVsCharacterCollision
com.github.stephengold.joltjni.CharacterVsCharacterCollisionSimple
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
A simple implementation of the Character-versus-Character collision
interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(CharacterVirtualRef characterRef) Add the specified character to the collision list.Enumerate all characters in the collision list.void
remove
(CharacterVirtualRef characterRef) Remove the specified character from the collision list.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Constructor Details
-
CharacterVsCharacterCollisionSimple
public CharacterVsCharacterCollisionSimple()Instantiate a default interface.
-
-
Method Details
-
add
Add the specified character to the collision list.- Parameters:
characterRef
- a counted reference to the character to add (not null, alias created)
-
getCharacters
Enumerate all characters in the collision list.- Returns:
- a new array of pre-existing counted references
-
remove
Remove the specified character from the collision list.- Parameters:
characterRef
- a counted reference to the character to remove (not null)
-