|
Emini Physics Engine 1.3.5a API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.emini.physics2D.ShapeSet
public class ShapeSet
The shapeset manages the shapes within a world.
All shapes of a world are referenced here.
Whenever the World.addBody(Body)
adds a body,
it registers the shape in its ShapeSet.
If the shape is already registered nothing happens.
Field Summary | |
---|---|
protected java.util.Vector |
mShapes
A list of all registered shapes. |
Constructor Summary | |
---|---|
ShapeSet()
Empty Constructor. |
|
ShapeSet(ShapeSet other)
Copy constructor. |
Method Summary | |
---|---|
ShapeSet |
copy()
Copies the shape set. |
protected void |
correctShapeId(int index)
Corrects the shape id for the shape at a given index This can be required if the vector was meddled with (like deleting, inserting, etc) |
java.util.Vector |
getShapes()
Gets the vector of all shapes. |
boolean |
isRegistered(Shape s)
Checks if a shape is registered. |
void |
registerShape(Shape s)
Registers a shape in the set. |
void |
registerShapes(java.util.Vector newShapes)
Registers a vector of shapes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Vector mShapes
Constructor Detail |
---|
public ShapeSet()
public ShapeSet(ShapeSet other)
other
- the shape set to copy.Method Detail |
---|
public ShapeSet copy()
public void registerShape(Shape s)
s
- the shape to register.public void registerShapes(java.util.Vector newShapes)
newShapes
- vector of shapes to register.public boolean isRegistered(Shape s)
s
- the shape to check for.
protected void correctShapeId(int index)
index
- the indexpublic java.util.Vector getShapes()
|
Emini Physics Engine 1.3.5a API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |