can you pls modify my code, maybe this way things would be much brighter,
this is how i construct the quad for the front face of the model's bounding box,
D3DXVECTOR3 vMinBox1, vMaxBox1, vTriangle[4];ObjectB.GetBoundingBox(&vMinBox1, vMaxBox1);vMinBox1 += ObjectB.GetPos();vMaxBox1 += ObjectB.GetPos();vTriangle[0] = D3DXVECTOR3(vMinBox1.x, vMinBox1.y, vMinBox1.z);vTriangle[1] = D3DXVECTOR3(vMinBox1.x, vMaxBox1.y, vMinBox1.z);vTriangle[2] = D3DXVECTOR3(vMaxBox1.x, vMinBox1.y, vMinBox1.z);vTriangle[3] = D3DXVECTOR3(vMaxBox1.x, vMaxBox1.y, vMinBox1.z);
SetAMatrixIdentityForWorldTrans();
RenderQuad();
okey that renders properly the quad, even i scaled and translated anywhere ObjectB,
can you write the code plz how i would construct the quad once i started rotating the model using these?
//Transforms vector (x, y, z, 1) by a given matrixD3DXVec3Transform(D3DXVECTOR4 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM);// or?// Transforms a 3-D vector by a given matrix, projecting the result back into w = 1.D3DXVec3TransformCoord(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pSourceV, CONST D3DXMATRIX *pSourceM);
i have a slight idea why it doesn't work, but no idea how to make it work, i'd like to construct the triangle base from the model's min/max with the right orientation without using any transformations,
thanks,
[edited by - mickey on January 29, 2003 12:03:26 AM]