Trees | Indices | Toggle frames |
---|
__init__(self, iterations=10) | |
__del__(self) | |
add(self,
*objs)
Add one or many shapes, bodies or joints to the space
|
|
add_static(self,
*objs)
Add one or many static shapes to the space
|
|
remove(self,
*objs)
Remove one or many shapes, bodies or joints from the space
|
|
remove_static(self,
*os)
Remove one or many static shapes from the space
|
|
resize_static_hash(self,
dim=100.0,
count=1000)
The spatial hashes used by Chipmunk's collision detection are fairly
size sensitive.
|
|
resize_active_hash(self,
dim=100.0,
count=1000)
The spatial hashes used by Chipmunk's collision detection are fairly
size sensitive.
|
|
rehash_static(self)
Rehashes the shapes in the static spatial hash.
|
|
step(self,
dt)
Update the space for the given time step.
|
|
add_collisionpair_func(self,
a,
b,
func,
data=None)
Register func to be called when a collision is found between a
shapes with collision_type fields that match a and b.
|
|
remove_collisionpair_func(self,
a,
b)
Remove the collision pair function between the shapes a and b
|
|
set_default_collisionpair_func(self,
func,
data=None)
Sets the default collsion pair function.
|
|
point_query(self,
point,
func,
data=None)
Query the space for collisions between a point and its shapes
(both static and nonstatic shapes)
|
|
static_point_query(self,
point,
func,
data=None)
Query the space for collisions between a point and the static
shapes in the space
|
|
nonstatic_point_query(self,
point,
func,
data=None)
Query the space for collisions between a point and the non static
shapes in the space
|
shapes | |
static_shapes | |
bodies | |
gravity | |
damping | |
stamp
Time stamp.
|
|
arbiters
List of active arbiters for the impulse solver.
|
The spatial hashes used by Chipmunk's collision detection are fairly size sensitive. dim is the size of the hash cells. Setting dim to the average objects size is likely to give the best performance.
count is the suggested minimum number of cells in the hash table. Bigger is better, but only to a point. Setting count to ~10x the number of objects in the hash is probably a good starting point.
The spatial hashes used by Chipmunk's collision detection are fairly size sensitive. dim is the size of the hash cells. Setting dim to the average objects size is likely to give the best performance.
count is the suggested minimum number of cells in the hash table. Bigger is better, but only to a point. Setting count to ~10x the number of objects in the hash is probably a good starting point.
Register func to be called when a collision is found between a shapes with collision_type fields that match a and b. Pass None as func to reject any collision with the given collision type pair.
func(shapeA, shapeB, contacts, normal_coef, data) -> bool
shapeA, shapeB is the colliding shapes contacts is a list of contacts normal_coef is a float :) data is the data argument sent to the add_collisionpair_func function
WARNING: It is not safe for collision pair functions to remove or free shapes or bodies from a space. Doing so will likely end in a segfault as an earlier collision may already be referencing the shape or body. You must wait until after the step() function returns.
Query the space for collisions between a point and its shapes (both static and nonstatic shapes)
func(shape, data)
shape is the colliding shape data is the data argument sent to the point_query function
Query the space for collisions between a point and the static shapes in the space
func(shape, data)
shape is the colliding shape data is the data argument sent to the point_query function
Query the space for collisions between a point and the non static shapes in the space
func(shape, data)
shape is the colliding shape data is the data argument sent to the point_query function
Trees | Indices | Toggle frames |
---|
Generated by Epydoc 3.0beta1 on Sun Jun 15 16:45:17 2008 | http://epydoc.sourceforge.net |