scop
a small 3D object loader
Loading...
Searching...
No Matches
vec3 Class Reference

#include <Math.hpp>

Collaboration diagram for vec3:

Public Member Functions

 vec3 ()
 
 vec3 (float _x, float _y, float _z)
 
 vec3 (float value)
 
vec3 operator- () const
 
vec3 operator+ (const vec3 &other) const
 
vec3 operator- (const vec3 &other) const
 
vec3 operator* (float scalar) const
 
vec3 operator/ (float scalar) const
 
vec3operator/= (float scalar)
 
vec3operator+= (const vec3 &other)
 
vec3operator-= (const vec3 &other)
 
float & operator[] (int index)
 
const float & operator[] (int index) const
 
float dot (const vec3 &other) const
 
vec3 cross (const vec3 &other) const
 
float length () const
 
vec3 normalize () const
 

Public Attributes

float x
 
float y
 
float z
 

Friends

vec3 operator* (float scalar, const vec3 &v)
 

Detailed Description

Definition at line 65 of file Math.hpp.

Constructor & Destructor Documentation

◆ vec3() [1/3]

vec3::vec3 ( )
inline

Definition at line 70 of file Math.hpp.

Here is the caller graph for this function:

◆ vec3() [2/3]

vec3::vec3 ( float _x,
float _y,
float _z )
inline

Definition at line 71 of file Math.hpp.

◆ vec3() [3/3]

vec3::vec3 ( float value)
inline

Definition at line 72 of file Math.hpp.

Member Function Documentation

◆ cross()

vec3 vec3::cross ( const vec3 & other) const
inline

Definition at line 153 of file Math.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dot()

float vec3::dot ( const vec3 & other) const
inline

Definition at line 148 of file Math.hpp.

Here is the caller graph for this function:

◆ length()

float vec3::length ( ) const
inline

Definition at line 158 of file Math.hpp.

Here is the caller graph for this function:

◆ normalize()

vec3 vec3::normalize ( ) const
inline

Definition at line 163 of file Math.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator*()

vec3 vec3::operator* ( float scalar) const
inline

Definition at line 88 of file Math.hpp.

Here is the call graph for this function:

◆ operator+()

vec3 vec3::operator+ ( const vec3 & other) const
inline

Definition at line 80 of file Math.hpp.

Here is the call graph for this function:

◆ operator+=()

vec3 & vec3::operator+= ( const vec3 & other)
inline

Definition at line 110 of file Math.hpp.

◆ operator-() [1/2]

vec3 vec3::operator- ( ) const
inline

Definition at line 75 of file Math.hpp.

Here is the call graph for this function:

◆ operator-() [2/2]

vec3 vec3::operator- ( const vec3 & other) const
inline

Definition at line 84 of file Math.hpp.

Here is the call graph for this function:

◆ operator-=()

vec3 & vec3::operator-= ( const vec3 & other)
inline

Definition at line 117 of file Math.hpp.

◆ operator/()

vec3 vec3::operator/ ( float scalar) const
inline

Definition at line 92 of file Math.hpp.

Here is the call graph for this function:

◆ operator/=()

vec3 & vec3::operator/= ( float scalar)
inline

Definition at line 97 of file Math.hpp.

◆ operator[]() [1/2]

float & vec3::operator[] ( int index)
inline

Definition at line 125 of file Math.hpp.

◆ operator[]() [2/2]

const float & vec3::operator[] ( int index) const
inline

Definition at line 136 of file Math.hpp.

Friends And Related Symbol Documentation

◆ operator*

vec3 operator* ( float scalar,
const vec3 & v )
friend

Definition at line 106 of file Math.hpp.

Member Data Documentation

◆ x

float vec3::x

Definition at line 67 of file Math.hpp.

◆ y

float vec3::y

Definition at line 67 of file Math.hpp.

◆ z

float vec3::z

Definition at line 67 of file Math.hpp.


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