at.emini.physics2D
Interface UserData
public interface UserData
Interface for additional data for bodies.
Implement this interface if bodies need custom data.
- Author:
- Alexander Adensamer
Method Summary |
UserData |
copy()
Copy method for the user data |
UserData |
createNewUserData(java.lang.String data,
int type)
Fills the userdata object
The string is read from the world file and passed to this method to create
the user data object. |
TYPE_BODY
static final int TYPE_BODY
- See Also:
- Constant Field Values
TYPE_SHAPE
static final int TYPE_SHAPE
- See Also:
- Constant Field Values
TYPE_EVENT
static final int TYPE_EVENT
- See Also:
- Constant Field Values
TYPE_CONSTRAINT
static final int TYPE_CONSTRAINT
- See Also:
- Constant Field Values
TYPE_PARTICLE
static final int TYPE_PARTICLE
- See Also:
- Constant Field Values
TYPE_WORLD
static final int TYPE_WORLD
- See Also:
- Constant Field Values
createNewUserData
UserData createNewUserData(java.lang.String data,
int type)
- Fills the userdata object
The string is read from the world file and passed to this method to create
the user data object.
Can return null.
- Parameters:
data
- the string to parsetype
- the type of item that this used data belongs to
- Returns:
- new userdata object
copy
UserData copy()
- Copy method for the user data
- Returns:
- a deep copy of the user data
Emini Physics Engine 1.3.5a API Documentation - Copyright 2014 Alexander Adensamer