Jump to content

  • Log In with Google      Sign In   
  • Create Account

use return value of D3DXVec3TransformCoord


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 cozzie   Members   -  Reputation: 380

Like
0Likes
Like

Posted 09 March 2013 - 03:50 AM

Hi.

Simple question.

 

I can't figure out how to use the D3DXVECTOR3 return value of:

D3DXVec3TransformCoord

 

It returns a D3DXVECTOR3*.

 

I have a a D3DXVECTOR3: mBoudingBox.min.

 

I tried:

mBoundingBox.min = D3DXVec3TransformCoord(NULL, &mBoundingBox.min, &mMatWorld);

 

But it says "no operator matches these operands".

Looking it up in MSN says that the return value is a D3DXVECTOR3*.

 

I have it working when I replace NULL by the output vector, but just want to know why it doesn't work as return value.

 

 

 



Sponsor:

#2 Paradigm Shifter   Members   -  Reputation: 2226

Like
1Likes
Like

Posted 09 March 2013 - 04:16 AM

It returns the first argument. If you pass NULL as the first argument it won't work.

 

The return value is just an optional convenience if you wanted to use the returned vector as an argument to another function. Ignore the return value if you don't do that.


"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#3 cozzie   Members   -  Reputation: 380

Like
0Likes
Like

Posted 09 March 2013 - 04:58 AM

Thanks, I'm not doing that so I'll just use the first parameter.

For code reading I found it maybe handy to read vector = D3DXvec... etc.


Edited by cozzie, 09 March 2013 - 04:58 AM.





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