Interface JbDeserializer
- All Known Implementing Classes:
PbDeserializer
public interface JbDeserializer
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceCalled for each physics object with a tag defined. -
Method Summary
Modifier and TypeMethodDescriptiondeserializeBody(World world, java.io.InputStream input) Deserializes a bodydeserializeFixture(Body body, java.io.InputStream input) Deserializes a fixturedeserializeJoint(World world, java.io.InputStream input, java.util.Map<java.lang.Integer, Body> bodyMap, java.util.Map<java.lang.Integer, Joint> jointMap) Deserializes a jointdeserializeShape(java.io.InputStream input) Deserializes a shapedeserializeWorld(java.io.InputStream input) Deserializes a worldvoidsetObjectListener(JbDeserializer.ObjectListener argListener) Sets the object listener, which allows the user to process each physics object with a tag to do any sort of custom logic.voidsetUnsupportedListener(UnsupportedListener argListener) Sets a listener for unsupported exceptions instead of stopping the whole deserialization process by throwing and exception.
-
Method Details
-
setObjectListener
Sets the object listener, which allows the user to process each physics object with a tag to do any sort of custom logic.- Parameters:
argListener-
-
setUnsupportedListener
Sets a listener for unsupported exceptions instead of stopping the whole deserialization process by throwing and exception.- Parameters:
argListener-
-
deserializeWorld
World deserializeWorld(java.io.InputStream input) throws java.io.IOException, UnsupportedObjectException Deserializes a world- Parameters:
input-- Returns:
- Throws:
java.io.IOExceptionUnsupportedObjectException- if a read physics object is unsupported by this library- See Also:
-
deserializeBody
Body deserializeBody(World world, java.io.InputStream input) throws java.io.IOException, UnsupportedObjectException Deserializes a body- Parameters:
world-input-- Returns:
- Throws:
java.io.IOExceptionUnsupportedObjectException- if a read physics object is unsupported by this library- See Also:
-
deserializeFixture
Fixture deserializeFixture(Body body, java.io.InputStream input) throws java.io.IOException, UnsupportedObjectException Deserializes a fixture- Parameters:
body-input-- Returns:
- Throws:
java.io.IOExceptionUnsupportedObjectException- if a read physics object is unsupported by this library- See Also:
-
deserializeShape
Shape deserializeShape(java.io.InputStream input) throws java.io.IOException, UnsupportedObjectException Deserializes a shape- Parameters:
input-- Returns:
- Throws:
java.io.IOExceptionUnsupportedObjectException- if a read physics object is unsupported by this library- See Also:
-
deserializeJoint
Joint deserializeJoint(World world, java.io.InputStream input, java.util.Map<java.lang.Integer, Body> bodyMap, java.util.Map<java.lang.Integer, Joint> jointMap) throws java.io.IOException, UnsupportedObjectException Deserializes a joint- Parameters:
world-input-bodyMap-jointMap-- Returns:
- Throws:
java.io.IOExceptionUnsupportedObjectException- if a read physics object is unsupported by this library- See Also:
-