| Package | Box2D.Collision.Shapes |
| Class | public class b2PolygonShape |
| Inheritance | b2PolygonShape b2Shape |
| Source | b2PolygonShape.as |
| Property | Defined by | ||
|---|---|---|---|
![]() | m_body : b2Body | b2Shape | |
| m_centroid : b2Vec2 | b2PolygonShape | ||
| m_coreVertices : Array | b2PolygonShape | ||
![]() | m_density : Number | b2Shape | |
![]() | m_filter : b2FilterData | b2Shape | |
![]() | m_friction : Number | b2Shape | |
![]() | m_isSensor : Boolean | b2Shape | |
![]() | m_next : b2Shape | b2Shape | |
| m_normals : Array | b2PolygonShape | ||
| m_obb : b2OBB | b2PolygonShape | ||
![]() | m_proxyId : uint | b2Shape | |
![]() | m_restitution : Number | b2Shape | |
![]() | m_sweepRadius : Number | b2Shape | |
![]() | m_type : int | b2Shape | |
![]() | m_userData : * | b2Shape | |
| m_vertexCount : int | b2PolygonShape | ||
| m_vertices : Array | b2PolygonShape | ||
| Method | Defined by | ||
|---|---|---|---|
|
b2PolygonShape(def:b2ShapeDef)
| b2PolygonShape | ||
|
Get the centroid and apply the supplied transform.
| b2PolygonShape | ||
| b2PolygonShape | |||
|
ComputeCentroid(vs:Array, count:int):b2Vec2
[static]
| b2PolygonShape | ||
|
ComputeMass(massData:b2MassData):void
| b2PolygonShape | ||
|
ComputeOBB(obb:b2OBB, vs:Array, count:int):void
[static]
| b2PolygonShape | ||
| b2PolygonShape | |||
![]() |
[static]
| b2Shape | |
![]() | b2Shape | ||
![]() |
[static]
| b2Shape | |
![]() |
DestroyProxy(broadPhase:b2BroadPhase):void
| b2Shape | |
![]() |
Get the parent body of this shape.
| b2Shape | |
|
Get local centroid relative to the parent body.
| b2PolygonShape | ||
|
GetCoreVertices():Array
Get the core vertices in local coordinates.
| b2PolygonShape | ||
![]() |
Get the contact filtering data.
| b2Shape | |
|
Get the first vertex and apply the supplied transform.
| b2PolygonShape | ||
![]() |
GetFriction():Number
Get the coefficient of friction.
| b2Shape | |
![]() |
Get the next shape in the parent body's shape list.
| b2Shape | |
|
GetNormals():Array
Get the edge normal vectors.
| b2PolygonShape | ||
|
Get the oriented bounding box relative to the parent body.
| b2PolygonShape | ||
![]() |
GetRestitution():Number
Get the coefficient of restitution.
| b2Shape | |
![]() |
GetSweepRadius():Number
Get the maximum radius about the parent body's center of mass.
| b2Shape | |
![]() |
GetType():int
Get the type of this shape.
| b2Shape | |
![]() |
GetUserData():*
Get the user data that was assigned in the shape definition.
| b2Shape | |
|
GetVertexCount():int
Get the vertex count.
| b2PolygonShape | ||
|
GetVertices():Array
Get the vertices in local coordinates.
| b2PolygonShape | ||
![]() |
IsSensor():Boolean
Is this shape a sensor (non-solid)?
| b2Shape | |
![]() | b2Shape | ||
![]() |
SetFilterData(filter:b2FilterData):void
Set the contact filtering data.
| b2Shape | |
![]() |
SetUserData(data:*):void
Set the user data.
| b2Shape | |
| b2PolygonShape | |||
![]() | b2Shape | ||
|
| b2PolygonShape | ||
|
| b2PolygonShape | ||
|
UpdateSweepRadius(center:b2Vec2):void
| b2PolygonShape | ||
| m_centroid | property |
public var m_centroid:b2Vec2
| m_coreVertices | property |
public var m_coreVertices:Array
| m_normals | property |
public var m_normals:Array
| m_obb | property |
public var m_obb:b2OBB
| m_vertexCount | property |
public var m_vertexCount:int
| m_vertices | property |
public var m_vertices:Array
| b2PolygonShape | () | constructor |
| Centroid | () | method |
public function Centroid(xf:b2XForm):b2Vec2Get the centroid and apply the supplied transform.
Parametersxf:b2XForm |
b2Vec2 |
| ComputeAABB | () | method |
| ComputeCentroid | () | method |
public static function ComputeCentroid(vs:Array, count:int):b2Vec2Parameters
vs:Array |
|
count:int |
b2Vec2 |
| ComputeMass | () | method |
public override function ComputeMass(massData:b2MassData):voidParameters
massData:b2MassData |
See also
| ComputeOBB | () | method |
public static function ComputeOBB(obb:b2OBB, vs:Array, count:int):voidParameters
obb:b2OBB |
|
vs:Array |
|
count:int |
| ComputeSweptAABB | () | method |
public override function ComputeSweptAABB(aabb:b2AABB, transform1:b2XForm, transform2:b2XForm):voidParameters
aabb:b2AABB |
|
transform1:b2XForm |
|
transform2:b2XForm |
| GetCentroid | () | method |
| GetCoreVertices | () | method |
public function GetCoreVertices():ArrayGet the core vertices in local coordinates. These vertices represent a smaller polygon that is used for time of impact computations.
ReturnsArray |
| GetFirstVertex | () | method |
public function GetFirstVertex(xf:b2XForm):b2Vec2Get the first vertex and apply the supplied transform.
Parametersxf:b2XForm |
b2Vec2 |
| GetNormals | () | method |
public function GetNormals():ArrayGet the edge normal vectors. There is one for each vertex.
ReturnsArray |
| GetOBB | () | method |
public function GetOBB():b2OBBGet the oriented bounding box relative to the parent body.
Returnsb2OBB |
| GetVertexCount | () | method |
public function GetVertexCount():intGet the vertex count.
Returnsint |
| GetVertices | () | method |
public function GetVertices():ArrayGet the vertices in local coordinates.
ReturnsArray |
| Support | () | method |
public function Support(xf:b2XForm, dX:Number, dY:Number):b2Vec2Parameters
xf:b2XForm |
|
dX:Number |
|
dY:Number |
b2Vec2 |
| TestPoint | () | method |
public override function TestPoint(xf:b2XForm, p:b2Vec2):BooleanParameters
xf:b2XForm |
|
p:b2Vec2 |
Boolean |
See also
| TestSegment | () | method |
public override function TestSegment(xf:b2XForm, lambda:Array, normal:b2Vec2, segment:b2Segment, maxLambda:Number):BooleanParameters
xf:b2XForm |
|
lambda:Array |
|
normal:b2Vec2 |
|
segment:b2Segment |
|
maxLambda:Number |
Boolean |
See also
| UpdateSweepRadius | () | method |