Package com.github.stephengold.joltjni
Class PhysicsSceneResult
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.template.Result<PhysicsSceneRef>
com.github.stephengold.joltjni.PhysicsSceneResult
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
Either an error or a
PhysicsSceneRef. (native type:
Result<Ref<PhysicsScene>>)-
Method Summary
Modifier and TypeMethodDescriptionget()Return a counted reference to the scene object.protected StringgetError(long resultVa) Return the error message.protected booleanhasError(long resultVa) Test whether an error occurred.protected booleanisValid(long resultVa) Test whether the value returned byget()is valid.Methods inherited from class com.github.stephengold.joltjni.template.Result
getError, hasError, isValidMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Method Details
-
get
Return a counted reference to the scene object.- Specified by:
getin classResult<PhysicsSceneRef>- Returns:
- a new JVM object with a new native reference assigned
-
getError
Description copied from class:ResultReturn the error message.- Specified by:
getErrorin classResult<PhysicsSceneRef>- Parameters:
resultVa- the virtual address of the result (not zero)- Returns:
- a string of text
-
hasError
protected boolean hasError(long resultVa) Description copied from class:ResultTest whether an error occurred.- Specified by:
hasErrorin classResult<PhysicsSceneRef>- Parameters:
resultVa- the virtual address of the result (not zero)- Returns:
trueif error, otherwisefalse
-
isValid
protected boolean isValid(long resultVa) Description copied from class:ResultTest whether the value returned byget()is valid.- Specified by:
isValidin classResult<PhysicsSceneRef>- Parameters:
resultVa- the virtual address of the result (not zero)- Returns:
trueif valid, otherwisefalse
-