Level H Engine
Classes | Functions
Vec3.h File Reference
#include "math.h"
Include dependency graph for Vec3.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Vec3
 Contains the Vec3 structure with functions and overloaded operators. More...
 

Functions

Vec3 operator- (Vec3 vecIn)
 Overloads the - operator allowing a Vec3 to be inverted. More...
 
Vec3 operator- (Vec3 vecInA, Vec3 vecInB)
 Overloads the - operator allowing Vec3's to be subtracted from each other. More...
 
Vec3 operator+ (Vec3 vecInA, Vec3 vecInB)
 Overloads the + operator. More...
 
Vec3 operator/ (Vec3 vecInA, float scalar)
 Overloads the / operator allowing a Vec3 to be divided by a scalar. More...
 
Vec3 operator* (Vec3 vecInA, float scalar)
 Overloads the * operator allowing a Vec3 to be multiplied by a scalar. More...
 
Vec3 operator* (Vec3 vecInA, Vec3 vecInB)
 Overloads the * operator allowing a Vec2 to be multiplied by another Vec3. More...
 

Function Documentation

◆ operator*() [1/2]

Vec3 operator* ( Vec3  vecInA,
float  scalar 
)
inline

Overloads the * operator allowing a Vec3 to be multiplied by a scalar.

Parameters
vecInAOne of the input Vec3's.
scalarThe scalar to multiply by.
Returns
The new vector.

◆ operator*() [2/2]

Vec3 operator* ( Vec3  vecInA,
Vec3  vecInB 
)
inline

Overloads the * operator allowing a Vec2 to be multiplied by another Vec3.

Parameters
vecInAOne of the input Vec3's.
vecInBOne of the input Vec3's.
Returns
The new vector.

◆ operator+()

Vec3 operator+ ( Vec3  vecInA,
Vec3  vecInB 
)
inline

Overloads the + operator.

Parameters
vecInAOne of the input Vec3's.
vecInBOne of the input Vec3's.
Returns
The new vector.

◆ operator-() [1/2]

Vec3 operator- ( Vec3  vecIn)
inline

Overloads the - operator allowing a Vec3 to be inverted.

Parameters
vecInThe input Vec3.
Returns
The new vector.

◆ operator-() [2/2]

Vec3 operator- ( Vec3  vecInA,
Vec3  vecInB 
)
inline

Overloads the - operator allowing Vec3's to be subtracted from each other.

Parameters
vecInAOne of the input Vec3's.
vecInBOne of the input Vec3's.
Returns
The new vector.

◆ operator/()

Vec3 operator/ ( Vec3  vecInA,
float  scalar 
)
inline

Overloads the / operator allowing a Vec3 to be divided by a scalar.

Parameters
vecInAOne of the input Vec3's.
scalarThe scalar to divide by.
Returns
The new vector.