Package | Description |
---|---|
city.cs.engine |
Simple wrapper around the JBox2D physics engine.
|
Modifier and Type | Class and Description |
---|---|
class |
DynamicBody
A dynamic body moves, rotates and collides with other bodies according
to the laws of physics.
|
class |
StaticBody
A static body does not move under simulation, but dynamic bodies can
collide with it.
|
class |
Walker
A dynamic body with fixed orientation and methods to jump and walk.
|
Modifier and Type | Method and Description |
---|---|
Body |
Fixture.getBody()
The body of which this fixture forms a part.
|
Body |
SensorEvent.getContactBody()
The body in contact with the sensor.
|
Body |
CollisionEvent.getOtherBody()
The body that collided with the reporting body for this collision event.
|
Body |
CollisionEvent.getReportingBody()
The body to which this collision event is being despatched.
|
Body |
DestructionEvent.getSource()
The event source (the body being destroyed).
|
Modifier and Type | Method and Description |
---|---|
List<Body> |
Body.getBodiesInContact()
A list of all the other bodies currently in contact with this body.
|
Modifier and Type | Method and Description |
---|---|
boolean |
Body.intersects(Body b)
Do any of the fixtures attached to this body currently overlap any of the
fixtures attached to a given other body.
|
void |
Body.putOn(Body other)
Put this body on top of another body.
|
void |
Body.putOn(float x,
Body other)
Put this body at the specified x-coordinate on top of another body.
|
Constructor and Description |
---|
AttachedImage(Body body,
BodyImage image,
float scale,
float rotation,
Vec2 offset)
Create a new instance of an image.
|
DestructionEvent(Body source)
Initialise a new DestructionEvent object.
|
GhostlyFixture(Body body,
Shape shape)
Create a ghostly fixture from a shape.
|
GhostlyFixture(Body body,
Shape shape,
float density)
Create a ghostly fixture from a shape.
|
Sensor(Body body,
Shape shape)
Create a sensor from a shape.
|
Sensor(Body body,
Shape shape,
float density)
Create a sensor from a shape.
|
SolidFixture(Body body,
Shape shape)
Create a fixture from a shape.
|
SolidFixture(Body body,
Shape shape,
float density)
Create a fixture from a shape.
|