  Platform eXtended Library (PXL)Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers |
record TMatrix4f
Unit
PXL.Types
Declaration
type TMatrix4f = record
Description
4x4 transformation matrix.
Overview
Fields
Methods
function Adjoint: TMatrix4f; |
function Determinant: VectorFloat; |
function EyePos: TVector3f; |
class function HeadingPitchBank(const Heading, Pitch, Bank: VectorFloat): TMatrix4f; overload; static; |
class function HeadingPitchBank(const Vector: TVector3f): TMatrix4f; overload; static; |
function Inverse: TMatrix4f; |
class function LookAt(const Origin, Target, Ceiling: TVector3f): TMatrix4f; static; |
class function OrthogonalBDS(const Left, Right, Top, Bottom, MinRange, MaxRange: VectorFloat): TMatrix4f; static; |
class function OrthogonalVOL(const Width, Height, MinRange, MaxRange: VectorFloat): TMatrix4f; static; |
class function PerspectiveBDS(const Left, Right, Top, Bottom, MinRange, MaxRange: VectorFloat): TMatrix4f; static; |
class function PerspectiveFOVX(const FieldOfView, AspectRatio, MinRange, MaxRange: VectorFloat): TMatrix4f; static; |
class function PerspectiveFOVY(const FieldOfView, AspectRatio, MinRange, MaxRange: VectorFloat): TMatrix4f; static; |
class function PerspectiveVOL(const Width, Height, MinRange, MaxRange: VectorFloat): TMatrix4f; static; |
function Project(const Vector: TVector3f; const TargetSize: TPoint2f): TPoint2f; |
class function Reflect(const Axis: TVector3f): TMatrix4f; static; |
class function Rotate(const Axis: TVector3f; const Angle: VectorFloat): TMatrix4f; static; |
class function RotateX(const Angle: VectorFloat): TMatrix4f; static; |
class function RotateY(const Angle: VectorFloat): TMatrix4f; static; |
class function RotateZ(const Angle: VectorFloat): TMatrix4f; static; |
class function Scale(const X, Y: VectorFloat; const Z: VectorFloat = 0.0): TMatrix4f; overload; static; inline; |
class function Scale(const Scale: TVector3f): TMatrix4f; overload; static; |
class function Scale(const Scale: VectorFloat): TMatrix4f; overload; static; inline; |
class function Translate(const X, Y: VectorFloat; const Z: VectorFloat = 0.0): TMatrix4f; overload; static; inline; |
class function Translate(const Offset: TVector3f): TMatrix4f; overload; static; |
function Transpose: TMatrix4f; |
function WorldPos: TVector3f; |
class function YawPitchRoll(const Vector: TVector3f): TMatrix4f; overload; static; |
class function YawPitchRoll(const Yaw, Pitch, Roll: VectorFloat): TMatrix4f; overload; static; |
Description
Fields
Data: array[0..3, 0..3] of VectorFloat; |
|
Individual matrix values.
|
Methods
function Adjoint: TMatrix4f; |
|
Calculates adjoint values for the current matrix.
|
function Determinant: VectorFloat; |
|
Calculates determinant of current matrix.
|
function EyePos: TVector3f; |
|
Assuming that the current matrix is a view matrix, this method calculates the 3D position where the camera (or "eye") is supposedly located.
|
class function HeadingPitchBank(const Heading, Pitch, Bank: VectorFloat): TMatrix4f; overload; static; |
|
Creates 3D rotation matrix based on parameters similar to flight dynamics, specifically heading, pitch and Bank. Each of the components is specified individually.
|
class function HeadingPitchBank(const Vector: TVector3f): TMatrix4f; overload; static; |
|
Creates 3D rotation matrix based on parameters similar to flight dynamics, specifically heading, pitch and Bank. The components are taken from the specified vector with Y corresponding to heading, X to pitch and Z to bank.
|
function Inverse: TMatrix4f; |
|
Calculates inverse of current matrix. In other words, the new matrix will "undo" any transformations that the given matrix would have made.
|
class function LookAt(const Origin, Target, Ceiling: TVector3f): TMatrix4f; static; |
|
Creates a view matrix that is defined by the camera's position, its target and vertical axis or "ceiling".
|
class function OrthogonalBDS(const Left, Right, Top, Bottom, MinRange, MaxRange: VectorFloat): TMatrix4f; static; |
|
Creates orthogonal projection matrix defined by the individual axis's boundaries.
|
class function OrthogonalVOL(const Width, Height, MinRange, MaxRange: VectorFloat): TMatrix4f; static; |
|
Creates orthogonal projection matrix defined by the viewing volume in 3D space.
|
class function PerspectiveBDS(const Left, Right, Top, Bottom, MinRange, MaxRange: VectorFloat): TMatrix4f; static; |
|
Creates perspective projection matrix defined by the individual axis's boundaries.
|
class function PerspectiveFOVX(const FieldOfView, AspectRatio, MinRange, MaxRange: VectorFloat): TMatrix4f; static; |
|
Creates perspective projection matrix defined by a field of view on X axis. In 3D shooters the field of view needs to be adjusted to allow more visible area on wide-screen monitors. The parameters that define the viewed range are important for defining the precision of the depth transformation or a depth-buffer.
Parameters
- FieldOfView
- The camera's field of view in radians. For example Pi/4.
- AspectRatio
- The screen's aspect ratio. Can be calculated as x/y.
- MinRange
- The closest range at which the scene will be viewed.
- MaxRange
- The farthest range at which the scene will be viewed.
|
class function PerspectiveFOVY(const FieldOfView, AspectRatio, MinRange, MaxRange: VectorFloat): TMatrix4f; static; |
|
Creates perspective projection matrix defined by a field of view on Y axis. This is a common way for typical 3D applications. In 3D shooters special care is to be taken because on wide-screen monitors the visible area will be bigger when using this constructor. The parameters that define the viewed range are important for defining the precision of the depth transformation or a depth-buffer.
Parameters
- FieldOfView
- The camera's field of view in radians. For example Pi/4.
- AspectRatio
- The screen's aspect ratio. Can be calculated as y/x.
- MinRange
- The closest range at which the scene will be viewed.
- MaxRange
- The farthest range at which the scene will be viewed.
|
class function PerspectiveVOL(const Width, Height, MinRange, MaxRange: VectorFloat): TMatrix4f; static; |
|
Creates perspective projection matrix defined by the viewing volume in 3D space.
|
function Project(const Vector: TVector3f; const TargetSize: TPoint2f): TPoint2f; |
|
Multiplies the given 3D vector as if it was 4D (3D + 1) vector by current matrix, then divides each of the resulting components by the resulting value of W (which is then discarded), and converts absolute coordinates to screen pixels by using the given target size.
|
class function Reflect(const Axis: TVector3f): TMatrix4f; static; |
|
Creates a reflection matrix specified by the given vector defining the orientation of the reflection.
|
class function Rotate(const Axis: TVector3f; const Angle: VectorFloat): TMatrix4f; static; |
|
Creates 3D rotation matrix around specified axis and angle (in radiants).
|
class function RotateX(const Angle: VectorFloat): TMatrix4f; static; |
|
Creates 3D rotation matrix around X axis with the specified angle.
|
class function RotateY(const Angle: VectorFloat): TMatrix4f; static; |
|
Creates 3D rotation matrix around Y axis with the specified angle.
|
class function RotateZ(const Angle: VectorFloat): TMatrix4f; static; |
|
Creates 3D rotation matrix around Z axis with the specified angle.
|
class function Scale(const X, Y: VectorFloat; const Z: VectorFloat = 0.0): TMatrix4f; overload; static; inline; |
|
Creates 3D translation matrix with specified X, Y and (optional) Z coefficients.
|
class function Scale(const Scale: TVector3f): TMatrix4f; overload; static; |
|
Creates 3D translation matrix with specified coefficients.
|
class function Scale(const Scale: VectorFloat): TMatrix4f; overload; static; inline; |
|
Creates 3D translation matrix with X, Y and Z equal to the specified coefficient.
|
class function Translate(const X, Y: VectorFloat; const Z: VectorFloat = 0.0): TMatrix4f; overload; static; inline; |
|
Creates 3D translation matrix with specified X, Y and (optional) Z coordinates.
|
class function Translate(const Offset: TVector3f): TMatrix4f; overload; static; |
|
Creates 3D translation matrix with specified offset.
|
function Transpose: TMatrix4f; |
|
Transposes current matrix. That is, rows become columns and vice-versa.
|
function WorldPos: TVector3f; |
|
Assuming that the specified matrix is a world matrix, this method calculates the 3D position where the object (or "world") is supposedly located.
|
class function YawPitchRoll(const Vector: TVector3f): TMatrix4f; overload; static; |
|
Creates 3D rotation matrix based on parameters similar to flight dynamics, specifically yaw, pitch and roll. The components are taken from the specified vector with Y corresponding to yaw, X to pitch and Z to roll.
|
class function YawPitchRoll(const Yaw, Pitch, Roll: VectorFloat): TMatrix4f; overload; static; |
|
Creates 3D rotation matrix based on parameters similar to flight dynamics, specifically yaw, pitch and roll. Each of the components is specified individually.
|
Copyright © 2000 - 2017 Yuriy Kotsarenko. Help files generated by PasDoc.
|