Vivid
Loading...
Searching...
No Matches
Vivid::Maths::Vec3 Struct Reference

Contains a 3D vector. More...

#include <Vec.h>

Public Member Functions

 Vec3 (float x)
 
 Vec3 (float x, float y, float z)
 
 Vec3 (const Vec3 &other)
 
Vec3 operator* (float scalar)
 
Vec3 operator+ (Vec3 other)
 
Vec3 operator- (Vec3 other)
 
void operator+= (Vec3 other)
 
void operator-= (Vec3 other)
 
glm::vec3 ToGLM ()
 

Public Attributes

float x
 
float y
 
float z
 

Detailed Description

Contains a 3D vector.

Vec3 is a struct that contains a 3D vector. It contains x, y, and z values. This can be used for many purposes like position, color, etc. And supports many operations like addition, multiplication, etc.

Definition at line 50 of file Vec.h.

Constructor & Destructor Documentation

◆ Vec3() [1/4]

Vivid::Maths::Vec3::Vec3 ( )
inline

Definition at line 54 of file Vec.h.

◆ Vec3() [2/4]

Vivid::Maths::Vec3::Vec3 ( float  x)
inline

Definition at line 61 of file Vec.h.

◆ Vec3() [3/4]

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

Definition at line 68 of file Vec.h.

◆ Vec3() [4/4]

Vivid::Maths::Vec3::Vec3 ( const Vec3 other)
inline

Definition at line 75 of file Vec.h.

Member Function Documentation

◆ operator*()

Vec3 Vivid::Maths::Vec3::operator* ( float  scalar)
inline

Definition at line 82 of file Vec.h.

◆ operator+()

Vec3 Vivid::Maths::Vec3::operator+ ( Vec3  other)
inline

Definition at line 83 of file Vec.h.

◆ operator+=()

void Vivid::Maths::Vec3::operator+= ( Vec3  other)
inline

Definition at line 85 of file Vec.h.

◆ operator-()

Vec3 Vivid::Maths::Vec3::operator- ( Vec3  other)
inline

Definition at line 84 of file Vec.h.

◆ operator-=()

void Vivid::Maths::Vec3::operator-= ( Vec3  other)
inline

Definition at line 91 of file Vec.h.

◆ ToGLM()

glm::vec3 Vivid::Maths::Vec3::ToGLM ( )
inline

Definition at line 98 of file Vec.h.

Member Data Documentation

◆ x

float Vivid::Maths::Vec3::x

Definition at line 52 of file Vec.h.

◆ y

float Vivid::Maths::Vec3::y

Definition at line 52 of file Vec.h.

◆ z

float Vivid::Maths::Vec3::z

Definition at line 52 of file Vec.h.


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