Archived

This topic is now archived and is closed to further replies.

cossy74

Collision Detection / Line of Sight / etc

Recommended Posts

cossy74    122
Hi, Here the situation, i have a small engine that is capable of reading in data in the following structure D3DXVECTOR3 vL - location vector D3DXVECTOR3 vR - direction vector char* filetype - name of the object X file My question is this, A/ I was thinking of using octrees but every version/tutorial I know of uses polygon based input to create the tree. Does my using X files and their meshes exclude me from using octrees? If not, may I just use their rL(location vector) to determine which oct they are in? B/ If using their rL how do I get around a mesh that is very big? What I mean is a mesh center may be in a given oct but is actual mesh may cover more that one. C/ My main query is what would you suggest as a ( collision detection / line of sight / Object Selection for rendering ) structure? thanks cossy74@tpg.com.au

Share this post


Link to post
Share on other sites
Shannon Barber    1681
You need to calculate a bounding volume using the mesh created by loading the .x file, and use that volume to determine where in the oct-tree it goes. Then to do CD you CD with the. If it hits a bounding volume, you go on to more advanded test using the mesh to determine which polygon it intersects.
(A heirarchy of bounding volumes for the models greatly speeds up the process - that''s all an oct-tree really is too, but for th whole world).

Share this post


Link to post
Share on other sites