public 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.
|
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
|
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 final int getChildCount()
Shape
getChildCount
in class Shape
public final int getSupport(Vec2 d)
d
- public final Vec2 getSupportVertex(Vec2 d)
d
- public final int getVertexCount()
public final Vec2 getVertex(int index)
index
- public final boolean testPoint(Transform transform, Vec2 p)
Shape
public final boolean raycast(RayCastOutput output, RayCastInput input, Transform transform, int childIndex)
Shape
public final void computeAABB(AABB aabb, Transform transform, int childIndex)
Shape
computeAABB
in class Shape
public final 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.Copyright © 2017. All Rights Reserved.