Record TProjection

Unit

Declaration

type TProjection = record

Description

Projection determines how does the 3D world map onto 2D screen. To change the currently used projection, change the TCastleCamera parameters.

Source: base/castleprojection.pas (line 32).

Overview

Fields

Public ProjectionType: TProjectionTypeCore;
Public PerspectiveAnglesRad: TVector2;
Public Dimensions: TFloatRectangle;
Public ProjectionNear: Single;
Public ProjectionFar: Single;

Methods

Public function Matrix(const AspectRatio: Single): TMatrix4;
Public function Initialized: Boolean; deprecated 'this should not be necessary anymore';

Description

Fields

Public ProjectionType: TProjectionTypeCore;

This item has no description.

Source: base/castleprojection.pas (line 33).

Public PerspectiveAnglesRad: TVector2;

If ProjectionType is ptPerspective, this property specifies angles of view (horizontal and vertical), in radians.

Note that when overriding the TCastleViewport.CalculateProjection, you are expected to provide both angles calculated, even though some routines for now will only use the vertical angle (and automatically adjust the other to the aspect ratio). Use the AdjustViewAngleRadToAspectRatio to calculate the angles as necessary.

Source: base/castleprojection.pas (line 44).

Public Dimensions: TFloatRectangle;

If ProjectionType is ptOrthographic or ptFrustum, this property specifies dimensions of the visible window.

Source: base/castleprojection.pas (line 48).

Public ProjectionNear: Single;

Near clipping distance. Everything closer to this distance is clipped (invisible).

Source: base/castleprojection.pas (line 52).

Public ProjectionFar: Single;

Far clipping distance. Everything further than this distance is clipped (invisible). Note that it have a special value ZFarInfinity, which means that no far clipping plane is used. E.g. shadow volumes require this.

Source: base/castleprojection.pas (line 58).

Methods

Public function Matrix(const AspectRatio: Single): TMatrix4;

Projection matrix, adjusted to given viewport aspect ratio (width/height).

Source: base/castleprojection.pas (line 61).

Public function Initialized: Boolean; deprecated 'this should not be necessary anymore';

Warning: this symbol is deprecated: this should not be necessary anymore

Detect whether any sensible projection values are initialized.

Source: base/castleprojection.pas (line 64).


Generated by PasDoc 0.17.0.snapshot.