Testing if a D3DXMATRIX is NULL
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
D3DXMatrix Example;if(D3DXMatrixIsIdentity(&Example)) // is an identity matrix, not sure if constructor initializes
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
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
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement