Class Vector4

Class Documentation

class Vector4

Represents a 4 dimensional vector.

Public Functions

inline Vector4()

Constructs a Vector4 with all fields set to 0.

inline Vector4(float X, float Y, float Z, float W)

Constructs a Vector4 with the given x, y, z, w values.

Parameters
  • X – float

  • Y – float

  • Z – float

  • W – float

Vector4 operator+(const Vector4 &Other) const

Member by member addition with another Vector4.

Parameters

Vector4 – Other

Vector4 operator-(const Vector4 &Other) const

Subtracts another Vector4 from this one.

Parameters

Vector4 – Other

Vector4 operator/(float Divisor) const

Divides the Vector4 by divisor.

Parameters

float – Divisor

Vector4 operator*(const Vector4 &Other) const

Member by member multiplication with another Vector4.

Parameters

Vector4 – Other

Vector4 operator*(float Scalar) const

Multiplies the Vector4 by a scalar.

Parameters

float – Scalar

bool operator==(Vector4 Other) const
bool operator!=(Vector4 Other) const

Public Members

float X
float Y
float Z
float W

Public Static Functions

static const Vector4 &Zero()

Returns a Vector4 with all fields set to 0.

Returns

const Vector4&

static const Vector4 &One()

Returns a Vector4 with all fields set to 1.

Returns

const Vector4&

static const Vector4 &Identity()

Returns a Vector4 that represents an identity quaternion (0, 0, 0, 1).

Returns

const Vector4&