| Package | Box2D.Collision.Shapes |
| Class | public class b2CircleShape |
| Inheritance | b2CircleShape b2Shape |
| Source | b2CircleShape.as |
See also
| Method | Defined by | ||
|---|---|---|---|
|
b2CircleShape(radius:Number = 0)
| b2CircleShape | ||
|
Given a transform, compute the associated axis aligned bounding box for this shape.
| b2CircleShape | ||
|
ComputeMass(massData:b2MassData, density:Number):void
Compute the mass properties of this shape using its dimensions and density.
| b2CircleShape | ||
|
Compute the volume and centroid of this shape intersected with a half plane
| b2CircleShape | ||
| b2CircleShape | |||
|
Get the local position of this circle in its parent body.
| b2CircleShape | ||
|
GetRadius():Number
Get the radius of the circle
| b2CircleShape | ||
![]() |
GetType():int
Get the type of this shape.
| b2Shape | |
|
Cast a ray against this shape.
| b2CircleShape | ||
| b2CircleShape | |||
|
SetLocalPosition(position:b2Vec2):void
Set the local position of this circle in its parent body.
| b2CircleShape | ||
|
SetRadius(radius:Number):void
Set the radius of the circle
| b2CircleShape | ||
![]() |
[static]
| b2Shape | |
|
Test a point for containment in this shape.
| b2CircleShape | ||
| b2CircleShape | () | constructor |
public function b2CircleShape(radius:Number = 0)Parameters
radius:Number (default = 0) |
| ComputeAABB | () | method |
public override function ComputeAABB(aabb:b2AABB, transform:b2Transform):voidGiven a transform, compute the associated axis aligned bounding box for this shape.
Parametersaabb:b2AABB — returns the axis aligned box.
|
|
transform:b2Transform — the world transform of the shape.
|
| ComputeMass | () | method |
public override function ComputeMass(massData:b2MassData, density:Number):voidCompute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin, not the centroid.
ParametersmassData:b2MassData — returns the mass data for this shape.
|
|
density:Number |
| ComputeSubmergedArea | () | method |
public override function ComputeSubmergedArea(normal:b2Vec2, offset:Number, xf:b2Transform, c:b2Vec2):NumberCompute the volume and centroid of this shape intersected with a half plane
Parametersnormal:b2Vec2 — the surface normal
|
|
offset:Number — the surface offset along normal
|
|
xf:b2Transform — the shape transform
|
|
c:b2Vec2 — returns the centroid
|
Number — the total volume less than offset along normal
|
| Copy | () | method |
| GetLocalPosition | () | method |
public function GetLocalPosition():b2Vec2Get the local position of this circle in its parent body.
Returnsb2Vec2 |
| GetRadius | () | method |
public function GetRadius():NumberGet the radius of the circle
ReturnsNumber |
| RayCast | () | method |
public override function RayCast(output:b2RayCastOutput, input:b2RayCastInput, transform:b2Transform):BooleanCast a ray against this shape.
Parametersoutput:b2RayCastOutput — the ray-cast results.
|
|
input:b2RayCastInput — the ray-cast input parameters.
|
|
transform:b2Transform — the transform to be applied to the shape.
|
Boolean |
| Set | () | method |
| SetLocalPosition | () | method |
public function SetLocalPosition(position:b2Vec2):voidSet the local position of this circle in its parent body.
Parametersposition:b2Vec2 |
| SetRadius | () | method |
public function SetRadius(radius:Number):voidSet the radius of the circle
Parametersradius:Number |
| TestPoint | () | method |
public override function TestPoint(transform:b2Transform, p:b2Vec2):BooleanTest a point for containment in this shape. This only works for convex shapes.
Parameterstransform:b2Transform — the shape world transform.
|
|
p:b2Vec2 — a point in world coordinates.
|
Boolean |