|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.badlogic.gdx.physics.box2d.Shape
public abstract class Shape
A shape is used for collision detection. You can create a shape however you like. Shapes used for simulation in b2World are created automatically when a b2Fixture is created. Shapes may encapsulate a one or more child shapes. NOTE: YOU NEED TO DISPOSE SHAPES YOU CREATED YOURSELF AFTER YOU NO LONGER USE THEM! E.g. after calling body.createFixture();
Nested Class Summary | |
---|---|
static class |
Shape.Type
Enum describing the type of a shape |
Constructor Summary | |
---|---|
Shape()
|
Method Summary | |
---|---|
void |
dispose()
Needs to be called when the shape is no longer used, e.g. |
int |
getChildCount()
Get the number of child primitives. |
float |
getRadius()
Returns the radius of this shape |
abstract Shape.Type |
getType()
Get the type of this shape. |
void |
setRadius(float radius)
Sets the radius of this shape |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Shape()
Method Detail |
---|
public abstract Shape.Type getType()
public float getRadius()
public void setRadius(float radius)
public void dispose()
public int getChildCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |