Compartilhar via


IXRPlaneProjection::GetLocalOffsetX (Compact 2013)

3/28/2014

This method retrieves the translation distance of the object along its own x-axis.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetLocalOffsetX(
    float* pLocalOffsetX
) = 0;

Parameters

  • pLocalOffsetX
    [out] Pointer to the translation distance of the object along the x-axis relative to the object.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

In contrast to global offsets, which translate an object along the axes of the viewing screen, local offset properties translate an object along its own axes. After the object is rotated, its plane no longer matches the plane of the screen. Therefore, the rotation of the object determines the direction in which it is translated. For example, if the object is rotated by using IXRPlaneProjection::SetRotationY, a translation along the local x-axis makes the object appear to move toward you, while any translation along the global x-axis still makes the object appear to move sideways.

To move an object along one of the three-dimensional planes relative to it, use IXRPlaneProjection::SetLocalOffsetX, IXRPlaneProjection::SetLocalOffsetY, and IXRPlaneProjection::SetLocalOffsetZ.

.NET Framework Equivalent

System.Windows.Media.PlaneProjection.LocalOffsetX

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRPlaneProjection