Class TCameraSceneNode

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TCameraSceneNode = class(TSceneNode, IEventReceiver)

Description

no description available, TSceneNode description follows

Base class for all scene nodes.
A scene node is a node in the hierarchical scene graph. Every scene node may have children, which are also scene nodes. Children move relative to their parent's position. If the parent of a node is not visible, its children won't be visible either. In this way, it is for example easily possible to attach a light to a moving car, or to place a walking character on a moving platform on a moving ship.

Hierarchy

Overview

Methods

Public function HandleEvent(Event: TIrrlichtEvent): Boolean; virtual;
Public procedure SetProjectionMatrix(const NMatrix: TMatrix4; NIsOrthogonal: Boolean); overload; inline;

Properties

Public property AspectRatio: Single read GetAspectRatio write SetAspectRatio;
Public property BindTargetAndRotation: Boolean read GetTargetAndRotationBinding write SetBindTargetAndRotation;
Public property FarValue: Single read GetFarValue write SetFarValue;
Public property FOV: Single read GetFOV write SetFOV;
Public property IsOrthogonal: Boolean read GetIsOthorgonal;
Public property NearValue: Single read GetNearValue write SetNearValue;
Public property ProjectionMatrix: TMatrix4 read GetProjectionMatrix write SetProjectionMatrix;
Public property ReceiveInput: Boolean read IsInputReceiverEnabled write SetInputReceiverEnabled;
Public property Target: TVector3D read GetTarget write SetTarget;
Public property UpVector: TVector3D read GetUpVector write SetUpVector;
Public property ViewFrustum: PViewFrustum read GetViewFrustum;
Public property ViewMatrix: TMatrix4 read GetViewMatrix;
Public property ViewMatrixAffector: TMatrix4 read GetViewMatrixAffector write SetViewMatrixAffector;

Description

Methods

Public function HandleEvent(Event: TIrrlichtEvent): Boolean; virtual;

Sends a mouse or key event to the camera.
Most cameras may ignore this input, but camera scene nodes which are created for example with TSceneManager.AddCameraSceneNodeMaya or TSceneManager.AddCameraSceneNodeFPS may want to get this input for changing their position, look at target or whatever.

Public procedure SetProjectionMatrix(const NMatrix: TMatrix4; NIsOrthogonal: Boolean); overload; inline;

Sets the projection matrix of the camera.
The TMatrix4 class has some methods to build a projection matrix. e.g: TMatrix4.BuildProjectionMatrixPerspectiveFovLH. Note that the matrix will only stay as set by this method until one of the following properties are changed: NearValue, FarValue, AspectRatio, FOV.

Parameters
NMatrix
The new projection matrix of the camera.
NIsOrthogonal
Set this to true if the matrix is an orthogonal one (e.g. from TMatrix4.BuildProjectionMatrixOrtho).

Properties

Public property AspectRatio: Single read GetAspectRatio write SetAspectRatio;

The camera's aspect ratio.
Default: 4/3

Public property BindTargetAndRotation: Boolean read GetTargetAndRotationBinding write SetBindTargetAndRotation;

Specifies whether to bind the camera scene node's rotation to its target position and vice versa.
When bound, changing Rotation will update the camera's target position to be along its +Z axis, and likewise modifying Target will update its rotation so that its +Z axis will point at the target point. FPS camera use this binding by default; other cameras do not.

Public property FarValue: Single read GetFarValue write SetFarValue;

The distance of the camera's far clipping plane.
Default: 2000

Public property FOV: Single read GetFOV write SetFOV;

The field of view in radians. Default: Pi / 2.5

Public property IsOrthogonal: Boolean read GetIsOthorgonal;

Checks if a camera is orthogonal.

Public property NearValue: Single read GetNearValue write SetNearValue;

The distance of the camera's near clipping plane.
Default: 1

Public property ProjectionMatrix: TMatrix4 read GetProjectionMatrix write SetProjectionMatrix;

The camera's projection matrix.
See also: SetProjectionMatrix

Public property ReceiveInput: Boolean read IsInputReceiverEnabled write SetInputReceiverEnabled;

Specifies whether the camera will respond to key inputs.

Public property Target: TVector3D read GetTarget write SetTarget;

Sets the target vector the camera is pointing at.
If the camera's target and rotation are bound (BindTargetAndRotation) then calling this will also change the camera's scene node rotation to match the target.

Public property UpVector: TVector3D read GetUpVector write SetUpVector;

The camera's up vector, in world space.

Public property ViewFrustum: PViewFrustum read GetViewFrustum;

The view frustum.
Needed sometimes by bspTree or LOD render nodes.

Public property ViewMatrix: TMatrix4 read GetViewMatrix;

The current view matrix.

Public property ViewMatrixAffector: TMatrix4 read GetViewMatrixAffector write SetViewMatrixAffector;

A custom view matrix affector.
The matrix passed heremwill be multiplied with the view matrix when it gets updated. This allows for custom camera setups like, for example, a reflection camera.


Generated by PasDoc 0.12.1 on 2012-09-14 17:32:22