Package com.github.stephengold.joltjni
Class PhysicsSceneRef
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.template.Ref
com.github.stephengold.joltjni.PhysicsSceneRef
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<ConstJoltPhysicsObject>
A counted reference to a
PhysicsScene. (native type:
Ref<PhysicsScene>)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancreateBodies(PhysicsSystem system) Instantiate the bodies in the scene.booleanCorrect any incorrectly scaled shapes in the scene.Access the body-creation settings as a Java array.getPtr()Temporarily access the referencedPhysicsScene.toRef()Create a counted reference to the nativePhysicsSceneRef.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, toString, va
-
Constructor Details
-
PhysicsSceneRef
public PhysicsSceneRef()Instantiate an empty reference.
-
-
Method Details
-
fixInvalidScales
public boolean fixInvalidScales()Correct any incorrectly scaled shapes in the scene.- Returns:
- true if successful, otherwise false
-
getBodies
Access the body-creation settings as a Java array.- Returns:
- a new array of new JVM objects with the pre-existing native objects assigned
-
createBodies
Instantiate the bodies in the scene.- Parameters:
system- where to add the bodies (not null, modified)- Returns:
- true if successful, otherwise false
-
getPtr
Temporarily access the referencedPhysicsScene. -
toRef
Create a counted reference to the nativePhysicsSceneRef.
-