public class EdgeShape extends Shape
| Modifier and Type | Field and Description |
|---|---|
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.
|
| Constructor and Description |
|---|
EdgeShape() |
| Modifier and Type | Method and Description |
|---|---|
Shape |
clone() |
void |
computeAABB(AABB aabb,
Transform xf,
int childIndex)
Given a transform, compute the associated axis aligned bounding box for a child shape.
|
float |
computeDistanceToOut(Transform xf,
Vec2 p,
int childIndex,
Vec2 normalOut)
Compute the distance from the current shape to the specified point.
|
void |
computeMass(MassData massData,
float density)
Compute the mass properties of this shape using its dimensions and density.
|
int |
getChildCount() |
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.
|
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
public int getChildCount()
getChildCount in class Shapepublic boolean testPoint(Transform xf, Vec2 p)
Shapepublic float computeDistanceToOut(Transform xf, Vec2 p, int childIndex, Vec2 normalOut)
ShapecomputeDistanceToOut in class Shapexf - the shape world transform.p - a point in world coordinates.normalOut - returns the direction in which the distance increases.public boolean raycast(RayCastOutput output, RayCastInput input, Transform xf, int childIndex)
Shapepublic void computeAABB(AABB aabb, Transform xf, int childIndex)
ShapecomputeAABB in class Shapeaabb - returns the axis aligned boxxf - the world transform of the shapechildIndex - the child shape indexpublic void computeMass(MassData massData, float density)
ShapecomputeMass in class ShapemassData - returns the mass data for this shape.density - the density in kilograms per meter squared.Copyright © 2017. All rights reserved.