Show: Delphi C++
Display Preferences

System.Math.Vectors.TMatrix3D

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

  TMatrix3D = record
  private
    function DetInternal(const a1, a2, a3, b1, b2, b3, c1, c2, c3: Single): Single; inline;
    function Scale(const AFactor: Single): TMatrix3D;
  public
    constructor Create(const AM11, AM12, AM13, AM14, AM21, AM22, AM23, AM24, AM31, AM32, AM33,
      AM34, AM41, AM42, AM43, AM44: Single); overload;
    constructor Create(const AArray: TSingleDynArray); overload;
    class function CreateScaling(const AScale: TPoint3D): TMatrix3D; static;
    class function CreateTranslation(const ATranslation: TPoint3D): TMatrix3D; static;
    class function CreateRotationX(const AAngle: Single): TMatrix3D; static;
    class function CreateRotationY(const AAngle: Single): TMatrix3D; static;
    class function CreateRotationZ(const AAngle: Single): TMatrix3D; static;
    class function CreateRotation(const AAxis: TPoint3D; const AAngle: Single): TMatrix3D; static;
    class function CreateRotationYawPitchRoll(const AYaw, APitch, ARoll: Single): TMatrix3D; static;
    class function CreateRotationHeadingPitchBank(const AHeading, APitch, ABank: Single): TMatrix3D; static;
    class function CreateLookAtRH(const ASource, ATarget, ACeiling: TPoint3D): TMatrix3D; static;
    class function CreateLookAtLH(const ASource, ATarget, ACeiling: TPoint3D): TMatrix3D; static;
    class function CreateLookAtDirRH(const ASource, ADirection, ACeiling: TPoint3D): TMatrix3D; static;
    class function CreateLookAtDirLH(const ASource, ADirection, ACeiling: TPoint3D): TMatrix3D; static;
    class function CreateOrthoLH(const AWidth, AHeight, AZNear, AZFar: Single): TMatrix3D; static;
    class function CreateOrthoRH(const AWidth, AHeight, AZNear, AZFar: Single): TMatrix3D; static;
    class function CreateOrthoOffCenterLH(const ALeft, ATop, ARight, ABottom, AZNear, AZFar: Single): TMatrix3D; static;
    class function CreateOrthoOffCenterRH(const ALeft, ATop, ARight, ABottom, AZNear, AZFar: Single): TMatrix3D; static;
    class function CreatePerspectiveFovLH(const AFOV, AAspect, AZNear, AZFar: Single;
     const AHorizontalFOV: Boolean = False): TMatrix3D; static;
    class function CreatePerspectiveFovRH(const AFOV, AAspect, AZNear, AZFar: Single;
     const AHorizontalFOV: Boolean = False): TMatrix3D; static;
    class operator Multiply(const APoint1, APoint2: TMatrix3D): TMatrix3D;
    class operator Multiply(const APoint: TPoint3D; const AMatrix: TMatrix3D): TPoint3D;
    class operator Multiply(const AVector: TVector3D; const AMatrix: TMatrix3D): TVector3D;
    function Transpose: TMatrix3D;
    function Determinant: Single;
    function Adjoint: TMatrix3D;
    function Inverse: TMatrix3D;
    function ToMatrix: TMatrix;
    function EyePosition: TPoint3D;
    case Integer of
      0: (M: TMatrix3DType;);
      1: (m11, m12, m13, m14: Single;
          m21, m22, m23, m24: Single;
          m31, m32, m33, m34: Single;
          m41, m42, m43, m44: Single);
  end;

C++

