![]() |
#1
|
|||
|
|||
![]()
Hello, is are there function that can help me check if an object is inside an area or inside another object.
illustration 1: how will I check if a wheelchair is inside the train or inside house illustration 2: how will I check if a wheelchair is inside an inclosed area in the world Last edited by Chapre; 10-06-2010 at 11:47 PM. |
#2
|
|||
|
|||
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' |
#3
|
|||
|
|||
Thanks a lot farshizzo, this is what I needed
|
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
retrieve Object names | Geoffrey | Vizard | 11 | 12-11-2009 04:26 AM |
why is time faster in my virtual world? | billjarrold | Vizard | 1 | 11-24-2009 05:33 PM |
Gps input for viewpoint location? | realvision | Vizard | 3 | 03-19-2008 12:37 PM |
Object rotating around world axis, not own axis | tacbob | Vizard | 1 | 02-15-2007 09:12 AM |
rotate to object | jargon | Vizard | 1 | 08-08-2005 12:20 PM |