ID3DXMATRIXStack::Scale method

Scale the current matrix about the world coordinate origin.

Syntax


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

Parameters

x [in]

Type: FLOAT

The scaling component in the x-direction.

y [in]

Type: FLOAT

The scaling component in the y-direction.

z [in]

Type: FLOAT

The scaling component in the z-direction.

Return value

Type: HRESULT

If the method succeeds, the return value is D3D_OK.

Remarks

This method right-multiplies the current matrix with the computed scale matrix. The transformation is about the current world origin.



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


Requirements

Header

D3DX10.h

Library

D3DX10.lib

See also

ID3DXMATRIXStack
D3DX Interfaces

 

 

Community Additions

ADD
Show:
© 2014 Microsoft