Sign in to follow this  

XMVECTORF32

This topic is 2817 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
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

This topic is 2817 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this