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

#include <FVector3.h>

Public Member Functions

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

Static Public Member Functions

static FVector3 Add (const FVector3 &p_left, const FVector3 &p_right)
 
static FVector3 Substract (const FVector3 &p_left, const FVector3 &p_right)
 
static FVector3 Multiply (const FVector3 &p_target, float p_scalar)
 
static FVector3 Divide (const FVector3 &p_left, float p_scalar)
 
static float Length (const FVector3 &p_target)
 
static float Dot (const FVector3 &p_left, const FVector3 &p_right)
 
static float Distance (const FVector3 &p_left, const FVector3 &p_right)
 
static FVector3 Cross (const FVector3 &p_left, const FVector3 &p_right)
 
static FVector3 Normalize (const FVector3 &p_target)
 
static FVector3 Lerp (const FVector3 &p_start, const FVector3 &p_end, float p_alpha)
 
static float AngleBetween (const FVector3 &p_from, const FVector3 &p_to)
 

Public Attributes

float x
 
float y
 
float z
 

Static Public Attributes

static const FVector3 One
 
static const FVector3 Zero
 
static const FVector3 Forward
 
static const FVector3 Right
 
static const FVector3 Up
 

Detailed Description

Mathematic representation of a 3D vector of floats

Constructor & Destructor Documentation

◆ FVector3() [1/3]

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

Default constructor

Parameters
p_x
p_y
p_z

◆ FVector3() [2/3]

OvMaths::FVector3::FVector3 ( const FVector3 p_toCopy)

Copy constructor

Parameters
p_toCopy

◆ FVector3() [3/3]

OvMaths::FVector3::FVector3 ( FVector3 &&  p_toMove)
defaultnoexcept

Move constructor

Parameters
p_toMove

Member Function Documentation

◆ Add()

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

Calculate the sum of two vectors

Parameters
p_left(First vector)
p_right(Second vector)

◆ AngleBetween()

float OvMaths::FVector3::AngleBetween ( const FVector3 p_from,
const FVector3 p_to 
)
static

Calculate the angle between two vectors

Parameters
p_from
p_to

◆ Cross()

OvMaths::FVector3 OvMaths::FVector3::Cross ( const FVector3 p_left,
const FVector3 p_right 
)
static

Return the cross product of two vectors

Parameters
p_left
p_right

◆ Distance()

float OvMaths::FVector3::Distance ( const FVector3 p_left,
const FVector3 p_right 
)
static

Return the distance between two vectors

Parameters
p_left
p_right

◆ Divide()

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

Divide scalar to vector left

Parameters
p_left
p_scalar

◆ Dot()

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

Return the dot product of two vectors

Parameters
p_left
p_right

◆ Length()

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

Return the length of a vector

Parameters
p_target

◆ Lerp()

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

Calculate the interpolation between two vectors

Parameters
p_start
p_end
p_alpha

◆ Multiply()

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

Calculate the multiplication of a vector with a scalar

Parameters
p_target
p_scalar

◆ Normalize()

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

Return the normalize of the given vector

Parameters
p_target

◆ operator!=()

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

Return true if the two vectors are different

Parameters
p_other

◆ operator*()

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

Calcualte the multiplication of a vector with a scalar

Parameters
p_scalar

◆ operator*=()

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

Multiply the vector by a scalar

Parameters
p_scalar

◆ operator+()

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

Calculate the sum of two vectors

Parameters
p_other

◆ operator+=()

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

Add the right vector to the left one

Parameters
p_other

◆ operator-() [1/2]

OvMaths::FVector3 OvMaths::FVector3::operator- ( ) const

Negation

◆ operator-() [2/2]

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

Calculate the substraction of two vectors

Parameters
p_other

◆ operator-=()

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

Remove the right vector from the left one

Parameters
p_other

◆ operator/()

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

Return the division of scalar and actual vector

Parameters
p_scalar

◆ operator/=()

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

Divide scalar to the actual vector

Parameters
p_scalar

◆ operator=()

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

Copy assignment

Parameters
p_other

◆ operator==()

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

Return true if the two vectors are equals

Parameters
p_other

◆ Substract()

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

Calculate the substraction of two vectors

Parameters
p_left(First vector)
p_right(Second vector)

Member Data Documentation

◆ Forward

const OvMaths::FVector3 OvMaths::FVector3::Forward
static

◆ One

const OvMaths::FVector3 OvMaths::FVector3::One
static

@project: Overload

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

◆ Right

const OvMaths::FVector3 OvMaths::FVector3::Right
static

◆ Up

const OvMaths::FVector3 OvMaths::FVector3::Up
static

◆ x

float OvMaths::FVector3::x

◆ y

float OvMaths::FVector3::y

◆ z

float OvMaths::FVector3::z

◆ Zero

const OvMaths::FVector3 OvMaths::FVector3::Zero
static

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