Jump to content
  • Advertisement
Sign in to follow this  
pcbrainbuster

D3DVECTOR and D3DX_VECTOR3 ---

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

Advertisement
D3DVECTOR3 is a basic struct, D3DXVECTOR3 has various other member functions I believe, and inherits from D3DVECTOR3 (Although I don;t have the SDK here to check). Normally, you'd want to use D3DXVECTOR3 unless you're not using D3DX.

EDIT: From the Documentation:
Quote:
This structure inherits the x, y and z members from the D3DVECTOR structure. C programmers cannot use the D3DXVECTOR3 structure. They must use the D3DVECTOR structure.

C++ programmers can take advantage of operator overloading and type casting with the D3DXVECTOR3 Extensions, which implement overloaded constructors, assignment, unary, and binary (including equality) operators.

Share this post


Link to post
Share on other sites
Thanks for that but then why do functions like D3DXMatrixPerspectiveFovLH use D3DXVECTOR3 while the direction member of the D3DLIGHT9 interface use D3DVECTOR?

Thanks again.

Share this post


Link to post
Share on other sites
Becouse D3DX is a set of high level library provided only for C++ programmers.
Obiously a D3DX function will use D3DX structures.

But you can also avoid using of D3DX and use normal structs.
So function that does not use D3DX library will use default version (D3DVECTOR and D3DMATRIX)

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!