View Full Version : The best data structures for my application
01-20-2002, 06:24 AM
I'm starting on developping an application that will simulate a virtual mechanical environement. The ideea is that i'll also have to deal with large objects (>10000 vertices) that will be able to collide. As the collisions & physics will take a LOT of computing time, I want to ask you what would be the fastest method to store the data.
I remind you that i need to know the space position for each vertex at every time ( as I have to do colissions ).
Is there a "THE BEST WAY TO STORE & SEND DATA WHILE USING OPENGL", a way not to loose any time while rendering (time lost beacause I told badly to OpenGL what to do )?
01-20-2002, 10:51 AM
This can vary greatly. You may find that two data structures will be helpful. By the sounds of you desription, these are articulated models. So the >10000 vertices are not comprised of a single object, but more over split between numerous parts of an object. So, you might want to first split the object into parts and create a scene graph, with each node containing the geometery, bounding sphere, and a transformation.
The bounding sphere can be used to improve the collision detection problem. But then you will still have a tri-tri testing required if two spheres will collide. To improve this, you may want another data structure such as a bsp, which will be stored per node. This bsp would only be intended for collision detection and not render.
The rendering would use a static vertex array which you can through at the card, failry rapidly.
This is just my first thought, so it is probably not the "best" method, however it is a start for you to work from.
01-21-2002, 01:59 AM
Thanks for your reply, witcomb,
I want to ask you if you think I should use nVidia extensions and if you can provide me with
some GOOD links to BSP, Collision Detection ...
Any way, thanx again,
01-21-2002, 11:56 AM
A very good link is www.google.com, (http://www.google.com,) I'm sure you will find more then enough with the keywords BSP, and Collision Detection. You may also want to look up icollide, vcollide, etc. These are collision detection apis and are tuned to be very fast. This might save you alot of time and hassle.
As far as using the nVidia extensions, that is up to you. If you want performance and don't care if it will run on non-nVidia systems then go for it.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.