Overload  1.1
Game engine with editor
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
OvMaths::FVector4 Struct Reference

#include <FVector4.h>

Public Member Functions

 FVector4 (float p_x=0.0f, float p_y=0.0f, float p_z=0.0f, float p_w=0.0f)
 
 FVector4 (const FVector4 &p_toCopy)
 
 FVector4 (FVector4 &&p_toMove) noexcept=default
 
FVector4 operator- () const
 
FVector4 operator= (const FVector4 &p_other)
 
FVector4 operator+ (const FVector4 &p_other) const
 
FVector4operator+= (const FVector4 &p_other)
 
FVector4 operator- (const FVector4 &p_other) const
 
FVector4operator-= (const FVector4 &p_other)
 
FVector4 operator* (float p_scalar) const
 
FVector4operator*= (float p_scalar)
 
FVector4 operator/ (float p_scalar) const
 
FVector4operator/= (float p_scalar)
 
bool operator== (const FVector4 &p_other)
 
bool operator!= (const FVector4 &p_other)
 

Static Public Member Functions

static FVector4 Add (const FVector4 &p_left, const FVector4 &p_right)
 
static FVector4 Substract (const FVector4 &p_left, const FVector4 &p_right)
 
static FVector4 Multiply (const FVector4 &p_target, float p_scalar)
 
static FVector4 Divide (const FVector4 &p_left, float p_scalar)
 
static float Length (const FVector4 &p_target)
 
static float Dot (const FVector4 &p_left, const FVector4 &p_right)
 
static FVector4 Normalize (const FVector4 &p_target)
 
static FVector4 Lerp (const FVector4 &p_start, const FVector4 &p_end, float p_alpha)
 

Public Attributes

float x
 
float y
 
float z
 
float w
 

Static Public Attributes

static const FVector4 One
 
static const FVector4 Zero
 

Detailed Description

Mathematic representation of a 4D vector of floats

Constructor & Destructor Documentation

◆ FVector4() [1/3]

OvMaths::FVector4::FVector4 ( float  p_x = 0.0f,
float  p_y = 0.0f,
float  p_z = 0.0f,
float  p_w = 0.0f 
)

Default constructor

Parameters
p_x
p_y
p_z
p_w

◆ FVector4() [2/3]

OvMaths::FVector4::FVector4 ( const FVector4 p_toCopy)

Copy constructor

Parameters
p_toCopy

◆ FVector4() [3/3]

OvMaths::FVector4::FVector4 ( FVector4 &&  p_toMove)
defaultnoexcept

Move constructor

Parameters
p_toMove

Member Function Documentation

◆ Add()

OvMaths::FVector4 OvMaths::FVector4::Add ( const FVector4 p_left,
const FVector4 p_right 
)
static

Calculate the sum of two vectors

Parameters
p_left(First vector)
p_right(Second vector)

◆ Divide()

OvMaths::FVector4 OvMaths::FVector4::Divide ( const FVector4 p_left,
float  p_scalar 
)
static

Divide scalar to vector left

Parameters
p_left
p_scalar

◆ Dot()

float OvMaths::FVector4::Dot ( const FVector4 p_left,
const FVector4 p_right 
)
static

Return the dot product of two vectors

Parameters
p_left
p_right

◆ Length()

float OvMaths::FVector4::Length ( const FVector4 p_target)
static

Return the length of a vector

Parameters
p_target

◆ Lerp()

OvMaths::FVector4 OvMaths::FVector4::Lerp ( const FVector4 p_start,
const FVector4 p_end,
float  p_alpha 
)
static

Calculate the interpolation between two vectors

Parameters
p_start
p_end
p_alpha

◆ Multiply()

OvMaths::FVector4 OvMaths::FVector4::Multiply ( const FVector4 p_target,
float  p_scalar 
)
static

Calculate the multiplication of a vector with a scalar

Parameters
p_target
p_scalar

◆ Normalize()

OvMaths::FVector4 OvMaths::FVector4::Normalize ( const FVector4 p_target)
static

Return the normalize of the given vector

Parameters
p_target

◆ operator!=()

bool OvMaths::FVector4::operator!= ( const FVector4 p_other)

Return true if the two vectors are different

Parameters
p_other

◆ operator*()

OvMaths::FVector4 OvMaths::FVector4::operator* ( float  p_scalar) const

Calcualte the multiplication of a vector with a scalar

Parameters
p_scalar

◆ operator*=()

OvMaths::FVector4 & OvMaths::FVector4::operator*= ( float  p_scalar)

Multiply the vector by a scalar

Parameters
p_scalar

◆ operator+()

OvMaths::FVector4 OvMaths::FVector4::operator+ ( const FVector4 p_other) const

Calculate the sum of two vectors

Parameters
p_other

◆ operator+=()

OvMaths::FVector4 & OvMaths::FVector4::operator+= ( const FVector4 p_other)

Add the right vector to the left one

Parameters
p_other

◆ operator-() [1/2]

OvMaths::FVector4 OvMaths::FVector4::operator- ( ) const

Negation

◆ operator-() [2/2]

OvMaths::FVector4 OvMaths::FVector4::operator- ( const FVector4 p_other) const

Calculate the substraction of two vectors

Parameters
p_other

◆ operator-=()

OvMaths::FVector4 & OvMaths::FVector4::operator-= ( const FVector4 p_other)

Remove the right vector from the left one

Parameters
p_other

◆ operator/()

OvMaths::FVector4 OvMaths::FVector4::operator/ ( float  p_scalar) const

Return the division of scalar and actual vector

Parameters
p_scalar

◆ operator/=()

OvMaths::FVector4 & OvMaths::FVector4::operator/= ( float  p_scalar)

Divide scalar to the actual vector

Parameters
p_scalar

◆ operator=()

OvMaths::FVector4 OvMaths::FVector4::operator= ( const FVector4 p_other)

Copy assignment

Parameters
p_other

◆ operator==()

bool OvMaths::FVector4::operator== ( const FVector4 p_other)

Return true if the two vectors are equals

Parameters
p_other

◆ Substract()

OvMaths::FVector4 OvMaths::FVector4::Substract ( const FVector4 p_left,
const FVector4 p_right 
)
static

Calculate the substraction of two vectors

Parameters
p_left(First vector)
p_right(Second vector)

Member Data Documentation

◆ One

const OvMaths::FVector4 OvMaths::FVector4::One
static

@project: Overload

Author
: Overload Tech. @restrictions: This software may not be resold, redistributed or otherwise conveyed to a third party.

◆ w

float OvMaths::FVector4::w

◆ x

float OvMaths::FVector4::x

◆ y

float OvMaths::FVector4::y

◆ z

float OvMaths::FVector4::z

◆ Zero

const OvMaths::FVector4 OvMaths::FVector4::Zero
static

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