Unit CastleCameras

Description

Camera and navigation (TCastleCamera, TCastleExamineNavigation, TCastleWalkNavigation).

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class EViewportNotAssigned  
Class TCastleNavigation Handle user input to modify viewport's camera.
Class TCastleExamineNavigation Navigate the 3D model in examine mode, like you would hold a box with the model inside.
Class TCastle2DNavigation Navigation most suitable for 2D viewports (with orthographic projection and standard direction/up: -Z/+Y).
Class TCastleMouseLookNavigation Abstract navigation class that can utilize mouse look, during which mouse cursor is hidden and we look at MouseLookDelta every frame.
Class TCastleWalkNavigation Navigation by walking or flying (classic first-person shooter navigation) in a 3D scene.

Functions and Procedures

procedure CorrectPreferredHeight(var PreferredHeight: Single; const Radius: Single; const CrouchHeight, HeadBobbing: Single);

Types

TNavigationInput = (...);
TNavigationInputs = set of TNavigationInput;
TCameraInput = TNavigationInput deprecated 'use TNavigationInput';
TCameraInputs = TNavigationInputs deprecated 'use TNavigationInputs';
T3BoolInputs = array [0..2, boolean] of TInputShortcut;
TMoveAllowedFunc = function (const Sender: TCastleNavigation; const OldPos, ProposedNewPos: TVector3; out NewPos: TVector3; const Radius: Single; const BecauseOfGravity: Boolean): boolean of object;
TFallNotifyFunc = procedure (const Sender: TCastleNavigation; const FallHeight: Single) of object;
TMouseDragMode = (...);
TUniversalCamera = TCastleNavigation deprecated 'complicated TUniversalCamera class is removed; use TCastleNavigation as base class, or TCastleWalkNavigation or TCastleExamineNavigation for particular type, and Viewport.NavigationType to switch type';
TCamera = TCastleNavigation deprecated 'use TCastleNavigation';
TExamineCamera = TCastleExamineNavigation deprecated 'use TCastleExamineNavigation';
TWalkCamera = TCastleWalkNavigation deprecated 'use TCastleWalkNavigation';

Constants

ciNormal = niNormal deprecated 'use niNormal';
ciMouseDragging = niMouseDragging deprecated 'use niMouseDragging';
ciGesture = niGesture deprecated 'use niGesture';
ci3dMouse = ni3dMouse deprecated 'use ni3dMouse';

Description

Functions and Procedures

procedure CorrectPreferredHeight(var PreferredHeight: Single; const Radius: Single; const CrouchHeight, HeadBobbing: Single);

See TCastleWalkNavigation.CorrectPreferredHeight. This is a global version, sometimes may be useful.

Types

TNavigationInput = (...);

Possible navigation input types for TCastleNavigation.Input.

Values
  • niNormal: Normal input types. This includes all inputs available as Input_Xxx properties in TCastleNavigation descendants. They are all fully configurable (as TInputShortcut class), they may be mouse button presses, mouse wheel clicks, or key presses. You can always clear some shortcut (like TCastleWalkNavigation.Input_Forward.MakeClear) to disable a specific shortcut. Excluding niNormal from TCastleNavigation.Input is an easy way to disable all shortcuts.
  • niMouseDragging: Mouse and touch dragging. Both TCastleExamineNavigation and TCastleWalkNavigation implement their own, special reactions to mouse dragging, that allows to navigate / rotate while pressing specific mouse buttons.

    Note that mouse dragging is automatically disabled when TCastleWalkNavigation.MouseLook is used.

  • niGesture: Touch gestures, like multi-touch pinch or pan gesture.
  • ni3dMouse: Navigation using 3D mouse devices, like the ones from 3dconnexion.
TNavigationInputs = set of TNavigationInput;

This item has no description.

TCameraInput = TNavigationInput deprecated 'use TNavigationInput';

Warning: this symbol is deprecated: use TNavigationInput

This item has no description.

TCameraInputs = TNavigationInputs deprecated 'use TNavigationInputs';

Warning: this symbol is deprecated: use TNavigationInputs

This item has no description.

T3BoolInputs = array [0..2, boolean] of TInputShortcut;

This item has no description.

TMoveAllowedFunc = function (const Sender: TCastleNavigation; const OldPos, ProposedNewPos: TVector3; out NewPos: TVector3; const Radius: Single; const BecauseOfGravity: Boolean): boolean of object;

See TCastleNavigation.MoveAllowed and TCastleNavigation.OnMoveAllowed

TFallNotifyFunc = procedure (const Sender: TCastleNavigation; const FallHeight: Single) of object;

See TCastleNavigation.OnFall.

TMouseDragMode = (...);

What mouse dragging does in TCastleWalkNavigation.

Values
  • mdWalk: Moves avatar continuously in the direction of mouse drag (default for TCastleWalkNavigation.MouseDragMode).
  • mdRotate: Rotates the head when mouse is moved.
  • mdNone: Ignores the dragging.
TUniversalCamera = TCastleNavigation deprecated 'complicated TUniversalCamera class is removed; use TCastleNavigation as base class, or TCastleWalkNavigation or TCastleExamineNavigation for particular type, and Viewport.NavigationType to switch type';

Warning: this symbol is deprecated: complicated TUniversalCamera class is removed; use TCastleNavigation as base class, or TCastleWalkNavigation or TCastleExamineNavigation for particular type, and Viewport.NavigationType to switch type

This item has no description.

TCamera = TCastleNavigation deprecated 'use TCastleNavigation';

Warning: this symbol is deprecated: use TCastleNavigation

This item has no description.

TExamineCamera = TCastleExamineNavigation deprecated 'use TCastleExamineNavigation';

Warning: this symbol is deprecated: use TCastleExamineNavigation

This item has no description.

TWalkCamera = TCastleWalkNavigation deprecated 'use TCastleWalkNavigation';

Warning: this symbol is deprecated: use TCastleWalkNavigation

This item has no description.

Constants

ciNormal = niNormal deprecated 'use niNormal';

Warning: this symbol is deprecated: use niNormal

This item has no description.

ciMouseDragging = niMouseDragging deprecated 'use niMouseDragging';

Warning: this symbol is deprecated: use niMouseDragging

This item has no description.

ciGesture = niGesture deprecated 'use niGesture';

Warning: this symbol is deprecated: use niGesture

This item has no description.

ci3dMouse = ni3dMouse deprecated 'use ni3dMouse';

Warning: this symbol is deprecated: use ni3dMouse

This item has no description.


Generated by PasDoc 0.16.0.