Struct Vector4Base
Represents a four dimensional mathematical vector with 32-bit precision (per-component).
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Core/Math/Vector4.h
Syntax
public struct Vector4Base<T>
Type Parameters
T
|
Constructors
Vector4Base()
Empty constructor.
Declaration
public Vector4Base() = default
Fields
Half
Declaration
public static FLAXENGINE_API Vector4Base<T> Half
Field Value
FLAXENGINE_API Vector4Base<T>
|
Maximum
Declaration
public static FLAXENGINE_API Vector4Base<T> Maximum
Field Value
FLAXENGINE_API Vector4Base<T>
|
Minimum
Declaration
public static FLAXENGINE_API Vector4Base<T> Minimum
Field Value
FLAXENGINE_API Vector4Base<T>
|
One
Declaration
public static FLAXENGINE_API Vector4Base<T> One
Field Value
FLAXENGINE_API Vector4Base<T>
|
Raw
The raw vector values (in XYZW order).
Declaration
public T Raw[4]
Field Value
T
|
TypeInitializer
Declaration
public static FLAXENGINE_API struct ScriptingTypeInitializer TypeInitializer
Field Value
FLAXENGINE_API struct ScriptingTypeInitializer
|
UnitW
Declaration
public static FLAXENGINE_API Vector4Base<T> UnitW
Field Value
FLAXENGINE_API Vector4Base<T>
|
UnitX
Declaration
public static FLAXENGINE_API Vector4Base<T> UnitX
Field Value
FLAXENGINE_API Vector4Base<T>
|
UnitY
Declaration
public static FLAXENGINE_API Vector4Base<T> UnitY
Field Value
FLAXENGINE_API Vector4Base<T>
|
UnitZ
Declaration
public static FLAXENGINE_API Vector4Base<T> UnitZ
Field Value
FLAXENGINE_API Vector4Base<T>
|
W
The W component.
Declaration
public T W
Field Value
T
|
X
The X component.
Declaration
public T X
Field Value
T
|
Y
The Y component.
Declaration
public T Y
Field Value
T
|
Z
The Z component.
Declaration
public T Z
Field Value
T
|
Zero
Declaration
public static FLAXENGINE_API Vector4Base<T> Zero
Field Value
FLAXENGINE_API Vector4Base<T>
|
Methods
Abs(const Vector4Base& v)
Declaration
public static Vector4Base Abs(const Vector4Base& v)
Parameters
Vector4Base
v
|
Returns
Vector4Base
|
Add(const Vector4Base& a, const Vector4Base& b, Vector4Base& result)
Declaration
public static void Add(const Vector4Base& a, const Vector4Base& b, Vector4Base& result)
Parameters
Vector4Base
a
|
Vector4Base
b
|
Vector4Base
result
|
AverageArithmetic()
Returns the average arithmetic of all the components.
Declaration
public T AverageArithmetic() const
Returns
T
|
Ceil(const Vector4Base& v)
Declaration
public static Vector4Base Ceil(const Vector4Base& v)
Parameters
Vector4Base
v
|
Returns
Vector4Base
|
Clamp(const Vector4Base& v, const Vector4Base& min, const Vector4Base& max)
Declaration
public static Vector4Base Clamp(const Vector4Base& v, const Vector4Base& min, const Vector4Base& max)
Parameters
Vector4Base
v
|
Vector4Base
min
|
Vector4Base
max
|
Returns
Vector4Base
|
Clamp(const Vector4Base& v, const Vector4Base& min, const Vector4Base& max, Vector4Base& result)
Declaration
public static void Clamp(const Vector4Base& v, const Vector4Base& min, const Vector4Base& max, Vector4Base& result)
Parameters
Vector4Base
v
|
Vector4Base
min
|
Vector4Base
max
|
Vector4Base
result
|
Divide(const Vector4Base& a, const Vector4Base& b, Vector4Base& result)
Declaration
public static void Divide(const Vector4Base& a, const Vector4Base& b, Vector4Base& result)
Parameters
Vector4Base
a
|
Vector4Base
b
|
Vector4Base
result
|
Floor(const Vector4Base& v)
Declaration
public static Vector4Base Floor(const Vector4Base& v)
Parameters
Vector4Base
v
|
Returns
Vector4Base
|
Frac(const Vector4Base& v)
Declaration
public static Vector4Base Frac(const Vector4Base& v)
Parameters
Vector4Base
v
|
Returns
Vector4Base
|
GetAbsolute()
Calculates a vector with values being absolute values of that vector.
Declaration
public Vector4Base GetAbsolute() const
Returns
Vector4Base
|
GetNegative()
Calculates a vector with values being opposite to values of that vector.
Declaration
public Vector4Base GetNegative() const
Returns
Vector4Base
|
IsAnyZero()
Declaration
public bool IsAnyZero() const
Returns
bool
|
IsInfinity()
Returns true if vector has one or more components equal to +/- infinity.
Declaration
public bool IsInfinity() const
Returns
bool
|
IsNaN()
Returns true if vector has one or more components is not a number (NaN).
Declaration
public bool IsNaN() const
Returns
bool
|
IsNanOrInfinity()
Returns true if vector has one or more components equal to +/- infinity or NaN.
Declaration
public bool IsNanOrInfinity() const
Returns
bool
|
IsOne()
Declaration
public bool IsOne() const
Returns
bool
|
IsZero()
Declaration
public bool IsZero() const
Returns
bool
|
Lerp(const Vector4Base& start, const Vector4Base& end, T amount)
Declaration
public static Vector4Base Lerp(const Vector4Base& start, const Vector4Base& end, T amount)
Parameters
Vector4Base
start
|
Vector4Base
end
|
T
amount
|
Returns
Vector4Base
|
Lerp(const Vector4Base& start, const Vector4Base& end, T amount, Vector4Base& result)
Declaration
public static void Lerp(const Vector4Base& start, const Vector4Base& end, T amount, Vector4Base& result)
Parameters
Vector4Base
start
|
Vector4Base
end
|
T
amount
|
Vector4Base
result
|
MaxValue()
Returns the maximum value of all the components.
Declaration
public T MaxValue() const
Returns
T
|
MinValue()
Returns the minimum value of all the components.
Declaration
public T MinValue() const
Returns
T
|
Mod(const Vector4Base& a, const Vector4Base& b)
Declaration
public static Vector4Base Mod(const Vector4Base& a, const Vector4Base& b)
Parameters
Vector4Base
a
|
Vector4Base
b
|
Returns
Vector4Base
|
Multiply(const Vector4Base& a, const Vector4Base& b, Vector4Base& result)
Declaration
public static void Multiply(const Vector4Base& a, const Vector4Base& b, Vector4Base& result)
Parameters
Vector4Base
a
|
Vector4Base
b
|
Vector4Base
result
|
NearEqual(const Vector4Base& a, const Vector4Base& b)
Declaration
public static bool NearEqual(const Vector4Base& a, const Vector4Base& b)
Parameters
Vector4Base
a
|
Vector4Base
b
|
Returns
bool
|
NearEqual(const Vector4Base& a, const Vector4Base& b, T epsilon)
Declaration
public static bool NearEqual(const Vector4Base& a, const Vector4Base& b, T epsilon)
Parameters
Vector4Base
a
|
Vector4Base
b
|
T
epsilon
|
Returns
bool
|
operator!=(const Vector4Base& b)
Declaration
public bool operator!=(const Vector4Base& b) const
Parameters
Vector4Base
b
|
Returns
bool
|
operator-()
operator-(const Vector4Base& b)
Declaration
public Vector4Base operator-(const Vector4Base& b) const
Parameters
Vector4Base
b
|
Returns
Vector4Base
|
operator-(T b)
operator-(typename TOtherFloat<T>::Type a)
Declaration
public Vector4Base operator-(typename TOtherFloat<T>::Type a) const
Parameters
typename TOtherFloat<T>::Type
a
|
Returns
Vector4Base
|
operator*(const Vector4Base& b)
Declaration
public Vector4Base operator*(const Vector4Base& b) const
Parameters
Vector4Base
b
|
Returns
Vector4Base
|
operator*(T b)
operator*(typename TOtherFloat<T>::Type a)
Declaration
public Vector4Base operator*(typename TOtherFloat<T>::Type a) const
Parameters
typename TOtherFloat<T>::Type
a
|
Returns
Vector4Base
|
operator*=(const Vector4Base& b)
Declaration
public Vector4Base operator*=(const Vector4Base& b)
Parameters
Vector4Base
b
|
Returns
Vector4Base
|
operator*=(T b)
operator/(const Vector4Base& b)
Declaration
public Vector4Base operator/(const Vector4Base& b) const
Parameters
Vector4Base
b
|
Returns
Vector4Base
|
operator/(T b)
operator/(typename TOtherFloat<T>::Type a)
Declaration
public Vector4Base operator/(typename TOtherFloat<T>::Type a) const
Parameters
typename TOtherFloat<T>::Type
a
|
Returns
Vector4Base
|
operator/=(const Vector4Base& b)
Declaration
public Vector4Base operator/=(const Vector4Base& b)
Parameters
Vector4Base
b
|
Returns
Vector4Base
|
operator/=(T b)
operator+(const Vector4Base& b)
Declaration
public Vector4Base operator+(const Vector4Base& b) const
Parameters
Vector4Base
b
|
Returns
Vector4Base
|
operator+(T b)
operator+(typename TOtherFloat<T>::Type a)
Declaration
public Vector4Base operator+(typename TOtherFloat<T>::Type a) const
Parameters
typename TOtherFloat<T>::Type
a
|
Returns
Vector4Base
|
operator+=(const Vector4Base& b)
Declaration
public Vector4Base operator+=(const Vector4Base& b)
Parameters
Vector4Base
b
|
Returns
Vector4Base
|
operator+=(T b)
operator<(const Vector4Base& b)
operator<=(const Vector4Base& b)
Declaration
public bool operator<=(const Vector4Base& b) const
Parameters
Vector4Base
b
|
Returns
bool
|
operator-=(const Vector4Base& b)
Declaration
public Vector4Base operator-=(const Vector4Base& b)
Parameters
Vector4Base
b
|
Returns
Vector4Base
|
operator-=(T b)
operator==(const Vector4Base& b)
Declaration
public bool operator==(const Vector4Base& b) const
Parameters
Vector4Base
b
|
Returns
bool
|
operator>(const Vector4Base& b)
operator>=(const Vector4Base& b)
Declaration
public bool operator>=(const Vector4Base& b) const
Parameters
Vector4Base
b
|
Returns
bool
|
Round(const Vector4Base& v)
Declaration
public static Vector4Base Round(const Vector4Base& v)
Parameters
Vector4Base
v
|
Returns
Vector4Base
|
Subtract(const Vector4Base& a, const Vector4Base& b, Vector4Base& result)
Declaration
public static void Subtract(const Vector4Base& a, const Vector4Base& b, Vector4Base& result)
Parameters
Vector4Base
a
|
Vector4Base
b
|
Vector4Base
result
|
SumValues()
Gets the sum of all vector components values.
Declaration
public T SumValues() const
Returns
T
|
ToString()
Declaration
public FLAXENGINE_API String ToString() const
Returns
FLAXENGINE_API String
|
Transform(const Vector4Base& v, const Matrix& m)
Declaration
public static FLAXENGINE_API Vector4Base Transform(const Vector4Base& v, const Matrix& m)
Parameters
Vector4Base
v
|
Matrix
m
|
Returns
FLAXENGINE_API Vector4Base
|
Vector4Base(const Color& color)
Declaration
public FLAXENGINE_API Vector4Base(const Color& color)
Parameters
Color
color
|
Returns
FLAXENGINE_API
|
Vector4Base(const Double2& xy, const Double2& zw)
Declaration
public FLAXENGINE_API Vector4Base(const Double2& xy, const Double2& zw)
Parameters
Double2
xy
|
Double2
zw
|
Returns
FLAXENGINE_API
|
Vector4Base(const Double2& xy, T z = 0, T w = 0)
Declaration
public FLAXENGINE_API Vector4Base(const Double2& xy, T z = 0, T w = 0)
Parameters
Double2
xy
|
T
z
|
T
w
|
Returns
FLAXENGINE_API
|
Vector4Base(const Double3& xyz, T w = 0)
Declaration
public FLAXENGINE_API Vector4Base(const Double3& xyz, T w = 0)
Parameters
Double3
xyz
|
T
w
|
Returns
FLAXENGINE_API
|
Vector4Base(const Float2& xy, const Float2& zw)
Declaration
public FLAXENGINE_API Vector4Base(const Float2& xy, const Float2& zw)
Parameters
Float2
xy
|
Float2
zw
|
Returns
FLAXENGINE_API
|
Vector4Base(const Float2& xy, T z = 0, T w = 0)
Declaration
public FLAXENGINE_API Vector4Base(const Float2& xy, T z = 0, T w = 0)
Parameters
Float2
xy
|
T
z
|
T
w
|
Returns
FLAXENGINE_API
|
Vector4Base(const Float3& xyz, T w = 0)
Declaration
public FLAXENGINE_API Vector4Base(const Float3& xyz, T w = 0)
Parameters
Float3
xyz
|
T
w
|
Returns
FLAXENGINE_API
|
Vector4Base(const Int2& xy, T z = 0, T w = 0)
Declaration
public FLAXENGINE_API Vector4Base(const Int2& xy, T z = 0, T w = 0)
Parameters
Int2
xy
|
T
z
|
T
w
|
Returns
FLAXENGINE_API
|
Vector4Base(const Int3& xyz, T w = 0)
Declaration
public FLAXENGINE_API Vector4Base(const Int3& xyz, T w = 0)
Parameters
Int3
xyz
|
T
w
|
Returns
FLAXENGINE_API
|
Vector4Base(const Rectangle& rect)
Declaration
public FLAXENGINE_API Vector4Base(const Rectangle& rect)
Parameters
Rectangle
rect
|
Returns
FLAXENGINE_API
|
Vector4Base(const T* xyzw)
Declaration
public Vector4Base(const T* xyzw)
Parameters
T
xyzw
|
Returns
FORCE_INLINE
|
Vector4Base(const Vector4Base<U>& xyzw)
Declaration
public Vector4Base(const Vector4Base<U>& xyzw)
Parameters
Vector4Base<U>
xyzw
|
Returns
FORCE_INLINE
|
Type Parameters
typename U
|
typename TEnableIf<><>
|
Vector4Base(T x, T y, T z, T w)
Declaration
public Vector4Base(T x, T y, T z, T w)
Parameters
T
x
|
T
y
|
T
z
|
T
w
|
Returns
FORCE_INLINE
|
Vector4Base(T xyzw)
Declaration
public Vector4Base(T xyzw)
Parameters
T
xyzw
|
Returns
FORCE_INLINE
|