Package mmLib :: Module GeometryDict :: Class XYZDict
[hide private]
[frames] | no frames]

Class XYZDict

source code

object --+
         |
        XYZDict

Hash all objects according to their position, allowing spacial location of objects quickly. This is a brain-dead simple implementation, but it gets the job done.

Instance Methods [hide private]
 
__init__(self, resolution)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
calc_geom_key(self, position)
Calculates the cube key for the given position.
source code
 
add(self, position, item)
Add a item.
source code
 
remove(self, position, item)
Remove an item.
source code
 
iter_all(self)
Iter all items
source code
 
iter_cube_intersection(self, position, radius)
Iterate all objects which intersect the cube in no particular order.
source code
 
iter_sphere_intersection(self, position, radius)
Iterate all objects which intersect the cube in no particular order.
source code
 
iter_contact_distance(self, distance)
Iterates all items within a given contact distance.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, resolution)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)