Class pymunk.Segment

Shape --+
        |
       Segment
A line segment shape between two points This shape is mainly intended as a static shape.

Methods

  __init__(self, body, a, b, radius)
body is the body to attach the segment to, a and b are the endpoints, and radius is the thickness of the segment.
  __del__(self) (Inherited from pymunk.Shape)
  cache_bb(self) (Inherited from pymunk.Shape)

Properties

  a
One of the two endpoints for this segment
  b
One of the two endpoints for this segment
  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, a, b, radius)
body is the body to attach the segment to, a and b are the endpoints, and radius is the thickness of the segment.
Overrides:
Shape.__init__

Property Details

a

One of the two endpoints for this segment

b

One of the two endpoints for this segment