ID3DXMATRIXStack::TranslateLocal method

Determines the product of the computed translation matrix determined by the given factors (x, y, and z) and the current matrix.

Syntax


HRESULT TranslateLocal(
  [in]  FLOAT x,
  [in]  FLOAT y,
  [in]  FLOAT z
);

Parameters

x [in]

Type: FLOAT

The translation factor in the x-direction.

y [in]

Type: FLOAT

The translation factor in the y-direction.

z [in]

Type: FLOAT

The translation factor in the z-direction.

Return value

Type: HRESULT

If the method succeeds, the return value is D3D_OK.

Remarks

This method left-multiplies the current matrix with the computed translation matrix (transformation is about the local origin of the object).



D3DXMATRIX tmp;
D3DXMatrixTranslation(&tmp, x, y, z );
m_stack[m_currentPos] = tmp * m_stack[m_currentPos];


Requirements

Header

D3DX10.h

Library

D3DX10.lib

See also

ID3DXMATRIXStack
D3DX Interfaces

 

 

Community Additions

ADD
Show:
© 2014 Microsoft