Class TAbstractTouchSensorNode

Unit

Declaration

type TAbstractTouchSensorNode = class(TAbstractPointingDeviceSensorNode)

Description

Base type for all touch-style pointing device sensors.

Hierarchy

Overview

Methods

Public procedure CreateNode; override;

Properties

Public property EventTouchTime: TSFTimeEvent read FEventTouchTime;
Public property OnClick: TNotifyEvent read FOnClick write FOnClick;

Description

Methods

Public procedure CreateNode; override;
 

Properties

Public property EventTouchTime: TSFTimeEvent read FEventTouchTime;
 
Public property OnClick: TNotifyEvent read FOnClick write FOnClick;

Event generated when we register a "click" on the shapes within the same group as this TouchSensor node. The "click" definition corresponds to the X3D touchTime event generation.

Note that, in order to register clicks, TCastleScene must be configured to process events (TCastleSceneCore.ProcessEvents) and be able to detect clicks on particular shapes (TCastleSceneCore.Spatial should contain ssDynamicCollisions). Usually you will initialize scene like this:

MyScene := TCastleScene.Create(...);
MyScene.Load(...); // load X3D graph with TouchSensor node
MyScene.Spatial := [ssRendering, ssDynamicCollisions];
MyScene.ProcessEvents := true;


Generated by PasDoc 0.16.0.