_device->GetTransform(D3DTS_PROJECTION, &proj);
_device->GetTransform(D3DTS_VIEW, &view);
GetCursorPos(&ptCursor);
ScreenToClient(GetCapture(), &ptCursor);
numVerts = mesh->_mesh->GetNumVertices();
fvf = mesh->_mesh->GetFVF();
vertSize = D3DXGetFVFVertexSize(fvf);
mesh->_mesh->LockVertexBuffer(0, &ptr)
for( DWORD i=0; i<numVerts; i++ )
{
D3DXVECTOR3* vPtr = (D3DXVECTOR3*)ptr;
D3DXVECTOR3 temp;
D3DXVec3TransformCoord(&temp, vPtr, &view); // Is this right?
D3DXVec3TransformCoord(&temp, vPtr, &proj); // as well as this?
vPtr->x += temp.x*ptCursor.x; // this doesn't work
}
I read a post here that said you multiply the Vertex by the view matrix, then the projection matrix...











