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.
BlamVector3 Struct Reference

Structure representing a 3D vector. More...

#include <vector.h>

Public Member Functions

 BlamVector3 ()
 
 BlamVector3 (float _x, float _y, float _z)
 
BlamVector3 ConvertForBGFX ()
 Converts the X/Y/Z coordinate directions from Blamite's coordinate system to the internal coordinate system used by bgfx. More...
 
BlamVector3 ConvertDegreesToRadians ()
 Converts all coordinates in the vector from degrees to radians. More...
 
bool Equals (BlamVector3 vector)
 Checks if this vector is equal to another. More...
 
std::string ToString ()
 Converts the vector to a string, with each value separated by commas. More...
 
BlamVector3 operator+ (const BlamVector3 &vector)
 Combines the values of two 3D vectors. More...
 
BlamVector3 operator+ (const float &_float)
 Adds a float value to the X, Y, and Z values of the vector. More...
 
BlamVector3 operator* (const BlamVector3 &vector)
 Multiplies the values of two 3D vectors. More...
 
BlamVector3 operator* (const float &_float)
 Multiplies the X, Y, and Z values of the vector by a float value. More...
 

Public Attributes

float x = 0.0f
 The X-coordinate of the 3D vector, representing horizontal X (width) position. More...
 
float y = 0.0f
 The Y-coordinate of the 3D vector, representing horizontal Y (depth) position. More...
 
float z = 0.0f
 The Z-coordinate of the 3D vector, representing vertical position. More...
 

Detailed Description

Structure representing a 3D vector.

Constructor & Destructor Documentation

◆ BlamVector3() [1/2]

BlamVector3::BlamVector3 ( )
inline

◆ BlamVector3() [2/2]

BlamVector3::BlamVector3 ( float  _x,
float  _y,
float  _z 
)

Member Function Documentation

◆ ConvertDegreesToRadians()

BlamVector3 BlamVector3::ConvertDegreesToRadians ( )

Converts all coordinates in the vector from degrees to radians.

Returns
The 3D vector, converted to radians.
+ Here is the call graph for this function:

◆ ConvertForBGFX()

BlamVector3 BlamVector3::ConvertForBGFX ( )

Converts the X/Y/Z coordinate directions from Blamite's coordinate system to the internal coordinate system used by bgfx.

Called before submitting geometry to bgfx for rendering.

Returns
The 3D vector, ready to be submitted to bgfx.

◆ Equals()

bool BlamVector3::Equals ( BlamVector3  vector)

Checks if this vector is equal to another.

Parameters
vector- The vector to compare against.
Returns
true if the two vectors are equal, otherwise returns false.

◆ operator*() [1/2]

BlamVector3 BlamVector3::operator* ( const BlamVector3 vector)

Multiplies the values of two 3D vectors.

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

◆ operator*() [2/2]

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

Multiplies the X, Y, and Z 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 3 values multiplied by the float value.

◆ operator+() [1/2]

BlamVector3 BlamVector3::operator+ ( const BlamVector3 vector)

Combines the values of two 3D vectors.

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

◆ operator+() [2/2]

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

Adds a float value to the X, Y, and Z 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 BlamVector3::ToString ( )

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

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

Member Data Documentation

◆ x

float BlamVector3::x = 0.0f

The X-coordinate of the 3D vector, representing horizontal X (width) position.

◆ y

float BlamVector3::y = 0.0f

The Y-coordinate of the 3D vector, representing horizontal Y (depth) position.

◆ z

float BlamVector3::z = 0.0f

The Z-coordinate of the 3D vector, representing vertical position.


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