Class pymunk.Poly

Shape --+
        |
       Poly
A polygon shape

Methods

  __init__(self, body, vertices, offset, auto_order_vertices=False)
body is the body to attach the poly to, verts is an array of cpVect's defining a convex hull with a counterclockwise winding, offset is the offset from the body's center of gravity in body local coordinates.
  get_points(self)
  __del__(self) (Inherited from pymunk.Shape)
  cache_bb(self) (Inherited from pymunk.Shape)

Properties

  body (Inherited from pymunk.Shape)
  collision_type (Inherited from pymunk.Shape)
  elasticity
Elasticity of the shape.
(Inherited from pymunk.Shape)
  friction
Friction coefficient.
(Inherited from pymunk.Shape)
  group
Shapes in the same non-zero group do not generate collisions.
(Inherited from pymunk.Shape)
  id (Inherited from pymunk.Shape)
  layers
Shapes only collide if they are in the same bit-planes.
(Inherited from pymunk.Shape)
  surface_velocity
The surface velocity of the object.
(Inherited from pymunk.Shape)

Method Details

__init__

(Constructor) __init__(self, body, vertices, offset, auto_order_vertices=False)
body is the body to attach the poly to, verts is an array of cpVect's defining a convex hull with a counterclockwise winding, offset is the offset from the body's center of gravity in body local coordinates. Set auto_order_vertices to automatically order the vertices
Overrides:
Shape.__init__