rotating cube

Started by
1 comment, last by phil67rpg 11 years, 10 months ago
I have drawn a wireframe cube and I wanted to rotate it.Here is the code I am working on.

void SetupMatrices(void)
{
float x=10.0f,y=10.0f,z=5.0f,r=D3DX_PI/2.0;
float world=5.0f;
D3DXMATRIX matWorld;
D3DXMATRIX matTemp;
D3DXMATRIX* D3DXMatrixTranslation( D3DXMATRIX &matWorld, float x, float y, float z );
D3DXMATRIX* D3DXMatrixRotationY( D3DXMATRIX &matTemp, float r );
D3DXMATRIX* D3DXMatrixMultiply( D3DXMATRIX &matWorld, float world, D3DXMATRIX &matTemp );
D3DXMATRIX* D3DXMatrixTranslation( D3DXMATRIX &matTemp, float x, float y, float z );
D3DXMATRIX* D3DXMatrixMultiply( D3DXMATRIX &matWorld, float world, D3DXMATRIX &matTemp );
d3ddev->SetTransform( D3DTS_WORLD, &matWorld );
}

I will do more research on dx9 and matrices.
Advertisement
I keep getting the following error.

[font="Consolas"][size="1"][font="Consolas"][size="1"]triangledx9.obj : error LNK2019: unresolved external symbol _D3DXMatrixMultiply@12 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ)[/font][/font]
[font="Consolas"][size="1"][font="Consolas"][size="1"]1>triangledx9.obj : error LNK2019: unresolved external symbol _D3DXMatrixRotationY@8 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ)[/font][/font]
[font="Consolas"][size="1"][font="Consolas"][size="1"]1>triangledx9.obj : error LNK2019: unresolved external symbol _D3DXMatrixTranslation@16 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ)[/font][/font]
[font="Consolas"][size="1"][font="Consolas"][size="1"]1>C:\Users\phil\Desktop\bgp_sources\vcnet2003\VCNET2003\chapter06\load_bitmap riangledx9\Debug riangledx9.exe : fatal error LNK1120: 3 unresolved externals[/font][/font]
[font="Consolas"][size="1"][font="Consolas"][size="1"]==[/font][/font]
well after research I solved the error.

This topic is closed to new replies.

Advertisement