Jump to content
  • Advertisement
Sign in to follow this  
Quat

XMVECTORF32

This topic is 3031 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 am starting to look at the xnamath library and had a question of what XMVECTORF32 is useful for. The docs say:
Quote:
An opaque, portable type to support the use of C/C++ initializer syntax to load floating-point values into an instance of XMVECTOR type.
Then one of the sample apps do something like:
static const XMVECTORF32 g_vFLTMAX = { FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX };
...
m_vSceneAABBMin = g_vFLTMAX; 
where m_vSceneAABBMin is of type XMVECTOR. So it looks like you can assign XMVECTORF32 to XMVECTOR. However, why not use XMVectorSet or XMLoadFloat4? Is the sole purpose of XMVECTOR32 is to get initialization syntax? Why could they just not allow the initialization syntax on XMVECTOR directly?

Share this post


Link to post
Share on other sites
Advertisement
Any type that has a constructor cannot use the default initializer syntax.

I think that c++0x expanded on initiailzer syntax, but I don't recall exactly what that is.

Share this post


Link to post
Share on other sites
So the answer to

Quote:

Is the sole purpose of XMVECTOR32 is to get initialization syntax?


is Yes?

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!