|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jbox2d.collision.shapes.Shape
org.jbox2d.collision.shapes.CircleShape
public class CircleShape
A circle shape.
| Field Summary | |
|---|---|
Vec2 |
m_p
|
| Fields inherited from class org.jbox2d.collision.shapes.Shape |
|---|
m_radius, m_type |
| Constructor Summary | |
|---|---|
CircleShape()
this is used internally, instead use Body#createShape(ShapeDef) with a
CircleDef |
|
| Method Summary | |
|---|---|
Shape |
clone()
|
void |
computeAABB(AABB argAabb,
Transform argTransform)
Given a transform, compute the associated axis aligned bounding box for a child shape. |
void |
computeMass(MassData massData,
float density)
Compute the mass properties of this shape using its dimensions and density. |
int |
getSupport(Vec2 d)
Get the supporting vertex index in the given direction. |
Vec2 |
getSupportVertex(Vec2 d)
Get the supporting vertex in the given direction. |
Vec2 |
getVertex(int index)
Get a vertex by index. |
int |
getVertexCount()
Get the vertex count. |
boolean |
raycast(RayCastOutput argOutput,
RayCastInput argInput,
Transform argTransform)
Cast a ray against a child shape. |
boolean |
testPoint(Transform transform,
Vec2 p)
Test a point for containment in this shape. |
| Methods inherited from class org.jbox2d.collision.shapes.Shape |
|---|
getType |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final Vec2 m_p
| Constructor Detail |
|---|
public CircleShape()
Body#createShape(ShapeDef) with a
CircleDef
def - Body#createShape(ShapeDef),
CircleDef| Method Detail |
|---|
public final Shape clone()
clone in class Shapepublic final int getSupport(Vec2 d)
d -
public final Vec2 getSupportVertex(Vec2 d)
d -
public final int getVertexCount()
public final Vec2 getVertex(int index)
index -
public final boolean testPoint(Transform transform,
Vec2 p)
Shape
testPoint in class Shapetransform - the shape world transform.p - a point in world coordinates.Shape.testPoint(Transform, Vec2)
public final boolean raycast(RayCastOutput argOutput,
RayCastInput argInput,
Transform argTransform)
Shape
raycast in class ShapeargOutput - the ray-cast results.argInput - the ray-cast input parameters.argTransform - the transform to be applied to the shape.
Shape#raycast(org.jbox2d.collision.RayCastOutput,
org.jbox2d.collision.RayCastInput, org.jbox2d.common.Transform, int)
public final void computeAABB(AABB argAabb,
Transform argTransform)
Shape
computeAABB in class ShapeargAabb - returns the axis aligned box.argTransform - the world transform of the shape.org.jbox2d.collision.shapes.Shape#computeAABB(org.jbox2d.collision.AABB,
org.jbox2d.common.Transform, int)
public final void computeMass(MassData massData,
float density)
Shape
computeMass in class ShapemassData - returns the mass data for this shape.density - the density in kilograms per meter squared.Shape.computeMass(MassData, float)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||