Jump to content
  • Advertisement
Sign in to follow this  
phil67rpg

rotating cube

This topic is 2336 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!