java.lang.Object
com.github.stephengold.joltjni.ObjectStreamOut
Utility class for writing uncooked Jolt-Physics objects to files or streams.
Data serialized this way is more like to be compatible with future versions
of the library than the
saveBinaryState()
/restoreBinaryState()
methods.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
sWriteObject
(StringStream stream, EStreamType streamType, ConstJoltPhysicsObject writeObject) Write the specified object to the specified stream.static boolean
sWriteObject
(String fileName, EStreamType streamType, ConstJoltPhysicsObject writeObject) Write the specified object to the specified file.
-
Method Details
-
sWriteObject
public static boolean sWriteObject(String fileName, EStreamType streamType, ConstJoltPhysicsObject writeObject) Write the specified object to the specified file.- Parameters:
fileName
- the path to the file (not null)streamType
- the type of file (not null)writeObject
- the object to write (not null, unaffected)- Returns:
true
if successful, otherwisefalse
-
sWriteObject
public static boolean sWriteObject(StringStream stream, EStreamType streamType, ConstJoltPhysicsObject writeObject) Write the specified object to the specified stream.- Parameters:
stream
- the stream to write to (not null)streamType
- the type of stream (not null)writeObject
- the object to write (not null, unaffected)- Returns:
true
if successful, otherwisefalse
-