Level H Engine
Public Member Functions | Public Attributes | List of all members
Vec3 Struct Reference

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

#include <Vec3.h>

Collaboration diagram for Vec3:
Collaboration graph

Public Member Functions

 Vec3 ()
 Constructs the Vec3 setting the values to 0,0,0. More...
 
 Vec3 (float x, float y, float z)
 Constructs the Vec3 setting the values to the input coordinates. More...
 
 Vec3 (int x, int y, int z)
 Constructs the Vec3 setting the values to the input coordinates. More...
 
Vec3operator+= (Vec3 vecIn)
 Overloads the += operator. More...
 
Vec3operator-= (Vec3 vecIn)
 Overloads the -= operator. More...
 
float getLength ()
 Returns the length of the Vec3. More...
 
Vec3 getNormalised ()
 Returns a normalised version of the Vec3. More...
 

Public Attributes

float x
 Position variables. More...
 
float y
 
float z
 

Detailed Description

Contains the Vec3 structure with functions and overloaded operators.

Constructor & Destructor Documentation

◆ Vec3() [1/3]

Vec3::Vec3 ( )
inline

Constructs the Vec3 setting the values to 0,0,0.

Here is the caller graph for this function:

◆ Vec3() [2/3]

Vec3::Vec3 ( float  x,
float  y,
float  z 
)
inline

Constructs the Vec3 setting the values to the input coordinates.

Parameters
xThe inputed x position.
yThe inputed y position.
zThe inputed z position.

◆ Vec3() [3/3]

Vec3::Vec3 ( int  x,
int  y,
int  z 
)
inline

Constructs the Vec3 setting the values to the input coordinates.

Parameters
xThe inputed x position.
yThe inputed y position.
zThe inputed z position.

Member Function Documentation

◆ getLength()

float Vec3::getLength ( )
inline

Returns the length of the Vec3.

Returns
The length of the Vec3.
Here is the caller graph for this function:

◆ getNormalised()

Vec3 Vec3::getNormalised ( )
inline

Returns a normalised version of the Vec3.

Returns
The normalised Vec3.
Here is the call graph for this function:

◆ operator+=()

Vec3* Vec3::operator+= ( Vec3  vecIn)
inline

Overloads the += operator.

Parameters
vecInThe input Vec3.
Returns
The new vector.

◆ operator-=()

Vec3* Vec3::operator-= ( Vec3  vecIn)
inline

Overloads the -= operator.

Parameters
vecInThe input Vec3.
Returns
The new vector.

Member Data Documentation

◆ x

float Vec3::x

Position variables.

◆ y

float Vec3::y

◆ z

float Vec3::z

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