IInertiaProcessor::DesiredDisplacement property

The DesiredDisplacement property specifies the desired distance that the object will travel.

This property is read/write.

Syntax


HRESULT put_DesiredDisplacement(
  [in]  FLOAT displacement
);

HRESULT get_DesiredDisplacement(
  [out] FLOAT *displacement
);

Property value

The desired distance that the object will travel.

Error codes

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

Remarks

DesiredDisplacement and DesiredDeceleration are mutually exclusive. If one is set, the other should be NaN.

If inertia processing has already started, setting DesiredDisplacement will reset the inertia engine to the initial state with new deceleration value applied.

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
DesiredDeceleration
InitialVelocityX
InitialVelocityY
IInertiaProcessor
Properties

 

 

Community Additions

ADD
Show: