Archived

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

click

Bounding sphere tree

Recommended Posts

How can I build Boundingsphere tree? I calculated BS radius and center of my object, using D3DXComputeBoundingSphere. But I want to subdivide BS into smaller parts for collision detection to done better. Can anyone show me the way or address on the net. Thanks.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Well I don''t know which DX utils functions exist but this can be done fairly easily:

Make a linked list structure which has you bounding sphere data (either directly or as a pointer to your data) and then a certain number of kids -> probably 2 to 4 is a good option but if you want a variable amount you could always point to an array of kids or define 2 types of pointers: kid pointers and brother pointers (I''d probably just adjust my engine for a certain amount of kid pointers or an array, always remember these words which allow people to make great games: "KEEP IT SIMPLE, STUPID".

Share this post


Link to post
Share on other sites