Jump to content
  • Advertisement
Sign in to follow this  
neeker

XMVector3Project implementation

This topic is 1633 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

 

I need to transform an object's world coordinate vertex into screen coordinates.  It seems like XMVector3Project would do this, but unfortunately I can't use DXMath so I have to come up with the implementation by hand.

 

My linear-algebra-mojo isn't that strong, so I'm having a difficult time figuring out exactly what this function does.  Anyone know for sure?

 

Share this post


Link to post
Share on other sites
Advertisement

Why exactly can't you use DXMath? (or the older and now deprecated XNAMath, or the even older D3DX* math functions, each one has a project/unproject set).

 

Anyways, you can check out the source for D3DXVecProject here, which is the older, scalar version, and should be a little easier to understand and copy into an existing project, all you need is matrix by matrix and matrix by vector multiplies.

 

 

Share this post


Link to post
Share on other sites

Anyways, you can check out the source for D3DXVecProject here, which is the older, scalar version, and should be a little easier to understand and copy into an existing project, all you need is matrix by matrix and matrix by vector multiplies.

 

That's exactly what I was looking for Necrolis!  I can't use any extensions of DirectX (DXMath, D3DX, etc.) due to project requirements, so mostly I've been copying the wine implementations of the D3DX functions I've needed.  I didn't realize there was a version implemented in D3DX.  Kudos.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!