PDA

View Full Version : OpenGL solid models



adityask
03-17-2002, 11:30 PM
hello,
how to make OpenGL objects behave like solid models i.e. placing one on top of another,
not allowing two objects to be drawn at the same place? In other words how to give a physical character to the OpenGL objects?
thanx in advance.

Olive
03-17-2002, 11:42 PM
This is probably a stupid answer, but then, I haven't really understood the question. This is more a question of collision detection and management and has nothing to do with OpenGL.

richardve
03-18-2002, 12:17 AM
Try the Collision Detection Tutorial @ http://NeHe.GameDev.net (http://nehe.gamedev.net)

MickeyMouse
03-18-2002, 02:14 AM
that's pretty simple...just put this line at the beginning of your rendering code
glDisable(GL_ALLOW_INTERSECTING_OBJECTS)

hope this helps http://www.opengl.org/discussion_boards/ubb/smile.gif

MickeyMouse
03-18-2002, 02:22 AM
but in case that doesn't work on your hardware try bsp, quad, oct, any...tree partitioning space into small parts....
it's a bit difficult to do this dynamically (your tree changes), but it's still possible to have logN (N=number of triangles) complexity of your algorithm
good luck!

richardve
03-18-2002, 02:49 AM
Mickey, don't throw the poor guy in the middle of the programming-ocean by talking about things you don't really need for collision detection..

Just learn how to do CD first, that's already though enough.
(assuming that he's a beginner)

Marc
03-18-2002, 03:28 AM
Assume that your objects are completely made up of bosons. They are allowed to be at the same place at the same time. Then you don't have to care about it http://www.opengl.org/discussion_boards/ubb/wink.gif

(Just joking)

You need collision detection.