Wildvine Engine
Referencia Doxygen del codigo propio de Wildvine Engine.
Cargando...
Buscando...
Nada coincide
Referencia de la clase EU::Vector4

A 4D vector class. Más...

#include <Vector4.h>

Métodos públicos

const float * data () const
 Returns a pointer to the quaternion's data.
 
float magnitude () const
 Calculates the magnitude (length) of the vector.
 
Vector4 normalize () const
 Normalizes the vector.
 
Vector4 operator* (float scalar) const
 Multiplies this vector by a scalar.
 
Vector4 operator+ (const Vector4 &other) const
 Adds another vector to this vector.
 
Vector4 operator- (const Vector4 &other) const
 Subtracts another vector from this vector.
 
 Vector4 ()
 Default constructor.
 
 Vector4 (float x, float y, float z, float w)
 Parameterized constructor.
 

Atributos públicos

float w
 The w-coordinate of the vector.
 
float x
 The x-coordinate of the vector.
 
float y
 The y-coordinate of the vector.
 
float z
 The z-coordinate of the vector.
 

Descripción detallada

This class represents a vector in 4-dimensional space and provides basic vector operations such as addition, subtraction, scalar multiplication, and normalization.

Definición en la línea 45 del archivo Vector4.h.

Documentación de constructores y destructores

◆ Vector4() [1/2]

EU::Vector4::Vector4 ( )
inline

Initializes the vector to (0, 0, 0, 0).

Definición en la línea 57 del archivo Vector4.h.

Referenciado por normalize(), operator*(), operator+() y operator-().

◆ Vector4() [2/2]

EU::Vector4::Vector4 ( float  x,
float  y,
float  z,
float  w 
)
inline

Initializes the vector to the given x, y, z, and w values.

Parámetros
xThe x-coordinate.
yThe y-coordinate.
zThe z-coordinate.
wThe w-coordinate.

Definición en la línea 69 del archivo Vector4.h.

Documentación de funciones miembro

◆ data()

const float * EU::Vector4::data ( ) const
inline
Devuelve
Pointer to the first element (x, y, z, w).

Definición en la línea 128 del archivo Vector4.h.

Hace referencia a x.

◆ magnitude()

float EU::Vector4::magnitude ( ) const
inline
Devuelve
The magnitude of the vector.

Definición en la línea 106 del archivo Vector4.h.

Hace referencia a EU::sqrt(), w, x, y y z.

Referenciado por normalize().

◆ normalize()

Vector4 EU::Vector4::normalize ( ) const
inline
Devuelve
The normalized vector.

Definición en la línea 115 del archivo Vector4.h.

Hace referencia a magnitude(), Vector4(), w, x, y y z.

◆ operator*()

Vector4 EU::Vector4::operator* ( float  scalar) const
inline
Parámetros
scalarThe scalar to multiply by.
Devuelve
The result of the multiplication.

Definición en la línea 97 del archivo Vector4.h.

Hace referencia a Vector4(), w, x, y y z.

◆ operator+()

Vector4 EU::Vector4::operator+ ( const Vector4 other) const
inline
Parámetros
otherThe vector to add.
Devuelve
The result of the addition.

Definición en la línea 77 del archivo Vector4.h.

Hace referencia a Vector4(), w, x, y y z.

◆ operator-()

Vector4 EU::Vector4::operator- ( const Vector4 other) const
inline
Parámetros
otherThe vector to subtract.
Devuelve
The result of the subtraction.

Definición en la línea 87 del archivo Vector4.h.

Hace referencia a Vector4(), w, x, y y z.

Documentación de datos miembro

◆ w

float EU::Vector4::w

Definición en la línea 50 del archivo Vector4.h.

Referenciado por magnitude(), normalize(), operator*(), operator+() y operator-().

◆ x

float EU::Vector4::x

Definición en la línea 47 del archivo Vector4.h.

Referenciado por data(), magnitude(), normalize(), operator*(), operator+() y operator-().

◆ y

float EU::Vector4::y

Definición en la línea 48 del archivo Vector4.h.

Referenciado por magnitude(), normalize(), operator*(), operator+() y operator-().

◆ z

float EU::Vector4::z

Definición en la línea 49 del archivo Vector4.h.

Referenciado por magnitude(), normalize(), operator*(), operator+() y operator-().


La documentación de esta clase está generada del siguiente archivo: