Share via


Physics Engine API (Compact 2013)

3/26/2014

You use CreatePhysicsEngine to create an engine instance with initial point, velocity, angle and desired effects, such as deceleration and boundary bounce. You must create a separate instance of the physics engine for each set of animation points. At any time after you create the engine instance, you can query its state using QueryPhysicsEngine, retrieving the position offset, velocity and current completion status. The physics engine supports both user mode and kernel mode callers.

The physics engine API is defined in %_WINCEROOT%\public\common\oak\inc\PhysicsEngine.h. For reference information, see Touch Gestures Physics Engine Reference.

The following table describes the exported functions included in this API.

Function

Description

CreatePhysicsEngine

Creates a physics engine and configures it with the specified parameters.

DestroyPhysicsEngine

Destroys a physics engine.

QueryPhysicsEngine

Queries the state of the physics engine, retrieving the position offset, velocity, and completion status of the engine at the time last specified by a call to SetPhysicsEngineUserTime.

SetPhysicsEngineUserTime

Sets the current timestamp of the physics engine. The time is set to 0 (zero) upon construction. The time is specified relative to the start of the animation.

PanPhysicsEngine

Moves a physics engine in panning mode. Fails with E_UNEXPECTED if the physics engine object is not in panning mode.

FlickPhysicsEngine

Causes a physics engine in panning mode to enter flicking mode. Fails with E_UNEXPECTED if the physics engine object is not in panning mode.

See Also

Concepts

Physics Engine