Public Member Functions | Public Attributes | List of all members
mcl_3dl::Vec3 Class Reference

#include <vec3.h>

Public Member Functions

constexpr Vec3 cross (const Vec3 &q) const
 
constexpr float dot (const Vec3 &q) const
 
float norm () const
 
Vec3 normalized () const
 
constexpr bool operator!= (const Vec3 &q) const
 
constexpr Vec3 operator* (const float s) const
 
Vec3operator*= (const float &s)
 
constexpr Vec3 operator+ (const Vec3 &q) const
 
Vec3operator+= (const Vec3 &q)
 
constexpr Vec3 operator- () const
 
constexpr Vec3 operator- (const Vec3 &q) const
 
Vec3operator-= (const Vec3 &q)
 
constexpr Vec3 operator/ (const float s) const
 
Vec3operator/= (const float &s)
 
constexpr bool operator== (const Vec3 &q) const
 
float & operator[] (const size_t i)
 
float operator[] (const size_t i) const
 
constexpr Vec3 times (const Vec3 &q) const
 
constexpr Vec3 ()
 
constexpr Vec3 (const float x, const float y, const float z)
 

Public Attributes

float x_
 
float y_
 
float z_
 

Detailed Description

Definition at line 37 of file vec3.h.

Constructor & Destructor Documentation

◆ Vec3() [1/2]

constexpr mcl_3dl::Vec3::Vec3 ( const float  x,
const float  y,
const float  z 
)
inlineconstexpr

Definition at line 43 of file vec3.h.

◆ Vec3() [2/2]

constexpr mcl_3dl::Vec3::Vec3 ( )
inlineconstexpr

Definition at line 49 of file vec3.h.

Member Function Documentation

◆ cross()

constexpr Vec3 mcl_3dl::Vec3::cross ( const Vec3 q) const
inlineconstexpr

Definition at line 143 of file vec3.h.

◆ dot()

constexpr float mcl_3dl::Vec3::dot ( const Vec3 q) const
inlineconstexpr

Definition at line 139 of file vec3.h.

◆ norm()

float mcl_3dl::Vec3::norm ( ) const
inline

Definition at line 153 of file vec3.h.

◆ normalized()

Vec3 mcl_3dl::Vec3::normalized ( ) const
inline

Definition at line 157 of file vec3.h.

◆ operator!=()

constexpr bool mcl_3dl::Vec3::operator!= ( const Vec3 q) const
inlineconstexpr

Definition at line 95 of file vec3.h.

◆ operator*()

constexpr Vec3 mcl_3dl::Vec3::operator* ( const float  s) const
inlineconstexpr

Definition at line 111 of file vec3.h.

◆ operator*=()

Vec3& mcl_3dl::Vec3::operator*= ( const float &  s)
inline

Definition at line 129 of file vec3.h.

◆ operator+()

constexpr Vec3 mcl_3dl::Vec3::operator+ ( const Vec3 q) const
inlineconstexpr

Definition at line 99 of file vec3.h.

◆ operator+=()

Vec3& mcl_3dl::Vec3::operator+= ( const Vec3 q)
inline

Definition at line 119 of file vec3.h.

◆ operator-() [1/2]

constexpr Vec3 mcl_3dl::Vec3::operator- ( ) const
inlineconstexpr

Definition at line 107 of file vec3.h.

◆ operator-() [2/2]

constexpr Vec3 mcl_3dl::Vec3::operator- ( const Vec3 q) const
inlineconstexpr

Definition at line 103 of file vec3.h.

◆ operator-=()

Vec3& mcl_3dl::Vec3::operator-= ( const Vec3 q)
inline

Definition at line 124 of file vec3.h.

◆ operator/()

constexpr Vec3 mcl_3dl::Vec3::operator/ ( const float  s) const
inlineconstexpr

Definition at line 115 of file vec3.h.

◆ operator/=()

Vec3& mcl_3dl::Vec3::operator/= ( const float &  s)
inline

Definition at line 134 of file vec3.h.

◆ operator==()

constexpr bool mcl_3dl::Vec3::operator== ( const Vec3 q) const
inlineconstexpr

Definition at line 91 of file vec3.h.

◆ operator[]() [1/2]

float& mcl_3dl::Vec3::operator[] ( const size_t  i)
inline

Definition at line 55 of file vec3.h.

◆ operator[]() [2/2]

float mcl_3dl::Vec3::operator[] ( const size_t  i) const
inline

Definition at line 73 of file vec3.h.

◆ times()

constexpr Vec3 mcl_3dl::Vec3::times ( const Vec3 q) const
inlineconstexpr

Definition at line 149 of file vec3.h.

Member Data Documentation

◆ x_

float mcl_3dl::Vec3::x_

Definition at line 40 of file vec3.h.

◆ y_

float mcl_3dl::Vec3::y_

Definition at line 41 of file vec3.h.

◆ z_

float mcl_3dl::Vec3::z_

Definition at line 42 of file vec3.h.


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


mcl_3dl
Author(s): Atsushi Watanabe
autogenerated on Thu Oct 17 2024 02:18:04