Class PbDeserializer
java.lang.Object
org.jbox2d.serialization.pb.PbDeserializer
- All Implemented Interfaces:
JbDeserializer
-
Nested Class Summary
Nested classes/interfaces inherited from interface JbDeserializer
JbDeserializer.ObjectListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JbDeserializer.ObjectListenerprivate UnsupportedListener -
Constructor Summary
ConstructorsConstructorDescriptionPbDeserializer(JbDeserializer.ObjectListener argObjectListner) PbDeserializer(UnsupportedListener argListener) PbDeserializer(UnsupportedListener argListener, JbDeserializer.ObjectListener argObjectListner) -
Method Summary
Modifier and TypeMethodDescriptiondeserializeBody(World argWorld, java.io.InputStream argInput) Deserializes a bodydeserializeBody(World argWorld, Box2D.PbBody argBody) deserializeFixture(Body argBody, java.io.InputStream argInput) Deserializes a fixturedeserializeFixture(Body argBody, Box2D.PbFixture argFixture) deserializeJoint(World argWorld, java.io.InputStream argInput, java.util.Map<java.lang.Integer, Body> argBodyMap, java.util.Map<java.lang.Integer, Joint> jointMap) Deserializes a jointdeserializeJoint(World argWorld, Box2D.PbJoint joint, java.util.Map<java.lang.Integer, Body> argBodyMap, java.util.Map<java.lang.Integer, Joint> jointMap) deserializeShape(java.io.InputStream argInput) Deserializes a shapedeserializeShape(Box2D.PbShape argShape) deserializeWorld(java.io.InputStream argInput) Deserializes a worlddeserializeWorld(Box2D.PbWorld pbWorld) private booleanisIndependentJoint(Box2D.PbJointType argType) private Vec2pbToVec(Box2D.PbVec2 argVec) voidsetObjectListener(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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
listener
-
ulistener
-
-
Constructor Details
-
PbDeserializer
public PbDeserializer() -
PbDeserializer
-
PbDeserializer
-
PbDeserializer
public PbDeserializer(UnsupportedListener argListener, JbDeserializer.ObjectListener argObjectListner)
-
-
Method Details
-
setObjectListener
Description copied from interface:JbDeserializerSets the object listener, which allows the user to process each physics object with a tag to do any sort of custom logic.- Specified by:
setObjectListenerin interfaceJbDeserializer- Parameters:
argListener-
-
setUnsupportedListener
Description copied from interface:JbDeserializerSets a listener for unsupported exceptions instead of stopping the whole deserialization process by throwing and exception.- Specified by:
setUnsupportedListenerin interfaceJbDeserializer- Parameters:
argListener-
-
isIndependentJoint
-
deserializeWorld
Description copied from interface:JbDeserializerDeserializes a world- Specified by:
deserializeWorldin interfaceJbDeserializer- Parameters:
argInput-- Returns:
- Throws:
java.io.IOException- See Also:
-
deserializeWorld
-
deserializeBody
public Body deserializeBody(World argWorld, java.io.InputStream argInput) throws java.io.IOException Description copied from interface:JbDeserializerDeserializes a body- Specified by:
deserializeBodyin interfaceJbDeserializer- Parameters:
argWorld-argInput-- Returns:
- Throws:
java.io.IOException- See Also:
-
deserializeBody
-
deserializeFixture
public Fixture deserializeFixture(Body argBody, java.io.InputStream argInput) throws java.io.IOException Description copied from interface:JbDeserializerDeserializes a fixture- Specified by:
deserializeFixturein interfaceJbDeserializer- Parameters:
argBody-argInput-- Returns:
- Throws:
java.io.IOException- See Also:
-
deserializeFixture
-
deserializeShape
Description copied from interface:JbDeserializerDeserializes a shape- Specified by:
deserializeShapein interfaceJbDeserializer- Parameters:
argInput-- Returns:
- Throws:
java.io.IOException- See Also:
-
deserializeShape
-
deserializeJoint
public Joint deserializeJoint(World argWorld, java.io.InputStream argInput, java.util.Map<java.lang.Integer, Body> argBodyMap, java.util.Map<java.lang.Integer, Joint> jointMap) throws java.io.IOException Description copied from interface:JbDeserializerDeserializes a joint- Specified by:
deserializeJointin interfaceJbDeserializer- Parameters:
argWorld-argInput-argBodyMap-jointMap-- Returns:
- Throws:
java.io.IOException- See Also:
-
deserializeJoint
public Joint deserializeJoint(World argWorld, Box2D.PbJoint joint, java.util.Map<java.lang.Integer, Body> argBodyMap, java.util.Map<java.lang.Integer, Joint> jointMap) -
pbToVec
-