File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,21 @@ def volume(self):
160160 vol *= ub - lb
161161 return vol
162162
163+ @property
164+ def corners (self ):
165+ """list: corner points of AABB"""
166+
167+ n_dim = len (self .limits )
168+ f = '{:0' + str (n_dim ) + 'b}'
169+
170+ n_corners = 2 ** n_dim
171+ corners = []
172+ for i in range (n_corners ):
173+ inds = [int (s ) for s in f .format (i )] # convert i to binary list
174+ corner = [self .limits [d ][ind ] for d , ind in enumerate (inds )]
175+ corners .append (corner )
176+ return corners
177+
163178 def overlaps (self , aabb ):
164179 """Determine if two AABBs overlap
165180
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def read(fname):
1515
1616setup (
1717 name = 'aabbtree' ,
18- version = '2.3.1 ' ,
18+ version = '2.4.0 ' ,
1919 license = 'MIT' ,
2020 description = 'Pure Python implementation of d-dimensional AABB tree.' ,
2121 long_description = read ('README.rst' ),
@@ -45,6 +45,7 @@ def read(fname):
4545 'Programming Language :: Python :: 3.5' ,
4646 'Programming Language :: Python :: 3.6' ,
4747 'Programming Language :: Python :: 3.7' ,
48+ 'Programming Language :: Python :: 3.8' ,
4849 'Topic :: Scientific/Engineering' ,
4950 'Topic :: Scientific/Engineering :: Mathematics' ,
5051 ],
You can’t perform that action at this time.
0 commit comments