|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jbox2d.collision.Shape
org.jbox2d.collision.CircleShape
public class CircleShape
A circle shape. Create using Body.createShape(ShapeDef), not the constructor here.
| Field Summary | |
|---|---|
Vec2 |
m_localPosition
|
float |
m_radius
|
| Fields inherited from class org.jbox2d.collision.Shape |
|---|
m_body, m_density, m_filter, m_friction, m_isSensor, m_next, m_proxyId, m_restitution, m_sweepRadius, m_type, m_userData, uid |
| Constructor Summary | |
|---|---|
CircleShape(ShapeDef def)
|
|
| Method Summary | |
|---|---|
void |
computeAABB(AABB aabb,
XForm transform)
Given a transform, compute the associated axis aligned bounding box for this shape. |
void |
computeMass(MassData massData)
Compute the mass properties of this shape using its dimensions and density. |
void |
computeSweptAABB(AABB aabb,
XForm transform1,
XForm transform2)
Given two transforms, compute the associated swept axis aligned bounding box for this shape. |
Vec2 |
getLocalPosition()
|
float |
getRadius()
|
boolean |
testPoint(XForm transform,
Vec2 p)
Test a point for containment in this shape. |
void |
updateSweepRadius(Vec2 center)
Internal |
| Methods inherited from class org.jbox2d.collision.Shape |
|---|
create, createProxy, destroy, destroyProxy, destructor, getBody, getFilterData, getFriction, getNext, getRestitution, getSweepRadius, getType, getUserData, isSensor, refilterProxy, setFilterData, setFriction, setRestitution, setUserData, synchronize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public float m_radius
public Vec2 m_localPosition
| Constructor Detail |
|---|
public CircleShape(ShapeDef def)
| Method Detail |
|---|
public void updateSweepRadius(Vec2 center)
Shape
updateSweepRadius in class Shape
public boolean testPoint(XForm transform,
Vec2 p)
Shape
testPoint in class Shapetransform - the shape world transform.p - a point in world coordinates.
public void computeAABB(AABB aabb,
XForm transform)
Shape
computeAABB in class Shapeaabb - returns the axis aligned box.transform - the world transform of the shape.
public void computeSweptAABB(AABB aabb,
XForm transform1,
XForm transform2)
Shape
computeSweptAABB in class Shapeaabb - returns the axis aligned box. (return parameter)transform1 - the starting shape world transform.transform2 - the ending shape world transform.public void computeMass(MassData massData)
Shape
computeMass in class ShapemassData - returns the mass data for this shape. (return parameter)public float getRadius()
public Vec2 getLocalPosition()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||