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

Type XYZDict

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.
Method Summary
  __init__(self, resolution)
  add(self, position, item)
Add a item.
  calc_geom_key(self, position)
Calculates the cube key for the given position.
  iter_all(self)
Iter all items
  iter_contact_distance(self, distance)
Iterates all items within a given contact distance.
  iter_cube_intersection(self, position, radius)
Iterate all objects which intersect the cube in no particular order.
  iter_sphere_intersection(self, position, radius)
Iterate all objects which intersect the cube in no particular order.
  remove(self, position, item)
Remove an item.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

add(self, position, item)

Add a item.

calc_geom_key(self, position)

Calculates the cube key for the given position.

iter_all(self)

Iter all items

iter_contact_distance(self, distance)

Iterates all items within a given contact distance.

iter_cube_intersection(self, position, radius)

Iterate all objects which intersect the cube in no particular order.

iter_sphere_intersection(self, position, radius)

Iterate all objects which intersect the cube in no particular order.

remove(self, position, item)

Remove an item.

Generated by Epydoc 2.1 on Sun Apr 23 22:08:38 2006 http://epydoc.sf.net