23#ifndef INCLUDED_VECTOR4D
24#define INCLUDED_VECTOR4D
35 CVector4D(
float x,
float y,
float z,
float w) :
X(x),
Y(y),
Z(z),
W(w) { }
39 return (
X == t.
X &&
Y == t.
Y &&
Z == t.
Z &&
W == t.
W);
74 float inv_f = 1.0f / f;
116 float inv_f = 1.0f / f;
126 return X*a.
X +
Y*a.
Y +
Z*a.
Z +
W*a.
W;
135 sizeof(
CVector4D) ==
sizeof(
float) * 4u &&
138 "CVector4D should be properly layouted to use AsFloatArray");
Definition: Vector4D.h:31
CVector4D & operator+=(const CVector4D &t)
Definition: Vector4D.h:78
CVector4D operator/(float f) const
Definition: Vector4D.h:72
PS::span< const float > AsFloatArray() const
Definition: Vector4D.h:130
float Dot(const CVector4D &a) const
Definition: Vector4D.h:124
CVector4D & operator/=(float f)
Definition: Vector4D.h:114
CVector4D & operator-=(const CVector4D &t)
Definition: Vector4D.h:87
CVector4D operator-(const CVector4D &t) const
Definition: Vector4D.h:57
CVector4D operator*(float f) const
Definition: Vector4D.h:67
bool operator!=(const CVector4D &t) const
Definition: Vector4D.h:42
CVector4D()
Definition: Vector4D.h:33
float Z
Definition: Vector4D.h:142
CVector4D operator-() const
Definition: Vector4D.h:47
CVector4D operator+(const CVector4D &t) const
Definition: Vector4D.h:52
float X
Definition: Vector4D.h:142
CVector4D & operator*=(float f)
Definition: Vector4D.h:105
bool operator==(const CVector4D &t) const
Definition: Vector4D.h:37
CVector4D operator*(const CVector4D &t) const
Definition: Vector4D.h:62
float W
Definition: Vector4D.h:142
CVector4D(float x, float y, float z, float w)
Definition: Vector4D.h:35
CVector4D & operator*=(const CVector4D &t)
Definition: Vector4D.h:96
float Y
Definition: Vector4D.h:142
Simplifed version of std::span (C++20) as we don't support the original one yet.
Definition: Span.h:37