Unit CastleSceneManager

Description

Scene manager (TCastleSceneManager) and viewport (TCastleViewport) classes.

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class EViewportSceneManagerMissing  
Class TCastleAbstractViewport Common abstract class for things that may act as a viewport: TCastleSceneManager and TCastleViewport.
Class TCastleAbstractViewportList  
Class TCastleSceneManager Scene manager that knows about all 3D things inside your world.
Class TCastleViewport Custom 2D viewport showing 3D world.

Functions and Procedures

procedure Register;

Types

TRender3DEvent = procedure (Viewport: TCastleAbstractViewport; const Params: TRenderParams) of object;
TWorldMoveAllowedEvent = procedure (Sender: TCastleSceneManager; var Allowed: boolean; const OldPosition, NewPosition: TVector3Single; const BecauseOfGravity: boolean) of object;

Variables

Input_Interact: TInputShortcut;
Input_Attack: TInputShortcut;
Input_InventoryShow: TInputShortcut;
Input_InventoryPrevious: TInputShortcut;
Input_InventoryNext: TInputShortcut;
Input_UseItem: TInputShortcut;
Input_DropItem: TInputShortcut;
Input_CancelFlying: TInputShortcut;

Description

Functions and Procedures

procedure Register;
 

Types

TRender3DEvent = procedure (Viewport: TCastleAbstractViewport; const Params: TRenderParams) of object;
 
TWorldMoveAllowedEvent = procedure (Sender: TCastleSceneManager; var Allowed: boolean; const OldPosition, NewPosition: TVector3Single; const BecauseOfGravity: boolean) of object;

Event for TCastleSceneManager.OnMoveAllowed.

Variables

Input_Interact: TInputShortcut;

Key/mouse combination to interact with clickable things in 3D world. More precisely, this input will activate pointing device sensors in VRML/X3D, which are used to touch (click) or drag 3D things. By default this is left mouse button click.

You can change it to any other mouse button or even to key combination. Simply change properties like TInputShortcut.Key1 or TInputShortcut.MouseButtonUse.

Input_Attack: TInputShortcut;

Key/mouse combination to operate on Player and it's inventory. They are used only when Player is assigned, and only when it's not Dead and not Blocked (see T3DAlive.Dead, TPlayer.Blocked). Also other TCastleAbstractViewport rules for processing inputs must be satisfied, of course (TCastleAbstractViewport must exist, according to TCastleAbstractViewport.GetExists, and not be paused, see TCastleAbstractViewport.Paused). The event must also not be handled first by something else, like camera.

Input_InventoryShow: TInputShortcut;

No key/mouse associated by default.

Input_InventoryPrevious: TInputShortcut;
 
Input_InventoryNext: TInputShortcut;
 
Input_UseItem: TInputShortcut;
 
Input_DropItem: TInputShortcut;

No key/mouse associated by default.

Input_CancelFlying: TInputShortcut;

No key/mouse associated by default.


Generated by PasDoc 0.14.0.