Share via


TKCreatePhysicsEngine

4/8/2010

This function creates a physics engine and returns a handle to the new physics engine. You must create a PHYSICSENGINEINIT structure to define the parameters for the physics engine and pass it to TKCreatePhysicsEngine.

Syntax

HRESULT TKCreatePhysicsEngine(
    __in const PHYSICSENGINEINIT* pEngineInit,
    __out HPHYSICSENGINE* phResult
);

Parameters

  • pEngineInit
    [in] Pointer to a PHYSICSENGINEINIT structure that defines the configuration parameters for the physics engine.
  • phResult
    [out] Pointer to an HPHYSICSENGINE variable that receives the handle to the created physics engine.

Return Value

The return value can contain the following values. It may also return other values and should be tested using the SUCCEEDED and FAILED macros.

  • S_OK
    Indicates that the physics engine is successfully created.
  • E_INVALIDARG
    Indicates that a parameter is invalid.
  • E_OUTOFMEMORY
    Indicates that there is not enough memory in the system to create the physics engine.

Requirements

Header GesturePhysicsEngine.h

See Also

Other Resources

Physics Engine Functions (DTK)