struct DECLSPEC_DRECORD TMatrix3D
{
private:
    float __fastcall DetInternal(const float a1, const float a2, const float a3, const float b1, const float b2, const float b3, const float c1, const float c2, const float c3);
    TMatrix3D __fastcall Scale(const float AFactor);
public:
    __fastcall TMatrix3D(const float AM11, const float AM12, const float AM13, const float AM14, const float AM21, const float AM22, const float AM23, const float AM24, const float AM31, const float AM32, const float AM33, const float AM34, const float AM41, const float AM42, const float AM43, const float AM44)/* overload */;
    __fastcall TMatrix3D(const System::TSingleDynArray AArray)/* overload */;
    static TMatrix3D __fastcall CreateScaling(const TPoint3D &AScale);
    static TMatrix3D __fastcall CreateTranslation(const TPoint3D &ATranslation);
    static TMatrix3D __fastcall CreateRotationX(const float AAngle);
    static TMatrix3D __fastcall CreateRotationY(const float AAngle);
    static TMatrix3D __fastcall CreateRotationZ(const float AAngle);
    static TMatrix3D __fastcall CreateRotation(const TPoint3D &AAxis, const float AAngle);
    static TMatrix3D __fastcall CreateRotationYawPitchRoll(const float AYaw, const float APitch, const float ARoll);
    static TMatrix3D __fastcall CreateRotationHeadingPitchBank(const float AHeading, const float APitch, const float ABank);
    static TMatrix3D __fastcall CreateLookAtRH(const TPoint3D &ASource, const TPoint3D &ATarget, const TPoint3D &ACeiling);
    static TMatrix3D __fastcall CreateLookAtLH(const TPoint3D &ASource, const TPoint3D &ATarget, const TPoint3D &ACeiling);
    static TMatrix3D __fastcall CreateLookAtDirRH(const TPoint3D &ASource, const TPoint3D &ADirection, const TPoint3D &ACeiling);
    static TMatrix3D __fastcall CreateLookAtDirLH(const TPoint3D &ASource, const TPoint3D &ADirection, const TPoint3D &ACeiling);
    static TMatrix3D __fastcall CreateOrthoLH(const float AWidth, const float AHeight, const float AZNear, const float AZFar);
    static TMatrix3D __fastcall CreateOrthoRH(const float AWidth, const float AHeight, const float AZNear, const float AZFar);
    static TMatrix3D __fastcall CreateOrthoOffCenterLH(const float ALeft, const float ATop, const float ARight, const float ABottom, const float AZNear, const float AZFar);
    static TMatrix3D __fastcall CreateOrthoOffCenterRH(const float ALeft, const float ATop, const float ARight, const float ABottom, const float AZNear, const float AZFar);
    static TMatrix3D __fastcall CreatePerspectiveFovLH(const float AFOV, const float AAspect, const float AZNear, const float AZFar, const bool AHorizontalFOV = false);
    static TMatrix3D __fastcall CreatePerspectiveFovRH(const float AFOV, const float AAspect, const float AZNear, const float AZFar, const bool AHorizontalFOV = false);
    static TMatrix3D __fastcall _op_Multiply(const TMatrix3D &APoint1, const TMatrix3D &APoint2);
    static TPoint3D __fastcall _op_Multiply(const TPoint3D &APoint, const TMatrix3D &AMatrix);
    static TVector3D __fastcall _op_Multiply(const TVector3D &AVector, const TMatrix3D &AMatrix);
    TMatrix3D __fastcall Transpose(void);
    float __fastcall Determinant(void);
    TMatrix3D __fastcall Adjoint(void);
    TMatrix3D __fastcall Inverse(void);
    TMatrix __fastcall ToMatrix(void);
    TPoint3D __fastcall EyePosition(void);
    TMatrix3D() {}
public:
    union
    {
        struct
        {
            float m11;
            float m12;
            float m13;
            float m14;
            float m21;
            float m22;
            float m23;
            float m24;
            float m31;
            float m32;
            float m33;
            float m34;
            float m41;
            float m42;
            float m43;
            float m44;
        };
        struct
        {
            System::Math::Vectors::TMatrix3DTypeBase M;
        };
    };
};

Properties

Type Visibility Source Unit Parent
record
struct
public
System.Math.Vectors.pas
System.Math.Vectors.hpp
System.Math.Vectors System.Math.Vectors

Description

Represents a 4-by-4 matrix type.

TMatrix3D is a 4-by-4 matrix type used in 3D point translations and object rotations.

Personal tools
RAD Studio 10.2 Tokyo
In Other Languages
Previous Versions
Assistance