0
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))*
(*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

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

0
101 Jan 05, 2011 at 00:47

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

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