GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 20-Jan-2009, 06:20
boxrick boxrick is offline
New Member
 
Join Date: Jan 2009
Posts: 1
boxrick is on a distinguished road

C++ Direct 3D bounding boxes! Need a lil help


Im currently creating a 3d world using direct x. I am working on collisions, I use the D3D command

Quote:
D3DXComputeBoundingBox()

Then input all the vertices etc to calculate my bounding box, and put them into multiple D3DXVECTOR3 to hold all the values of the corners of my bounding box.

I then simplify it to make collision handling less CPU intensive by making it so the bounding boxes are all on the same axis.... ( This step is pretty irrelevant to my question )

So now i have my bounding box with a number of x y and z co ordinates.

This is where im struggling, i need to convert my bounding box into world space so it knows where it is in the world. Currently i do this by each entity holding its own position in the world, it knows where it is and when it comes to render it is rendered at that specific position. Each time a specific entity moves the bounding box is updated with the object. So if it is resized the bounding box is resized the same amount, if the object moves the position of the bounding box is also moved the same amount.

Am i doing this the correct way, i feel my process is awefully ineffecient. Because with every object movement i have to update a box. Can someone point me in a more sensible direction or am i doing this the correct way?
 
 

Recent GIDBlogProgramming ebook direct download available by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding check boxes to Dialog at run time manmfc MS Visual C++ / MFC Forum 2 30-Apr-2008 01:57
Does Chronopay a direct payment processor? Mandel.m eCommerce / Merchant Account Forum 7 21-Nov-2006 01:05
Traversing multiple dialog boxes Chronocide MS Visual C++ / MFC Forum 0 05-Sep-2006 00:27
Need help for string display in new line in Edit boxes Amar MS Visual C++ / MFC Forum 1 25-Aug-2005 14:48
help with direct draw? sitruc7 C++ Forum 1 02-May-2005 12:59

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 06:27.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.