Sign in to follow this  


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:
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:
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

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