Errors with my geometric transformation

F4951afbfcbbe3384f964c254edf4d17
0
C__Learner 101 Dec 30, 2010 at 01:24

I am trying to perform a TRT matrix transform of my object.

Here’s what I have at the moment.

VOID D3DObject::setWorldMatrix()
{
      m_matWorld = (*D3DXMatrixTranslation( &D3DXMatrix(), 1.0, 0.0, 0.0f))*
      (*D3DXMatrixRotationX(&D3DXToRadian,(-120.0f)) )*
      (*D3DXMatrixTranslation(&D3DXMatrix(), 0.12, 0.3, 0.1f));
}

D3DXMATRIXA16 D3DObject::getWorldMat()
{
    return m_matWorld;
}

However, it’s not working because of an undeclared identifier for D3DXToRadian, and two unknown identifer mentions for the D3DXMatrix.

Anyone have a solution for this?

3 Replies

Please log in or register to post a reply.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Dec 30, 2010 at 06:42

First of all, please use …[/code[b][/b]] when posting code on the forum. As for your question, you need to #include the appropriate header file to get those declarations. Looking at MSDN, it appears to be D3dx9math.h. [code]…[/code**] when posting code on the forum.

As for your question, you need to #include the appropriate header file to get those declarations. Looking at MSDN, it appears to be D3dx9math.h.

F4951afbfcbbe3384f964c254edf4d17
0
C__Learner 101 Jan 05, 2011 at 00:47

Tried what you mentioned, but it still has the same problems.

F4951afbfcbbe3384f964c254edf4d17
0
C__Learner 101 Jan 05, 2011 at 04:03

problem seems to be solved.

instead of using &D3DXMatrix I replaced it with m_matWorld and seems to be working without errors now.

hope this helps anyone else who has this problem.