b2PolygonShape
b2PolygonShape
Box2D.Collision.ShapesInheritance: System.Object → Box2D.Collision.Shapes.b2Shape
Constructors
b2PolygonShape()
b2PolygonShape()()b2PolygonShape(b2PolygonShape)
b2PolygonShape(b2PolygonShape)(Box2D.Collision.Shapes.b2PolygonShape copy)Parameters:
copy (Box2D.Collision.Shapes.b2PolygonShape)Fields
Centroid(Box2D.Common.b2Vec2)
Normals(Box2D.Common.b2Vec2[])
Vertices(Box2D.Common.b2Vec2[])
Properties
VertexCount(System.Int32)
Methods
Clone()
Box2D.Collision.Shapes.b2Shape Clone()()Returns:
Box2D.Collision.Shapes.b2ShapeExample
ComputeAABB(out b2AABB, ref b2Transform, int)
ComputeAABB(out b2AABB, ref b2Transform, int)(Box2D.Collision.b2AABB output, Box2D.Common.b2Transform xf, System.Int32 childIndex)Parameters:
output (Box2D.Collision.b2AABB)xf (Box2D.Common.b2Transform)childIndex (System.Int32)Example
ComputeCentroid(b2Vec2[], int)
Box2D.Common.b2Vec2 ComputeCentroid(b2Vec2[], int)(Box2D.Common.b2Vec2[] vs, System.Int32 count)Parameters:
vs (Box2D.Common.b2Vec2[])count (System.Int32)Returns:
Box2D.Common.b2Vec2ComputeMass(float)
Box2D.Collision.Shapes.b2MassData ComputeMass(float)(System.Single density)Parameters:
density (System.Single)Returns:
Box2D.Collision.Shapes.b2MassDataExample
GetChildCount()
System.Int32 GetChildCount()()Returns:
System.Int32Example
RayCast(out b2RayCastOutput, b2RayCastInput, ref b2Transform, int)
System.Boolean RayCast(out b2RayCastOutput, b2RayCastInput, ref b2Transform, int)(Box2D.Collision.b2RayCastOutput output, Box2D.Collision.b2RayCastInput input, Box2D.Common.b2Transform xf, System.Int32 childIndex)Parameters:
output (Box2D.Collision.b2RayCastOutput)input (Box2D.Collision.b2RayCastInput)xf (Box2D.Common.b2Transform)childIndex (System.Int32)Returns:
System.BooleanExample
Set(b2Vec2[], int)
Set(b2Vec2[], int)(Box2D.Common.b2Vec2[] vertices, System.Int32 count)Parameters:
vertices (Box2D.Common.b2Vec2[])count (System.Int32)SetAsBox(float, float)
SetAsBox(float, float)(System.Single hx, System.Single hy)Parameters:
hx (System.Single)hy (System.Single)SetAsBox(float, float, b2Vec2, float)
SetAsBox(float, float, b2Vec2, float)(System.Single hx, System.Single hy, Box2D.Common.b2Vec2 center, System.Single angle)Parameters:
hx (System.Single)hy (System.Single)center (Box2D.Common.b2Vec2)angle (System.Single)TestPoint(ref b2Transform, b2Vec2)
System.Boolean TestPoint(ref b2Transform, b2Vec2)(Box2D.Common.b2Transform xf, Box2D.Common.b2Vec2 p)Parameters:
xf (Box2D.Common.b2Transform)p (Box2D.Common.b2Vec2)Returns:
System.BooleanExample