System.Math.Vectors.TVector
Delphi
TVector = record
class function Create(const AX, AY: Single; const AW: Single = 1.0): TVector; overload; static; inline;
class function Create(const APoint: TPointF): TVector; overload; static; inline;
class operator Add(const AVector1, AVector2: TVector): TVector;
class operator Subtract(const AVector1, AVector2: TVector): TVector;
class operator Equal(const AVector1, AVector2: TVector): Boolean; inline;
class operator NotEqual(const AVector1, AVector2: TVector): Boolean; inline;
class operator Implicit(const APoint: TPointF): TVector; inline;
class operator Explicit(const APoint: TVector): TPointF;
class operator Implicit(const APoint: TVector): TPointF; inline; deprecated 'Implicit conversion from TVector to TPointF requires homogenization';
class operator Implicit(const ASize: TSizeF): TVector; inline;
class operator Multiply(const AVector: TVector; const AFactor: Single): TVector;
class operator Multiply(const AFactor: Single; const AVector: TVector): TVector; inline;
class operator Divide(const AVector: TVector; const AFactor: Single): TVector;
class function Zero: TVector; inline; static;
function Length: Single;
function Normalize: TVector;
function CrossProduct(const AVector: TVector): TVector;
function DotProduct(const AVector: TVector): Single;
function MidVector(const AVector: TVector): TVector;
function ToPointF: TPointF; inline; deprecated 'Use explicit typecast instead.';
case Integer of
0: (V: TVectorArray;);
1: (X: Single;
Y: Single;
W: Single;);
end;
C++
struct DECLSPEC_DRECORD TVector
{
public:
static TVector __fastcall Create(const float AX, const float AY, const float AW = 1.000000E+00f)/* overload */;
static TVector __fastcall Create(const System::Types::TPointF &APoint)/* overload */;
static TVector __fastcall _op_Addition(const TVector &AVector1, const TVector &AVector2);
static TVector __fastcall _op_Subtraction(const TVector &AVector1, const TVector &AVector2);
static bool __fastcall _op_Equality(const TVector &AVector1, const TVector &AVector2);
static bool __fastcall _op_Inequality(const TVector &AVector1, const TVector &AVector2);
static TVector __fastcall _op_Implicit(const System::Types::TPointF &APoint);
__fastcall operator System::Types::TPointF() _DEPRECATED_ATTRIBUTE1("Implicit conversion from TVector to TPointF requires homogenization") ;
static TVector __fastcall _op_Implicit(const System::Types::TSizeF &ASize);
static TVector __fastcall _op_Multiply(const TVector &AVector, const float AFactor);
static TVector __fastcall _op_Multiply(const float AFactor, const TVector &AVector);
static TVector __fastcall _op_Division(const TVector &AVector, const float AFactor);
static TVector __fastcall Zero();
float __fastcall Length();
TVector __fastcall Normalize();
TVector __fastcall CrossProduct(const TVector &AVector);
float __fastcall DotProduct(const TVector &AVector);
TVector __fastcall MidVector(const TVector &AVector);
System::Types::TPointF __fastcall ToPointF _DEPRECATED_ATTRIBUTE1("Use explicit typecast instead.") ();
friend TVector operator +(const TVector &AVector1, const TVector &AVector2) { return TVector::_op_Addition(AVector1, AVector2); }
friend TVector operator -(const TVector &AVector1, const TVector &AVector2) { return TVector::_op_Subtraction(AVector1, AVector2); }
friend bool operator ==(const TVector &AVector1, const TVector &AVector2) { return TVector::_op_Equality(AVector1, AVector2); }
friend bool operator !=(const TVector &AVector1, const TVector &AVector2) { return TVector::_op_Inequality(AVector1, AVector2); }
TVector& operator =(const System::Types::TPointF &APoint) { *this = TVector::_op_Implicit(APoint); return *this; }
TVector& operator =(const System::Types::TSizeF &ASize) { *this = TVector::_op_Implicit(ASize); return *this; }
friend TVector operator *(const TVector &AVector, const float AFactor) { return TVector::_op_Multiply(AVector, AFactor); }
friend TVector operator *(const float AFactor, const TVector &AVector) { return TVector::_op_Multiply(AFactor, AVector); }
friend TVector operator /(const TVector &AVector, const float AFactor) { return TVector::_op_Division(AVector, AFactor); }
public:
union
{
struct
{
float X;
float Y;
float W;
};
struct
{
TVectorArray V;
};
};
};
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
record struct |
public | System.Math.Vectors.pas System.Math.Vectors.hpp |
System.Math.Vectors | System.Math.Vectors |
説明
このトピックには現在ドキュメントが存在しません。「ノート」を利用してこのトピックの改良について話しあうことができます。