Microsoft DirectX 8.1 (C++) |
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 as shown in the following example.
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.
Header: Declared in D3dx8math.h.
Import Library: Use D3dx8.lib.