|
||||||||||
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. Create using Body.createShape(ShapeDef)
with a CircleDef
,
not the constructor here.
Body.createShape(ShapeDef)
,
CircleDef
Field Summary | |
---|---|
Vec2 |
m_localPosition
|
float |
m_radius
|
Fields inherited from class org.jbox2d.collision.shapes.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)
this is used internally, instead use Body.createShape(ShapeDef) with a CircleDef |
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()
Returns a copy of the local position |
Vec2 |
getMemberLocalPosition()
Returns the member variable of the local position. |
float |
getRadius()
|
boolean |
testPoint(XForm transform,
Vec2 p)
checks to see if the point is in this shape. |
void |
updateSweepRadius(Vec2 center)
Internal |
Methods inherited from class org.jbox2d.collision.shapes.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 final Vec2 m_localPosition
Constructor Detail |
---|
public CircleShape(ShapeDef def)
Body.createShape(ShapeDef)
with a CircleDef
def
- Body.createShape(ShapeDef)
,
CircleDef
Method Detail |
---|
public void updateSweepRadius(Vec2 center)
Shape
updateSweepRadius
in class Shape
Shape.updateSweepRadius(Vec2)
public boolean testPoint(XForm transform, Vec2 p)
testPoint
in class Shape
transform
- the shape world transform.p
- a point in world coordinates.
Shape.testPoint(XForm, Vec2)
public void computeAABB(AABB aabb, XForm transform)
Shape
computeAABB
in class Shape
aabb
- returns the axis aligned box.transform
- the world transform of the shape.Shape.computeAABB(AABB, XForm)
public void computeSweptAABB(AABB aabb, XForm transform1, XForm transform2)
Shape
computeSweptAABB
in class Shape
aabb
- returns the axis aligned box. (return parameter)transform1
- the starting shape world transform.transform2
- the ending shape world transform.Shape.computeSweptAABB(AABB, XForm, XForm)
public void computeMass(MassData massData)
Shape
computeMass
in class Shape
massData
- returns the mass data for this shape. (return parameter)Shape.computeMass(MassData)
public float getRadius()
public Vec2 getLocalPosition()
public Vec2 getMemberLocalPosition()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |