Record TProjection
Unit
Declaration
type TProjection = record
Description
Projection determines how does the 3D world map onto 2D. To change the currently displayed projection, you usually want to override the TCastleViewport.CalculateProjection.
Overview
Fields
![]() |
ProjectionType: TProjectionTypeCore; |
![]() |
PerspectiveAnglesRad: TVector2; |
![]() |
Dimensions: TFloatRectangle; |
![]() |
ProjectionNear: Single; |
![]() |
ProjectionFar: Single; |
![]() |
ProjectionFarFinite: Single; |
Methods
![]() |
function Matrix(const AspectRatio: Single): TMatrix4; |
![]() |
function Initialized: Boolean; deprecated 'this should not be necessary anymore'; |
Description
Fields
![]() |
ProjectionType: TProjectionTypeCore; |
![]() |
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. |
![]() |
Dimensions: TFloatRectangle; |
If ProjectionType is ptOrthographic or ptFrustum, this property specifies dimensions of the visible window. |
![]() |
ProjectionNear: Single; |
Near clipping distance. Everything closer to this distance is clipped (invisible). |
![]() |
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. |
![]() |
ProjectionFarFinite: Single; |
Far clipping distance to be used in cases when it cannot be infinite. Unlike ProjectionFar, this property cannot have a magical value ZFarInfinity. It should be calculated just like ProjectionFar, except it's never changed to be ZFarInfinity. |
Methods
![]() |
function Matrix(const AspectRatio: Single): TMatrix4; |
Projection matrix, adjusted to given viewport aspect ratio (width/height). |
Generated by PasDoc 0.16.0.