ID3DXMATRIXStack::ScaleLocal

Scale the current matrix about the object origin.

HRESULT ScaleLocal(
  FLOAT x,
  FLOAT y,
  FLOAT z
);

Parameters

x
[in] The scaling component in the x-direction.
y
[in] The scaling component in the y-direction.
z
[in] The scaling component in the z-direction.

Return Values

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: Declared in D3dx9math.h.

See Also

ID3DXMATRIXStack::Scale