Unit MatrixNavigation

DescriptionusesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

TMatrixNavigator class and descendants.

uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class TInputShortcut An input shortcut represents a keyboard and/or mouse shortcut for some command.
Class TMatrixNavigator TMatrixNavigator implements user navigation in 3D scene.
Class TMatrixNavigatorWithIdle A descendant of TMatrixNavigator that has an Idle method.
Class TMatrixExaminer Navigate the 3D model in examine mode, like you would hold a box with the model inside.
Class TMatrixWalker Navigation by walking (first-person-shooter-like moving) in 3D scene.

Functions and Procedures

procedure CorrectCameraPreferredHeight(var CameraPreferredHeight: Single; const CameraRadius: Single; const CrouchHeight, HeadBobbing: Single);

Types

TMouseButton = (...);
TMouseButtons = set of TMouseButton;
TMatrixNavigatorNotifyFunc = procedure (Navigator: TMatrixNavigator) of object;
TInputShortcutChangedFunc = procedure (Shortcut: TInputShortcut) of object;
TMatrixNavigatorClass = class of TMatrixNavigator;
T3BoolInputs = array [0..2, boolean] of TInputShortcut;
TMoveAllowedFunc = function(Navigator: TMatrixWalker; const ProposedNewPos: TVector3Single; out NewPos: TVector3Single; const BecauseOfGravity: boolean): boolean of object;
TFalledDownNotifyFunc = procedure (Navigator: TMatrixWalker; const FallenHeight: Single) of object;
TGetCameraHeight = procedure (Navigator: TMatrixWalker; out IsAboveTheGround: boolean; out SqrHeightAboveTheGround: Single) of object;

Constants

DefaultFallingDownStartSpeed = 0.5;
DefaultGrowingSpeed = 1.0;
DefaultHeadBobbing = 0.1;
DefaultCrouchHeight = 0.5;
DefaultMaxJumpHeight = 1.0;
DefaultMinAngleRadFromGravityUp = Pi / 18;
DefaultRotationHorizontalSpeed = 3.0;
DefaultRotationVerticalSpeed = 2.0;
DefaultFallingDownSpeedIncrease = 13/12;
DefaultMouseLookHorizontalSensitivity = 0.09;
DefaultMouseLookVerticalSensitivity = 0.09;
DefaultHeadBobbingDistance = 20.0;
DefaultJumpSpeedMultiply = 2.0;
DefaultJumpPower = 0.18;
MouseButtonStr: array [TMouseButton] of string = ('left', 'middle', 'right');

Description

Functions and Procedures

procedure CorrectCameraPreferredHeight(var CameraPreferredHeight: Single; const CameraRadius: Single; const CrouchHeight, HeadBobbing: Single);

See TMatrixWalker.CorrectCameraPreferredHeight. This is a global version, sometimes may be useful.

Types

TMouseButton = (...);
 
Values
  • mbLeft:
  • mbMiddle:
  • mbRight:
TMouseButtons = set of TMouseButton;
 
TMatrixNavigatorNotifyFunc = procedure (Navigator: TMatrixNavigator) of object;
 
TInputShortcutChangedFunc = procedure (Shortcut: TInputShortcut) of object;
 
TMatrixNavigatorClass = class of TMatrixNavigator;
 
T3BoolInputs = array [0..2, boolean] of TInputShortcut;
 
TMoveAllowedFunc = function(Navigator: TMatrixWalker; const ProposedNewPos: TVector3Single; out NewPos: TVector3Single; const BecauseOfGravity: boolean): boolean of object;

See TMatrixWalker.DoMoveAllowed and TMatrixWalker.OnMoveAllowed

TFalledDownNotifyFunc = procedure (Navigator: TMatrixWalker; const FallenHeight: Single) of object;

See TMatrixWalker.OnFalledDown.

TGetCameraHeight = procedure (Navigator: TMatrixWalker; out IsAboveTheGround: boolean; out SqrHeightAboveTheGround: Single) of object;
 

Constants

DefaultFallingDownStartSpeed = 0.5;
 
DefaultGrowingSpeed = 1.0;
 
DefaultHeadBobbing = 0.1;
 
DefaultCrouchHeight = 0.5;
 
DefaultMaxJumpHeight = 1.0;
 
DefaultMinAngleRadFromGravityUp = Pi / 18;
 
DefaultRotationHorizontalSpeed = 3.0;
 
DefaultRotationVerticalSpeed = 2.0;
 
DefaultFallingDownSpeedIncrease = 13/12;
 
DefaultMouseLookHorizontalSensitivity = 0.09;
 
DefaultMouseLookVerticalSensitivity = 0.09;
 
DefaultHeadBobbingDistance = 20.0;
 
DefaultJumpSpeedMultiply = 2.0;
 
DefaultJumpPower = 0.18;
 
MouseButtonStr: array [TMouseButton] of string = ('left', 'middle', 'right');
 

Generated by PasDoc 0.10.0 on 2008-02-25 00:00:37