Platform SDK: DirectX |
The D3DXVec2CCW function returns the z-component by taking the cross product of two 2-D vectors.
float D3DXVec2CCW( const D3DXVECTOR2* pV1, const D3DXVECTOR2* pV2 );
The z-component.
This function determines the z-component by determining the cross-product based on the following formula: ((x1,y1,0) cross (x2,y2,0)); or, in code:
pV1->x * pV2->y - pV1->y * pV2->x
If the value of the z-component is positive, the vector V2 is counter-clockwise from the vector V1. This information is useful for back-face culling.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Version: Requires DirectX 7.0.
Header: Declared in d3dxmath.h.
Library: Use d3dx.lib.