Changeset 7872 for trunk/anuga_core/source/anuga/geometry/quad.py
- Timestamp:
- Jun 24, 2010, 10:38:40 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/geometry/quad.py
r7866 r7872 17 17 18 18 class Cell(): 19 """ class Cell20 21 One cell in the plane.19 """ One cell in the plane. 20 A cell is defined by an AABB, and can have smaller AABB children. 21 The children can be rapidly searched for intersections in log(n) time. 22 22 """ 23 23 … … 38 38 39 39 def __repr__(self): 40 """ String representation of the quadtree. """ 40 41 ret_str = '%s: leaves: %d' \ 41 42 % (self.name , len(self.leaves)) … … 84 85 #return 85 86 86 # option 2 - try splitting 2 ways - no diff noticed in practise 87 # option 2 - try splitting 2 ways - no performance difference 88 # noticed in practise between this and the above option. 87 89 if subregion1.is_trivial_in(new_region): 88 90 self.children = [Cell(subregion1, self), \ … … 160 162 161 163 def test_leaves(self, point): 162 """ Test all leaves to see if they intersect x. 164 """ Test all leaves on this node to see if they intersect x. 165 Does not recurse into children. 163 166 x is a point to test 164 167 return a list of leaves that intersect x
Note: See TracChangeset
for help on using the changeset viewer.