Package pymunk :: Class Poly
[frames] | no frames]

Class Poly

object --+    
         |    
     Shape --+
             |
            Poly

A polygon shape
Instance Methods
 
__init__(self, body, vertices, offset, auto_order_vertices=False)
Create a polygon
 
get_points(self)
 
__del__(self) (Inherited from pymunk.Shape)
 
cache_bb(self) (Inherited from pymunk.Shape)

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

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)

Inherited from object: __class__

Method Details

__init__(self, body, vertices, offset, auto_order_vertices=False)
(Constructor)

 

Create a polygon

body : Body
The body to attach the poly to
vertices : [(x,y)] or [Vec2d]
Define a convex hull of the polygon with a counterclockwise winding.
offset : (x,y) or Vec2d
The offset from the body's center of gravity in body local coordinates.
auto_order_vertices : bool
Set to True to automatically order the vertices. Currently not supported.
Overrides: object.__init__