View Single Post
  #2  
Old 10-07-2010, 12:48 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
If you have the bounding box the enclosed area and the position of the wheelchair, then you can use the following code to check whether the wheelchair is inside the enclosed area:
Code:
# bb is bounding box of enclosed area
# p is [x,y,z] position of wheelchair

if (bb.xmin <= p[0] <= bb.xmax) and (bb.ymin <= p[1] <= bb.ymax) and (bb.zmin <= p[2] <= bb.zmax):
	print 'Wheelchair inside'
else:
	print 'Wheelchair outside'
Reply With Quote