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

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

#include <Vec4.h>

Collaboration diagram for Vec4:
Collaboration graph

Public Member Functions

 Vec4 ()
 Constructs the Vec4 setting the values to 0,0,0,0. More...
 
 Vec4 (float x, float y, float z, float w)
 Constructs the Vec4 setting the values to the input coordinates. More...
 
 Vec4 (int x, int y, int z, int w)
 Constructs the Vec4 setting the values to the input coordinates. More...
 
Vec4operator+= (Vec4 vecIn)
 Overloads the += operator. More...
 
Vec4operator-= (Vec4 vecIn)
 Overloads the -= operator. More...
 
float getLength ()
 Returns the length of the Vec4. More...
 

Public Attributes

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

Detailed Description

Contains the Vec4 structure with functions and overloaded operators.

Constructor & Destructor Documentation

◆ Vec4() [1/3]

Vec4::Vec4 ( )
inline

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

◆ Vec4() [2/3]

Vec4::Vec4 ( float  x,
float  y,
float  z,
float  w 
)
inline

Constructs the Vec4 setting the values to the input coordinates.

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

◆ Vec4() [3/3]

Vec4::Vec4 ( int  x,
int  y,
int  z,
int  w 
)
inline

Constructs the Vec4 setting the values to the input coordinates.

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

Member Function Documentation

◆ getLength()

float Vec4::getLength ( )
inline

Returns the length of the Vec4.

Returns
The length of the Vec4.

◆ operator+=()

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

Overloads the += operator.

Parameters
vecInThe input Vec4.
Returns
The new vector.

◆ operator-=()

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

Overloads the -= operator.

Parameters
vecInThe input Vec3.
Returns
The new vector.

Member Data Documentation

◆ w

float Vec4::w

◆ x

float Vec4::x

Position variables.

◆ y

float Vec4::y

◆ z

float Vec4::z

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