首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ Builder >

3D向量相乘时什么意思解决思路

2012-03-28 
3D向量相乘时什么意思//IDirect3DDevice9* Device 0//const int Width 800//const int Height 600

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);

}

[解决办法]
坐标变换。

热点排行