Export (0) Print
Expand All

ID3DXMATRIXStack::ScaleLocal method

Scale the current matrix about the object origin.

Syntax


HRESULT ScaleLocal(
  [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 left-multiplies the current matrix with the computed scale matrix. The transformation is about the local origin of the object.



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


Requirements

Header

D3dx9math.h

Library

D3dx9.lib

See also

ID3DXMATRIXStack
ID3DXMATRIXStack::Scale

 

 

Community Additions

ADD
Show:
© 2014 Microsoft