Jump to content

  • Log In with Google      Sign In   
  • Create Account

rotating cube


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 phil67rpg   Members   -  Reputation: 767

Like
0Likes
Like

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.
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.

Sponsor:

#2 phil67rpg   Members   -  Reputation: 767

Like
0Likes
Like

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
==

#3 phil67rpg   Members   -  Reputation: 767

Like
0Likes
Like

Posted 27 May 2012 - 06:55 PM

well after research I solved the error.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS