Class EdgeShape
java.lang.Object
org.jbox2d.collision.shapes.Shape
org.jbox2d.collision.shapes.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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()voidcomputeAABB(AABB aabb, Transform xf, int childIndex) Given a transform, compute the associated axis aligned bounding box for a child shape.voidcomputeMass(MassData massData, float density) Compute the mass properties of this shape using its dimensions and density.intGet the number of child primitivesbooleanraycast(RayCastOutput output, RayCastInput input, Transform xf, int childIndex) Cast a ray against a child shape.voidbooleanTest a point for containment in this shape.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
m_vertex1
edge vertex 1 -
m_vertex2
edge vertex 2 -
m_vertex0
optional adjacent vertex 1. Used for smooth collision -
m_vertex3
optional adjacent vertex 2. Used for smooth collision -
m_hasVertex0
public boolean m_hasVertex0 -
m_hasVertex3
public boolean m_hasVertex3 -
normal
-
-
Constructor Details
-
EdgeShape
public EdgeShape()
-
-
Method Details
-
getChildCount
public int getChildCount()Description copied from class:ShapeGet the number of child primitives- Specified by:
getChildCountin classShape- Returns:
-
set
-
testPoint
-
raycast
Description copied from class:ShapeCast a ray against a child shape. -
computeAABB
Description copied from class:ShapeGiven a transform, compute the associated axis aligned bounding box for a child shape.- Specified by:
computeAABBin classShape
-
computeMass
Description copied from class:ShapeCompute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin.- Specified by:
computeMassin classShape- Parameters:
massData- returns the mass data for this shape.density- the density in kilograms per meter squared.
-
clone
-