Package | Box2D.Collision.Shapes |
Class | public class b2PolygonShape |
Inheritance | 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]
http://www.geometrictools.com/Documentation/MinimumAreaRectangle.pdf
| 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 |
b2internal var m_centroid:b2Vec2
m_normals | property |
b2internal var m_normals:Array
m_vertexCount | property |
b2internal var m_vertexCount:int
m_vertices | property |
b2internal var m_vertices:Array
b2PolygonShape | () | constructor |
Centroid | () | method |
public function Centroid(xf:b2XForm):b2Vec2
Get the centroid and apply the supplied transform.
Parametersxf:b2XForm |
b2Vec2 |
ComputeAABB | () | method |
ComputeCentroid | () | method |
public static function ComputeCentroid(vs:Array, count:int):b2Vec2
Parameters
vs:Array |
|
count:int |
b2Vec2 |
ComputeMass | () | method |
public override function ComputeMass(massData:b2MassData):void
Parameters
massData:b2MassData |
See also
ComputeOBB | () | method |
public static function ComputeOBB(obb:b2OBB, vs:Array, count:int):void
http://www.geometrictools.com/Documentation/MinimumAreaRectangle.pdf
Parametersobb:b2OBB |
|
vs:Array |
|
count:int |
ComputeSweptAABB | () | method |
public override function ComputeSweptAABB(aabb:b2AABB, transform1:b2XForm, transform2:b2XForm):void
Parameters
aabb:b2AABB |
|
transform1:b2XForm |
|
transform2:b2XForm |
GetCentroid | () | method |
GetCoreVertices | () | method |
public function GetCoreVertices():Array
Get 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):b2Vec2
Get the first vertex and apply the supplied transform.
Parametersxf:b2XForm |
b2Vec2 |
GetNormals | () | method |
public function GetNormals():Array
Get the edge normal vectors. There is one for each vertex.
ReturnsArray |
GetOBB | () | method |
public function GetOBB():b2OBB
Get the oriented bounding box relative to the parent body.
Returnsb2OBB |
GetVertexCount | () | method |
public function GetVertexCount():int
Get the vertex count.
Returnsint |
GetVertices | () | method |
public function GetVertices():Array
Get the vertices in local coordinates.
ReturnsArray |
Support | () | method |
public function Support(xf:b2XForm, dX:Number, dY:Number):b2Vec2
Parameters
xf:b2XForm |
|
dX:Number |
|
dY:Number |
b2Vec2 |
TestPoint | () | method |
public override function TestPoint(xf:b2XForm, p:b2Vec2):Boolean
Parameters
xf:b2XForm |
|
p:b2Vec2 |
Boolean |
See also
TestSegment | () | method |
public override function TestSegment(xf:b2XForm, lambda:Array, normal:b2Vec2, segment:b2Segment, maxLambda:Number):Boolean
Parameters
xf:b2XForm |
|
lambda:Array |
|
normal:b2Vec2 |
|
segment:b2Segment |
|
maxLambda:Number |
Boolean |
See also
UpdateSweepRadius | () | method |