public final class CircleShape extends Shape
| Constructor and Description |
|---|
CircleShape() |
| Modifier and Type | Method and Description |
|---|---|
Shape |
clone() |
void |
computeAABB(AABB aabb,
Transform transform,
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() |
int |
getSupport(Vec2 d)
Get the supporting vertex index in the given direction.
|
Vec2 |
getSupportVertex(Vec2 d)
Get the supporting vertex in the given direction.
|
Vec2 |
getVertex(int index)
Get a vertex by index.
|
int |
getVertexCount()
Get the vertex count.
|
boolean |
raycast(RayCastOutput output,
RayCastInput input,
Transform transform,
int childIndex)
Cast a ray against a child shape.
|
boolean |
testPoint(Transform transform,
Vec2 p)
Test a point for containment in this shape.
|
public final Vec2 m_p
public int getChildCount()
getChildCount in class Shapepublic boolean testPoint(Transform transform, 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 transform, int childIndex)
Shapepublic void computeAABB(AABB aabb, Transform transform, int childIndex)
ShapecomputeAABB in class Shapeaabb - returns the axis aligned boxtransform - 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.public int getSupport(Vec2 d)
d - public Vec2 getSupportVertex(Vec2 d)
d - public int getVertexCount()
public Vec2 getVertex(int index)
index - Copyright © 2018. All rights reserved.