Property | Type | Description | |
---|---|---|---|
_type | ShapeType |
Method | Description | |
---|---|---|
ComputeAABB ( |
Given a Transform, compute the associated axis aligned bounding box for this shape.
|
|
ComputeMass ( |
Compute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin, not the centroid.
|
|
ComputeSubmergedArea ( Vector2 normal, float offset, Box2DX.Common.Transform xf, Vector2 &c ) : float |
Compute the volume and centroid of this shape intersected with a half plane.
|
|
ComputeSweepRadius ( Vector2 pivot ) : float |
Compute the sweep radius. This is used for conservative advancement (continuous collision detection).
|
|
Dispose ( ) : void | ||
GetSupport ( Vector2 d ) : int | ||
GetSupportVertex ( Vector2 d ) : Vector2 | ||
GetVertex ( int index ) : Vector2 | ||
TestPoint ( Box2DX.Common.Transform xf, Vector2 p ) : bool |
Test a point for containment in this shape. This only works for convex shapes.
|
|
TestSegment ( Box2DX.Common.Transform xf, float &lambda, Vector2 &normal, Segment segment, float maxLambda ) : SegmentCollide |
Perform a ray cast against this shape.
|
Method | Description | |
---|---|---|
Shape ( ) : System |
public abstract ComputeAABB ( |
||
aabb | Returns the axis aligned box. | |
xf | Box2DX.Common.Transform | The world Transform of the shape. |
return | void |
public abstract ComputeMass ( |
||
massData | Returns the mass data for this shape | |
density | float | |
return | void |
public abstract ComputeSubmergedArea ( Vector2 normal, float offset, Box2DX.Common.Transform xf, Vector2 &c ) : float | ||
normal | Vector2 | Normal the surface normal. |
offset | float | Offset the surface offset along normal. |
xf | Box2DX.Common.Transform | The shape Transform. |
c | Vector2 | Returns the centroid. |
return | float |
public abstract ComputeSweepRadius ( Vector2 pivot ) : float | ||
pivot | Vector2 | Pivot is the pivot point for rotation. |
return | float |
public abstract GetSupport ( Vector2 d ) : int | ||
d | Vector2 | |
return | int |
public abstract GetSupportVertex ( Vector2 d ) : Vector2 | ||
d | Vector2 | |
return | Vector2 |
public abstract GetVertex ( int index ) : Vector2 | ||
index | int | |
return | Vector2 |
public abstract TestPoint ( Box2DX.Common.Transform xf, Vector2 p ) : bool | ||
xf | Box2DX.Common.Transform | The shape world Transform. |
p | Vector2 | A point in world coordinates. |
return | bool |
public abstract TestSegment ( Box2DX.Common.Transform xf, float &lambda, Vector2 &normal, Segment segment, float maxLambda ) : SegmentCollide | ||
xf | Box2DX.Common.Transform | The shape world Transform. |
lambda | float | Returns the hit fraction. You can use this to compute the contact point /// p = (1 - lambda) * segment.P1 + lambda * segment.P2. |
normal | Vector2 | Returns the normal at the contact point. If there is no intersection, /// the normal is not set. |
segment | Segment | Defines the begin and end point of the ray cast. |
maxLambda | float | A number typically in the range [0,1]. |
return | SegmentCollide |