Sign in to follow this  
phil67rpg

rotating cube

Recommended Posts

phil67rpg    443
I have drawn a wireframe cube and I wanted to rotate it.Here is the code I am working on.
[code]
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 );
}
[/code]
I will do more research on dx9 and matrices.

Share this post


Link to post
Share on other sites
phil67rpg    443
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)[/size][/font][/size][/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)[/size][/font][/size][/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)[/size][/font][/size][/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[/size][/font][/size][/font]
[font="Consolas"][size="1"][font="Consolas"][size="1"]==[/size][/font][/size][/font]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this