Elaztek Developer Hub
Blamite Game Engine - Strings  00386.06.16.23.0646.blamite
A library containing general purpose utilities and classes for use in multiple projects.
BlamVector4 Struct Reference

Structure representing a 4D vector. More...

#include <vector.h>

Public Member Functions

 BlamVector4 ()
 
 BlamVector4 (float _x, float _y, float _z, float _w)
 
std::string ToString ()
 Converts the vector to a string, with each value separated by commas. More...
 
BlamVector4 operator+ (const BlamVector4 &vector)
 Combines the values of two 4D vectors. More...
 
BlamVector4 operator+ (const float &_float)
 Adds a float value to the X, Y, Z, and W values of the vector. More...
 
BlamVector4 operator* (const BlamVector4 &vector)
 Multiplies the values of two 4D vectors. More...
 
BlamVector4 operator* (const float &_float)
 Multiplies the X, Y, Z, and W values of the vector by a float value. More...
 

Public Attributes

float x = 0.0f
 The X-coordinate of the 4D vector. More...
 
float y = 0.0f
 The Y-coordinate of the 4D vector. More...
 
float z = 0.0f
 The Z-coordinate of the 4D vector. More...
 
float w = 0.0f
 The W-coordinate of the 4D vector. More...
 

Detailed Description

Structure representing a 4D vector.

Often used for floating-point colors (0.0-1.0 instead of 0-255), but can be used for any purpose.

Constructor & Destructor Documentation

◆ BlamVector4() [1/2]

BlamVector4::BlamVector4 ( )
inline

◆ BlamVector4() [2/2]

BlamVector4::BlamVector4 ( float  _x,
float  _y,
float  _z,
float  _w 
)

Member Function Documentation

◆ operator*() [1/2]

BlamVector4 BlamVector4::operator* ( const BlamVector4 vector)

Multiplies the values of two 4D vectors.

Parameters
vector- The vector to multiply the current vector by.
Returns
A new vector with the X, Y, Z, and W values from both vectors multiplied.

◆ operator*() [2/2]

BlamVector4 BlamVector4::operator* ( const float &  _float)

Multiplies the X, Y, Z, and W values of the vector by a float value.

Parameters
_float- The float value to multiply the vector values by.
Returns
A new vector, with all 4 values multiplied by the float value.

◆ operator+() [1/2]

BlamVector4 BlamVector4::operator+ ( const BlamVector4 vector)

Combines the values of two 4D vectors.

Parameters
vector- The vector to combine with the current vector.
Returns
A new vector with the X, Y, Z, and W values from both vectors combined.

◆ operator+() [2/2]

BlamVector4 BlamVector4::operator+ ( const float &  _float)

Adds a float value to the X, Y, Z, and W values of the vector.

Parameters
_float- The float value to add to the vector.
Returns
A new vector, with all 3 values increased by the float value.

◆ ToString()

std::string BlamVector4::ToString ( )

Converts the vector to a string, with each value separated by commas.

Returns
A string representing the vector in x,y,z,w format.
+ Here is the call graph for this function:

Member Data Documentation

◆ w

float BlamVector4::w = 0.0f

The W-coordinate of the 4D vector.

◆ x

float BlamVector4::x = 0.0f

The X-coordinate of the 4D vector.

◆ y

float BlamVector4::y = 0.0f

The Y-coordinate of the 4D vector.

◆ z

float BlamVector4::z = 0.0f

The Z-coordinate of the 4D vector.


The documentation for this struct was generated from the following files: