Export (0) Print
Expand All

IInertiaProcessor::InitialOriginX property

The InitialOriginX property specifies the starting horizontal location for a target with inertia.

This property is read/write.

Syntax


HRESULT put_InitialOriginX(
  [in]   FLOAT x
);

HRESULT get_InitialOriginX(
  [out]  FLOAT *x
);

Property value

The starting horizontal location for a target with inertia.

Error codes

Returns S_OK on success; otherwise, returns an error code such as E_FAIL.

Remarks

A user can manipulate an object to set the InitialOriginX to be outside of the elastic bounds. Setting InitialOriginX to a value outside of the elastic bounds will cause an exception to be thrown. To prevent users from setting the origin out of bounds, check that InitialOriginX is valid before setting it on an IInertiaProcessor interface. If Inertia processing has already started, calling put_InitialOriginX() will reset the inertia state to initial time stamp.

All locations used for the inertia and manipulation processor are relative. If you want to use screen coordinates, you pass screen coordinates to the manipulation (or inertia) processor; if you want to use absolute coordinates, you pass those into the processor you are using.

Call this function to set the initial state of inertia. You would call this function most likely during the ManipulationCompleted event of the IManipulationProcessor or in the constructor of the IInertiaProcessor interface.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Manipulations.h (include Manipulations.h)

See also

Inertia Mechanics
Handling Inertia in Unmanaged Code
InitialOriginY
IInertiaProcessor
Properties

 

 

Community Additions

ADD
Show:
© 2014 Microsoft