Property | Type | Description | |
---|---|---|---|
Normals | Vertices | ||
Vertices | Vertices |
Method | Description | |
---|---|---|
Clone ( ) : |
||
ComputeAABB ( AABB &aabb, Transform &transform, int childIndex ) : void |
Given a transform, compute the associated axis aligned bounding box for a child shape.
|
|
ComputeProperties ( ) : void |
Compute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin, not the centroid.
|
|
PolygonShape ( Vertices vertices, float density ) : System.Diagnostics |
Initializes a new instance of the PolygonShape class.
|
|
PolygonShape ( float density ) : System.Diagnostics | ||
RayCast ( RayCastOutput &output, RayCastInput &input, Transform &transform, int childIndex ) : bool |
Cast a ray against a child shape.
|
|
Set ( Vertices vertices ) : void |
Copy vertices. This assumes the vertices define a convex polygon. It is assumed that the exterior is the the right of each edge.
|
|
SetAsBox ( float halfWidth, float halfHeight ) : void |
Build vertices to represent an axis-aligned box.
|
|
SetAsBox ( float halfWidth, float halfHeight, |
Build vertices to represent an oriented box.
|
|
SetAsEdge ( |
Set this as a single edge.
|
|
TestPoint ( Transform &transform, |
Test a point for containment in this shape. This only works for convex shapes.
|
Method | Description | |
---|---|---|
PolygonShape ( ) : System.Diagnostics |
public ComputeAABB ( AABB &aabb, Transform &transform, int childIndex ) : void | ||
aabb | AABB | The aabb results. |
transform | Transform | The world transform of the shape. |
childIndex | int | The child shape index. |
return | void |
public PolygonShape ( Vertices vertices, float density ) : System.Diagnostics | ||
vertices | Vertices | The vertices. |
density | float | The density. |
return | System.Diagnostics |
public PolygonShape ( float density ) : System.Diagnostics | ||
density | float | |
return | System.Diagnostics |
public RayCast ( RayCastOutput &output, RayCastInput &input, Transform &transform, int childIndex ) : bool | ||
output | RayCastOutput | The ray-cast results. |
input | RayCastInput | The ray-cast input parameters. |
transform | Transform | The transform to be applied to the shape. |
childIndex | int | The child shape index. |
return | bool |
public Set ( Vertices vertices ) : void | ||
vertices | Vertices | The vertices. |
return | void |
public SetAsBox ( float halfWidth, float halfHeight ) : void | ||
halfWidth | float | The half-width. |
halfHeight | float | The half-height. |
return | void |
public SetAsBox ( float halfWidth, float halfHeight, |
||
halfWidth | float | The half-width.. |
halfHeight | float | The half-height. |
center | The center of the box in local coordinates. | |
angle | float | The rotation of the box in local coordinates. |
return | void |
public SetAsEdge ( |
||
start | The start. | |
end | The end. | |
return | void |
public TestPoint ( Transform &transform, |
||
transform | Transform | The shape world transform. |
point | a point in world coordinates. | |
return | bool |