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):
160
160
vol *= ub - lb
161
161
return vol
162
162
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
+
163
178
def overlaps (self , aabb ):
164
179
"""Determine if two AABBs overlap
165
180
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def read(fname):
15
15
16
16
setup (
17
17
name = 'aabbtree' ,
18
- version = '2.3.1 ' ,
18
+ version = '2.4.0 ' ,
19
19
license = 'MIT' ,
20
20
description = 'Pure Python implementation of d-dimensional AABB tree.' ,
21
21
long_description = read ('README.rst' ),
@@ -45,6 +45,7 @@ def read(fname):
45
45
'Programming Language :: Python :: 3.5' ,
46
46
'Programming Language :: Python :: 3.6' ,
47
47
'Programming Language :: Python :: 3.7' ,
48
+ 'Programming Language :: Python :: 3.8' ,
48
49
'Topic :: Scientific/Engineering' ,
49
50
'Topic :: Scientific/Engineering :: Mathematics' ,
50
51
],
You can’t perform that action at this time.
0 commit comments