Only cast rays that intersect with the bbox
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import itertools
|
||||
import numpy as np
|
||||
|
||||
import active_grasp.msg
|
||||
@@ -9,6 +10,10 @@ class AABBox:
|
||||
self.min = bbox_min
|
||||
self.max = bbox_max
|
||||
|
||||
@property
|
||||
def corners(self):
|
||||
return list(itertools.product(*np.vstack((self.min, self.max)).T))
|
||||
|
||||
def is_inside(self, p):
|
||||
return np.all(p > self.min) and np.all(p < self.max)
|
||||
|
||||
|
Reference in New Issue
Block a user