![]() |
Blamite Game Engine - Strings
00402.09.29.23.0627.blamite
A library containing general purpose utilities and classes for use in multiple projects.
|
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... | |
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.
|
inline |
BlamVector4::BlamVector4 | ( | float | _x, |
float | _y, | ||
float | _z, | ||
float | _w | ||
) |
BlamVector4 BlamVector4::operator* | ( | const BlamVector4 & | vector | ) |
Multiplies the values of two 4D vectors.
vector | - The vector to multiply the current vector by. |
BlamVector4 BlamVector4::operator* | ( | const float & | _float | ) |
Multiplies the X, Y, Z, and W values of the vector by a float value.
_float | - The float value to multiply the vector values by. |
BlamVector4 BlamVector4::operator+ | ( | const BlamVector4 & | vector | ) |
Combines the values of two 4D vectors.
vector | - The vector to combine with the current vector. |
BlamVector4 BlamVector4::operator+ | ( | const float & | _float | ) |
Adds a float value to the X, Y, Z, and W values of the vector.
_float | - The float value to add to the vector. |
std::string BlamVector4::ToString | ( | ) |
Converts the vector to a string, with each value separated by commas.
x,y,z,w
format. float BlamVector4::w = 0.0f |
The W-coordinate of the 4D vector.
float BlamVector4::x = 0.0f |
The X-coordinate of the 4D vector.
float BlamVector4::y = 0.0f |
The Y-coordinate of the 4D vector.
float BlamVector4::z = 0.0f |
The Z-coordinate of the 4D vector.