Class Vector3

Class Documentation

class Vector3

Represents a 3 dimensional vector.

Public Functions

inline Vector3()

Constructs a Vector3 with all fields set to 0.

inline Vector3(float X, float Y, float Z)

Constructs a Vector3 with the given x, y, z values.

Parameters
  • X – float

  • Y – float

  • Z – float

Vector3 operator+(const Vector3 &Other) const

Member by member addition with another Vector3.

Parameters

Vector3 – Other

Vector3 operator-(const Vector3 &Other) const

Subtracts another Vector3 from this one.

Parameters

Vector3 – Other

Vector3 operator/(float Divisor) const

Divides the Vector3 by divisor.

Parameters

float – Divisor

Vector3 operator*(const Vector3 &Other) const

Member by member multiplication with another Vector3.

Parameters

Vector3 – Other

Vector3 operator*(float Scalar) const

Multiplies the Vector3 by a scalar.

Parameters

float – Scalar

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

Public Members

float X
float Y
float Z

Public Static Functions

static const Vector3 &Zero()

Returns a Vector3 with all fields set to 0.

Returns

const Vector3&

static const Vector3 &One()

Returns a Vector3 with all fields set to 1.

Returns

const Vector3&