![]() |
![]() |
![]() |
Sets the right-handed world-view transform for a sprite. A call to this method is required before billboarding or sorting sprites.
Syntax
HRESULT SetWorldViewRH(
CONST D3DXMATRIX *pWorld, CONST D3DXMATRIX *pView );
Parameters
- pWorld
- [in] Pointer to a D3DXMATRIX that contains a world transform. If NULL, the identity matrix is used for the world transform.
- pView
- [in] Pointer to a D3DXMATRIX that contains a view transform. If NULL, the identity matrix is used for the view transform.
Return Value
If the method succeeds, the return value is S_OK.
If the method fails, the following value will be returned.
D3DERR_INVALIDCALL The method call is invalid. For example, a method's parameter may have an invalid value.
Remarks
A call to this method (or to ID3DXSprite::SetWorldViewLH) is required if the sprite will be rendered with the D3DXSPRITE_BILLBOARD, D3DXSPRITE_SORT_DEPTH_FRONTTOBACK, or D3DXSPRITE_SORT_DEPTH_BACKTOFRONT flag value in ID3DXSprite::Begin.