Trees | Index | Help |
|
---|
Module ode :: Class SpaceBase |
|
object
--+ |GeomObject
--+ | SpaceBase
HashSpace
,
QuadTreeSpace
,
SimpleSpace
Space class (container for geometry objects).
A Space object is a container for geometry objects which are used to do collision detection. The space does high level collision culling, which means that it can identify which pairs of geometry objects are potentially touching.
This Space class can be used for both, a SimpleSpace and a HashSpace (see ODE documentation).
>>> space = Space(type=0) # Create a SimpleSpace
>>> space = Space(type=1) # Create a HashSpace
Method Summary | |
---|---|
x.__init__(...) initializes x; see x.__class__.__doc__ for signature | |
x.__iter__() <==> iter(x) | |
x.__len__() <==> len(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
Add a geom to a space. | |
Call a callback function one or more times, for all potentially intersecting objects in the space. | |
GeomObject |
Return the geom with the given index contained within the space. |
int |
Return the number of geoms contained within the space. |
bool |
Return True if the given geom is in the space. |
Remove a geom from a space. | |
_id(...)
| |
Inherited from GeomObject | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__setattr__('name', value) <==> x.name = value | |
Disable the geom. | |
Enable the geom. | |
6-tuple |
Return an axis aligned bounding box that surrounds the geom. |
Body |
Get the body associated with this geom. |
long |
Return the "category" bitfields for this geom. |
long |
Return the "collide" bitfields for this geom. |
3-tuple |
Get the current position of the geom. |
(w,x,y,z) |
Get the current orientation of the geom. |
9-tuple |
Get the current orientation of the geom. |
Space |
Return the space that the given geometry is contained in, or return None if it is not contained in any space. |
bool |
Return True if the geom is enabled. |
bool |
Return 1 if the given geom is a space, or 0 if not. |
bool |
Returns True if the geom object is a placeable geom. |
Set the body associated with a placeable geom. | |
Set the "category" bitfields for this geom. | |
Set the "collide" bitfields for this geom. | |
Set the position of the geom. | |
Set the orientation of the geom. | |
Set the orientation of the geom. | |
Inherited from object | |
x.__hash__() <==> hash(x) | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__str__() <==> str(x) |
Method Details |
---|
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for
signature
|
__iter__(x)x.__iter__() <==> iter(x)
|
__len__(x)
x.__len__() <==> len(x)
|
__new__(T, S, ...)T.__new__(S, ...) -> a new object with type S, a subtype of T
|
add(geom)Add a geom to a space. This does nothing if the geom is already in the space.
|
collide(arg, callback)Call a callback function one or more times, for all potentially intersecting objects in the space. The callback function takes 3 arguments: def NearCallback(arg, geom1, geom2): The arg parameter is just passed on to the callback function. Its meaning is user defined. The geom1 and geom2 arguments are the geometry objects that may be near each other. The callback function can call the function collide() (not the Space method) on geom1 and geom2, perhaps first determining whether to collide them at all based on other information.
|
getGeom(idx)Return the geom with the given index contained within the space.
|
getNumGeoms()Return the number of geoms contained within the space.
|
query(geom)Return True if the given geom is in the space.
|
remove(geom)Remove a geom from a space.
|
Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sun Feb 4 17:54:12 2007 | http://epydoc.sf.net |