Skip to main content
gamedev.net
🔒 Locked

bounding box / sphere

Started by maddnig Apr 28, 2004 at 6:14 PM 4 replies 900+ views
Original Post
maddnig
maddnig
Is there a function in direct x to set up a bounding box around a mesh. And if so what is it. I know there are some to do with spheres. But as far a si can see they are only to check a sphere not to set one up around a mesh. So any feed back on this would be appreciated Of ether any functions to set up a bounding box or bounding sphere in dx
Nigel (Rolf) Blain BScTeam Camel
S1CA
S1CA
D3DXComputeBoundingBox(..)
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
maddnig
maddnig

thanks ,
but i have another problem with that. i had done some looking round and had found that function. that requires me to send it a vertex buffer. that i can retreve from a ID3DXMesh object(corect me if im wrong on that). by pMesh->LockVertexBffer(D3DLOCK_READONLY,(BYTE**)&Ptr) giving me the pointer to the vertex buffer. (well as far as i am awre it dous)

but i am not useing ID3DXMesh i am using LPD3DXMESH for the mesh object. am i able to use the -> functions from the ID3DXMesh on the LPD3DXMESH. and if not is there a way of converting it to a ID from an LP.

thanks

the rolf
Nigel (Rolf) Blain BScTeam Camel
Alvarny
Alvarny
The are the same thing. One is just defined as a pointer.
maddnig
maddnig
yes that is true.

and if any one else had been reading it is posible and it was as usual my own fault why i had a problem. lol

i have retreved the data from the mesh with no problem once i hade sorted out what was mesing my system up.


thanks all

the rolf
Nigel (Rolf) Blain BScTeam Camel
superpig
superpig
Yup, from the D3DX header:

typedef ID3DXMesh *LPD3DXMESH;
Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.