Class TAbstractTouchSensorNode

Unit

Declaration

type TAbstractTouchSensorNode = class(TAbstractPointingDeviceSensorNode)

Description

Base type for all touch-style pointing device sensors.

Hierarchy

Overview

Methods

Public constructor Create(const AX3DName: string = ''; const ABaseUrl: String = ''); override;
Public procedure CreateNode; override;
Public class function ClassX3DType: String; override;

Properties

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

Description

Methods

Public constructor Create(const AX3DName: string = ''; const ABaseUrl: String = ''); override;

This item has no description. Showing description inherited from TX3DNode.Create.

Constructor. Initializes various properties:

  • Name, BaseUrl are initialized from given parameters.

  • The Fields, Events lists are filled in every descendant, to have all the fields/events defined by the specification.

  • DefaultContainerField, and other node-specific stuff, is filled in descendants. This is actually implemented in CreateNode, that is called at the end of this constructor.

Public procedure CreateNode; override;

Create node fields and events.

Public class function ClassX3DType: String; override;

This item has no description. Showing description inherited from TX3DNode.ClassX3DType.

Node type name in VRML/X3D, for this class. Normal VRML/X3D node classes should override this to return something non-empty, and then X3DType automatically will return the same value.

Empty for classes that don't have a hardcoded VRML/X3D node name, like a special TX3DUnknownNode. Such special classes should override then X3DType to return actual non-empty name there.

You usually should call X3DType. The only use of this method is that it works on classes (it's "class function"), without needing at actual instance.

Properties

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.PreciseCollisions). Usually you will initialize scene like this:

MyScene := TCastleScene.Create(...);
MyScene.Load(...); // load X3D graph with TouchSensor node
MyScene.PreciseCollisions := true;
MyScene.ProcessEvents := true;

Public property EventTouchTime: TSFTimeEvent read FEventTouchTime;

This item has no description.


Generated by PasDoc 0.16.0-snapshot.