getSceneNodeFromScreenCoordinatesBB

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
tjuhzj
Posts: 44
Joined: Mon Mar 27, 2006 7:00 am

getSceneNodeFromScreenCoordinatesBB

Post by tjuhzj »

Hi everybody,
I am not able to make full sense of getSceneNodeFromScreenCoordinatesBB function. I have no idea about how to use its second parameter. Is there anybody could give me some explanation? an example would be the best! :-)

Thanks!

Code: Select all

virtual ISceneNode* irr::scene::ISceneCollisionManager::getSceneNodeFromScreenCoordinatesBB  (  core::position2d< s32 >  pos,  
  s32  idBitMask = 0 
 )  [pure virtual] 
 
   Returns the scene node, which is currently visible under the overgiven screencoordinates, viewed from the currently active camera. The collision tests are done using a bounding box for each scene node. 

Parameters:
 pos,:  Position in pixel screen coordinates, under which the returned scene node will be.  
 idBitMask,:  Only scene nodes with an id with bits set like in this mask will be tested. If the BitMask is 0, this feature is disabled.  
 
________
Taoism Forum
Last edited by tjuhzj on Sun Feb 27, 2011 10:51 pm, edited 1 time in total.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Each scene node has an idea which you can freely set. In order to group some nodes you can use a range of numbers with a specific bit pattern (i.e. all mosters have bit 16 set, all walls have bit 17 set and so forth). Then you can do selections only within some group of nodes by specifiying this second parameter (e.g. '1<<15' for the monsters).
Post Reply