|
libgdx API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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 |
| Field Summary | |
|---|---|
protected long |
addr
the address of the 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. |
protected static int |
jniGetType(long addr)
|
void |
setRadius(float radius)
Sets the radius of this shape |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected long addr
| Constructor Detail |
|---|
public Shape()
| Method Detail |
|---|
public abstract Shape.Type getType()
public float getRadius()
public void setRadius(float radius)
public void dispose()
protected static int jniGetType(long addr)
public int getChildCount()
|
libgdx API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||