Archived

This topic is now archived and is closed to further replies.

nick5454

Testing if a D3DXMATRIX is NULL

Recommended Posts

How would I do that, i guess I would do an operator overload but not sure. I just want to be able to see if it has been intialized with values

Share this post


Link to post
Share on other sites

D3DXMatrix Example;
if(D3DXMatrixIsIdentity(&Example))
// is an identity matrix, not sure if constructor initializes


Share this post


Link to post
Share on other sites
Well I have this

D3DXMATRIX test;

if ( m_bRotateX )
D3DXMatrixRotateX(&test,radAngle);

then later

...

if ( test != NULL )
... do something ...

but the problem is it doesn''t accept null because its numerical. Maybe I should do

if ( &test != NULL )

is that right

Share this post


Link to post
Share on other sites
umm no, local variables can''t be destroyed lke that. test is gaurenteed to exist when you check it for null, and passing the address will always pass because it always exists.

Share this post


Link to post
Share on other sites