www.pudn.com > sxdl.zip > d3dutil.h


//----------------------------------------------------------------------------- 
// File: D3DUtil.h 
// 
// Desc: Helper functions and typing shortcuts for Direct3D programming. 
//----------------------------------------------------------------------------- 
#ifndef D3DUTIL_H 
#define D3DUTIL_H 
#include  
#include  
 
 
//----------------------------------------------------------------------------- 
// Name: D3DUtil_GetCubeMapViewMatrix() 
// Desc: Returns a view matrix for rendering to a face of a cubemap. 
//----------------------------------------------------------------------------- 
D3DXMATRIX D3DUtil_GetCubeMapViewMatrix( DWORD dwFace ); 
 
 
 
 
//----------------------------------------------------------------------------- 
// Name: D3DUtil_GetRotationFromCursor() 
// Desc: Returns a quaternion for the rotation implied by the window's cursor 
//       position. 
//----------------------------------------------------------------------------- 
D3DXQUATERNION D3DUtil_GetRotationFromCursor( HWND hWnd, 
                                              FLOAT fTrackBallRadius=1.0f ); 
 
 
 
 
//----------------------------------------------------------------------------- 
// Name: D3DUtil_SetDeviceCursor 
// Desc: Builds and sets a cursor for the D3D device based on hCursor. 
//----------------------------------------------------------------------------- 
HRESULT D3DUtil_SetDeviceCursor( LPDIRECT3DDEVICE9 pd3dDevice, HCURSOR hCursor, 
                                 BOOL bAddWatermark ); 
 
 
//----------------------------------------------------------------------------- 
// Name: D3DUtil_D3DFormatToString 
// Desc: Returns the string for the given D3DFORMAT. 
//       bWithPrefix determines whether the string should include the "D3DFMT_" 
//----------------------------------------------------------------------------- 
TCHAR* D3DUtil_D3DFormatToString( D3DFORMAT format, bool bWithPrefix = true ); 
 
 
 
#endif // D3DUTIL_H