IDirect3DRMViewport::Transform
HRESULT Transform(D3DRMVECTOR4D * lprvDst, D3DVECTOR * lprvSrc);
Transforms the vector in the lprvSrc parameter in world coordinates to screen coordinates, and returns the result in the lprvDst parameter.
·Returns D3DRM_OK if successful, or an error otherwise. For a list of possible return codes, see Direct3D Retained-Mode Return Values.
lprvDst
Address of a D3DRMVECTOR4D structure that acts as the destination for the transformation operation.
lprvSrc
Address of a D3DVECTOR structure that acts as the source for the transformation operation.
The result of the transformation is a four-element homogeneous vector to avoid dividing by zero when the vector is close to the camera's position. The point represented by the resulting vector is visible if the following equations are true: