|
||||||||||
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.EdgeShape
public class EdgeShape
A line segment (edge) shape. These can be connected in chains or loops to other edge shapes. The connectivity information is used to ensure correct contact normals.
Field Summary | |
---|---|
boolean |
m_hasVertex0
|
boolean |
m_hasVertex3
|
Vec2 |
m_vertex0
optional adjacent vertex 1. |
Vec2 |
m_vertex1
edge vertex 1 |
Vec2 |
m_vertex2
edge vertex 2 |
Vec2 |
m_vertex3
optional adjacent vertex 2. |
Fields inherited from class org.jbox2d.collision.shapes.Shape |
---|
m_radius, m_type |
Constructor Summary | |
---|---|
EdgeShape()
|
Method Summary | |
---|---|
Shape |
clone()
|
void |
computeAABB(AABB aabb,
Transform xf,
int childIndex)
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 |
getChildCount()
Get the number of child primitives |
boolean |
raycast(RayCastOutput output,
RayCastInput input,
Transform xf,
int childIndex)
Cast a ray against a child shape. |
void |
set(Vec2 v1,
Vec2 v2)
|
boolean |
testPoint(Transform xf,
Vec2 p)
Test a point for containment in this shape. |
Methods inherited from class org.jbox2d.collision.shapes.Shape |
---|
getRadius, getType, setRadius |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Vec2 m_vertex1
public final Vec2 m_vertex2
public final Vec2 m_vertex0
public final Vec2 m_vertex3
public boolean m_hasVertex0
public boolean m_hasVertex3
Constructor Detail |
---|
public EdgeShape()
Method Detail |
---|
public int getChildCount()
Shape
getChildCount
in class Shape
public void set(Vec2 v1, Vec2 v2)
public boolean testPoint(Transform xf, Vec2 p)
Shape
testPoint
in class Shape
xf
- the shape world transform.p
- a point in world coordinates.public boolean raycast(RayCastOutput output, RayCastInput input, Transform xf, int childIndex)
Shape
raycast
in class Shape
public void computeAABB(AABB aabb, Transform xf, int childIndex)
Shape
computeAABB
in class Shape
public void computeMass(MassData massData, float density)
Shape
computeMass
in class Shape
massData
- returns the mass data for this shape.density
- the density in kilograms per meter squared.public Shape clone()
clone
in class Shape
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |