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.
2 replies to this topic
#1 GDNet+ - Reputation: 515
Posted 27 May 2012 - 02:11 PM
I have drawn a wireframe cube and I wanted to rotate it.Here is the code I am working on.
Sponsor:
#2 GDNet+ - Reputation: 515
Posted 27 May 2012 - 06:45 PM
I keep getting the following error.
triangledx9.obj : error LNK2019: unresolved external symbol _D3DXMatrixMultiply@12 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ)
1>triangledx9.obj : error LNK2019: unresolved external symbol _D3DXMatrixRotationY@8 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ)
1>triangledx9.obj : error LNK2019: unresolved external symbol _D3DXMatrixTranslation@16 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ)
1>C:\Users\phil\Desktop\bgp_sources\vcnet2003\VCNET2003\chapter06\load_bitmap riangledx9\Debug riangledx9.exe : fatal error LNK1120: 3 unresolved externals
==
triangledx9.obj : error LNK2019: unresolved external symbol _D3DXMatrixMultiply@12 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ)
1>triangledx9.obj : error LNK2019: unresolved external symbol _D3DXMatrixRotationY@8 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ)
1>triangledx9.obj : error LNK2019: unresolved external symbol _D3DXMatrixTranslation@16 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ)
1>C:\Users\phil\Desktop\bgp_sources\vcnet2003\VCNET2003\chapter06\load_bitmap riangledx9\Debug riangledx9.exe : fatal error LNK1120: 3 unresolved externals
==






