3D向量相乘时什么意思
//IDirect3DDevice9* Device = 0;
//const int Width = 800;
//const int Height = 600;
//IDirect3DVertexBuffer9* VB = 0;
//IDirect3DIndexBuffer9* IB = 0;
{
if(Device)
{
D3DXMATRIX Rx,Ry;
DDXMatrixRotationX(&Rx,3.14f / 9.0f);
static float y = 0.0f;
D3DXMatrixRotationY(&Ry,y);
y+=timeDelta;
if(y>=6.28f)
y = 0.0f;
D3DXMATRIX p = Rx * Ry;
Device -> SetTransform(D3DTS_WORLD,&p);
Device -> Clear(0,0,D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffffff,1.0f,0);
Device -> BeginScene();
Device -> setIndices(IB;
Device -> SetFVF(Vertex:FVF);
Device -> DrawIndexedPrimitive(D3DPT_TRIANGLELIST,0,0,8,0,12);
Device -> EndScene();
Device -> Present(0,0,0,0);
}
[解决办法]
坐标变换。