Pymunx/Documentation

From OLPC
< Pymunx
Revision as of 20:01, 8 March 2008 by Crazy-chris (talk | contribs) (init)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

pymunx

Physics API for easy usage of chipmunk physics engine in pygame (with pymunk)
pymunx.__init__ Init function: pymunk, get flags, get screen size, init space
pymunx.set_info Set the Info-Text for the upper left corner
pymunx.flipy Convert Chipmunk y-coordinate to pyGame
pymunx.vec2df Convert a pygame pos to a vec2d with flipped y coordinate
pymunx.autoset_screen_size Get screensize from pygame
pymunx.get_pymunk_flags Check pymunk version and adjusts settings
pymunx.update Update the physics space
pymunx.draw Call draw_shape for each element
pymunx.draw_shape Draw a given shape (circle, segment, poly) on the surface
pymunx.add_wall Add a fixed wall
pymunx.add_ball Add a ball
pymunx.add_square Add a square
pymunx.add_poly Add a polygon


pymunx.__init__

pymunx.set_info

pymunx.flipy

pymunx.vec2df

pymunx.autoset_screen_size

pymunx.get_pymunk_flags

pymunx.update

pymunx.draw

pymunx.draw_shape

pymunx.add_wall

pymunx.add_ball

pymunx.add_square

pymunx.add_poly