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 booleansWriteObject(StringStream stream, EStreamType streamType, ConstJoltPhysicsObject writeObject) Write the specified object to the specified stream.static booleansWriteObject(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 (notnull)streamType- the type of file (notnull)writeObject- the object to write (notnull, unaffected)- Returns:
trueif 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 (notnull)streamType- the type of stream (notnull)writeObject- the object to write (notnull, unaffected)- Returns:
trueif successful, otherwisefalse
-