Unit CastleProjection
Description
Projection parameters (TProjection).
Source: ../castle-engine/src/base/castleprojection.pas (line 17).
Uses
Overview
Classes, Interfaces, Objects and Records
| Name | Description |
|---|---|
Record TProjection |
Projection determines how does the 3D world map onto 2D screen. |
Functions and Procedures
function AdjustViewAngleDegToAspectRatio(const FirstViewAngleDeg, SecondToFirstRatio: Single): Single; deprecated 'use radians for everything throughout CGE'; |
function AdjustViewAngleRadToAspectRatio(const FirstViewAngleRad, SecondToFirstRatio: Single): Single; |
function OrthoProjectionMatrix(const Dimensions: TFloatRectangle; const ZNear, ZFar: Single): TMatrix4; overload; |
function OrthoProjectionMatrix(const left, right, bottom, top, ZNear, ZFar: Single): TMatrix4; overload; deprecated 'use the overloaded version that takes Dimensions as TFloatRectangle'; |
function Ortho2DProjectionMatrix(const Dimensions: TFloatRectangle): TMatrix4; overload; deprecated 'just use OrthoProjectionMatrix, the 2D optimization is not really worth the maintenance'; |
function Ortho2DProjectionMatrix(const left, right, bottom, top: Single): TMatrix4; overload; deprecated 'just use OrthoProjectionMatrix, the 2D optimization is not really worth the maintenance'; |
function FrustumProjectionMatrix(const Dimensions: TFloatRectangle; const ZNear, ZFar: Single): TMatrix4; overload; |
function FrustumProjectionMatrix(const left, right, bottom, top, ZNear, ZFar: Single): TMatrix4; overload; deprecated 'use the overloaded version that takes Dimensions as TFloatRectangle'; |
function PerspectiveProjectionMatrixDeg(const fovyDeg, aspect, ZNear, ZFar: Single): TMatrix4; |
function PerspectiveProjectionMatrixRad(const fovyRad, aspect, ZNear, ZFar: Single): TMatrix4; |
function ProjectionTypeToStr(const ProjectionType: TProjectionTypeCore): String; |
Types
TProjectionTypeCore = (...); |
TProjectionType = ptOrthographic .. ptPerspective; |
Constants
ZFarInfinity = 0.0; |
Description
Functions and Procedures
function AdjustViewAngleDegToAspectRatio(const FirstViewAngleDeg, SecondToFirstRatio: Single): Single; deprecated 'use radians for everything throughout CGE'; |
|
Warning: this symbol is deprecated: use radians for everything throughout CGE Calculate second viewing angle for perspective projection. Given one viewing angle of the camera (FirstViewAngleDeg) and aspect ratio of your window sizes (SecondToFirstRatio), calculate second viewing angle of the camera. The intention is that when projecting camera view (with given view angles) on a screen with given aspect ratio), the image will not be distorted (squeezed horizontally or vertically). For the "Deg" version both angles (given and returned) are in degress, for the "Rad" version both angles and in radians. Source: ../castle-engine/src/base/castleprojection.pas (line 80). |
function AdjustViewAngleRadToAspectRatio(const FirstViewAngleRad, SecondToFirstRatio: Single): Single; |
|
This item has no description. Source: ../castle-engine/src/base/castleprojection.pas (line 82). |
function OrthoProjectionMatrix(const Dimensions: TFloatRectangle; const ZNear, ZFar: Single): TMatrix4; overload; |
|
Functions to create 4x4 matrices used in 3D graphics for projection. That are equivalent to OpenGL glOrtho, glFrustum, gluPerspective. The frustum and pespective generation (routines FrustumProjectionMatrix, PerspectiveProjectionMatrixDeg, PerspectiveProjectionMatrixRad) accept also a special value ZFarInfinity as the ZFar parameter. Then you get perspective projection matrix withour far clipping plane, which is very useful for the z-fail shadow volumes technique. Source: ../castle-engine/src/base/castleprojection.pas (line 110). |
function OrthoProjectionMatrix(const left, right, bottom, top, ZNear, ZFar: Single): TMatrix4; overload; deprecated 'use the overloaded version that takes Dimensions as TFloatRectangle'; |
|
Warning: this symbol is deprecated: use the overloaded version that takes Dimensions as TFloatRectangle This item has no description. Source: ../castle-engine/src/base/castleprojection.pas (line 111). |
function Ortho2DProjectionMatrix(const Dimensions: TFloatRectangle): TMatrix4; overload; deprecated 'just use OrthoProjectionMatrix, the 2D optimization is not really worth the maintenance'; |
|
Warning: this symbol is deprecated: just use OrthoProjectionMatrix, the 2D optimization is not really worth the maintenance This item has no description. Source: ../castle-engine/src/base/castleprojection.pas (line 113). |
function Ortho2DProjectionMatrix(const left, right, bottom, top: Single): TMatrix4; overload; deprecated 'just use OrthoProjectionMatrix, the 2D optimization is not really worth the maintenance'; |
|
Warning: this symbol is deprecated: just use OrthoProjectionMatrix, the 2D optimization is not really worth the maintenance This item has no description. Source: ../castle-engine/src/base/castleprojection.pas (line 114). |
function FrustumProjectionMatrix(const Dimensions: TFloatRectangle; const ZNear, ZFar: Single): TMatrix4; overload; |
|
This item has no description. Source: ../castle-engine/src/base/castleprojection.pas (line 116). |
function FrustumProjectionMatrix(const left, right, bottom, top, ZNear, ZFar: Single): TMatrix4; overload; deprecated 'use the overloaded version that takes Dimensions as TFloatRectangle'; |
|
Warning: this symbol is deprecated: use the overloaded version that takes Dimensions as TFloatRectangle This item has no description. Source: ../castle-engine/src/base/castleprojection.pas (line 117). |
function PerspectiveProjectionMatrixDeg(const fovyDeg, aspect, ZNear, ZFar: Single): TMatrix4; |
|
This item has no description. Source: ../castle-engine/src/base/castleprojection.pas (line 119). |
function PerspectiveProjectionMatrixRad(const fovyRad, aspect, ZNear, ZFar: Single): TMatrix4; |
|
This item has no description. Source: ../castle-engine/src/base/castleprojection.pas (line 120). |
function ProjectionTypeToStr(const ProjectionType: TProjectionTypeCore): String; |
|
This item has no description. Source: ../castle-engine/src/base/castleprojection.pas (line 123). |
Types
TProjectionTypeCore = (...); |
|
Projection type, used by TProjection.ProjectionType. Values
Source: ../castle-engine/src/base/castleprojection.pas (line 27). |
TProjectionType = ptOrthographic .. ptPerspective; |
|
This item has no description. Source: ../castle-engine/src/base/castleprojection.pas (line 28). |
Constants
ZFarInfinity = 0.0; |
|
Special value that you can pass to various perspective-projection functions with the intention to set far plane at infinity. These functions include like FrustumProjectionMatrix, PerspectiveProjectionMatrixDeg, PerspectiveProjectionMatrixRad, PerspectiveProjection. You can pass Implementation note: It would be "cooler" to define this constant as Math.Infinity, but operating on Math.Infinity requires unnecessary turning off of some compiler checks. The point was only to have some special ZFar value, so 0 is as good as Infinity. Source: ../castle-engine/src/base/castleprojection.pas (line 99). |
Generated by PasDoc 0.17.0.snapshot.