View Full Version : select object from multiple object and rotate

03-05-2011, 10:57 AM

i want to know how can i select one object form multiple object on screen and can allow user interaction to it like rotation or translation

i know how to do rotation of one object using mouse

but i want to know can we do selection one object in multiple object

03-05-2011, 03:57 PM
You can do "color picking" as described here. http://www.opengl.org/wiki/Common_Mistakes#Selection_and_Picking_and_Feedback _Mode

You can also do raycasting. There are functions available in physics libraries such as Newton.
There is also glhDoesRayCrossTrianglef in my glhlib library. See signature.

For moving objects, look at how Blender does it.