How to select nodes behind a 2d rectangle ?

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
khayyam
Posts: 7
Joined: Fri Mar 09, 2007 8:52 pm
Location: France

How to select nodes behind a 2d rectangle ?

Post by khayyam »

Hi all,

I'm trying to implement a rectangle selection functionality, so I draw a 2d rectangle on the screen and I would like to get all the objets whose screen projection is inside this rectangle.

First idea : project all the objects on the screen with ISceneCollisionManager ::getScreenCoordinatesFrom3DPosition and check if they are or not inside the rectangle. But I need to iterate on all (or at at least on a lot of) my objects.

But, as well there is a solution to select a node from a 2d screen position, isn't it something similar to select everything that is behind a 2d rectangle ?
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

Look at my topic here: Selecting nodes in a region. Maybe it will help you.
Post Reply