Euphoria
eu::vec3f Struct Reference

#include <vec3.h>

Inheritance diagram for eu::vec3f:
eu::unit3f

Public Member Functions

 vec3f (float a)
 
 vec3f (const std::tuple< float, float, float > &a)
 
constexpr vec3f (float ax, float ay, float az)
 
 vec3f (const float *a)
 
 vec3f (const vec2f &a, float az)
 
float dot (const vec3f &rhs) const
 
vec3f cross (const vec3f &u) const
 
void operator+= (const vec3f &rhs)
 
void operator-= (const vec3f &rhs)
 
void operator/= (float rhs)
 
void operator*= (float rhs)
 
vec3f operator- () const
 
float * get_data_ptr ()
 
const float * get_data_ptr () const
 
constexpr float get_length_squared () const
 
float get_length () const
 
void normalize ()
 
unit3f get_normalized () const
 
unit3f as_normalized () const
 
bool operator== (const vec3f &rhs)=delete
 

Static Public Member Functions

static vec3f from_to (const vec3f &from, const vec3f &to)
 

Public Attributes

float x
 
float y
 
float z
 

Detailed Description

Definition at line 47 of file vec3.h.

Constructor & Destructor Documentation

◆ vec3f() [1/5]

eu::vec3f::vec3f ( float  a)
explicit

Definition at line 69 of file vec3.cc.

◆ vec3f() [2/5]

eu::vec3f::vec3f ( const std::tuple< float, float, float > &  a)
explicit

Definition at line 77 of file vec3.cc.

◆ vec3f() [3/5]

constexpr eu::vec3f::vec3f ( float  ax,
float  ay,
float  az 
)
inlineconstexpr

Definition at line 55 of file vec3.h.

◆ vec3f() [4/5]

eu::vec3f::vec3f ( const float *  a)
explicit

Definition at line 85 of file vec3.cc.

◆ vec3f() [5/5]

eu::vec3f::vec3f ( const vec2f a,
float  az 
)

Definition at line 93 of file vec3.cc.

Member Function Documentation

◆ as_normalized()

unit3f eu::vec3f::as_normalized ( ) const

Definition at line 182 of file vec3.cc.

◆ cross()

vec3f eu::vec3f::cross ( const vec3f u) const

Definition at line 283 of file vec3.cc.

◆ dot()

float eu::vec3f::dot ( const vec3f rhs) const

Definition at line 276 of file vec3.cc.

◆ from_to()

vec3f eu::vec3f::from_to ( const vec3f from,
const vec3f to 
)
static

Definition at line 127 of file vec3.cc.

◆ get_data_ptr() [1/2]

float * eu::vec3f::get_data_ptr ( )

Definition at line 56 of file vec3.cc.

◆ get_data_ptr() [2/2]

const float * eu::vec3f::get_data_ptr ( ) const

Definition at line 63 of file vec3.cc.

◆ get_length()

float eu::vec3f::get_length ( ) const

Definition at line 152 of file vec3.cc.

◆ get_length_squared()

constexpr float eu::vec3f::get_length_squared ( ) const
inlineconstexpr

Definition at line 79 of file vec3.h.

◆ get_normalized()

unit3f eu::vec3f::get_normalized ( ) const

Definition at line 174 of file vec3.cc.

◆ normalize()

void eu::vec3f::normalize ( )

Definition at line 159 of file vec3.cc.

◆ operator*=()

void eu::vec3f::operator*= ( float  rhs)

Definition at line 143 of file vec3.cc.

◆ operator+=()

void eu::vec3f::operator+= ( const vec3f rhs)

Definition at line 102 of file vec3.cc.

◆ operator-()

vec3f eu::vec3f::operator- ( ) const

Definition at line 120 of file vec3.cc.

◆ operator-=()

void eu::vec3f::operator-= ( const vec3f rhs)

Definition at line 111 of file vec3.cc.

◆ operator/=()

void eu::vec3f::operator/= ( float  rhs)

Definition at line 134 of file vec3.cc.

◆ operator==()

bool eu::vec3f::operator== ( const vec3f rhs)
delete

Member Data Documentation

◆ x

float eu::vec3f::x

Definition at line 49 of file vec3.h.

◆ y

float eu::vec3f::y

Definition at line 50 of file vec3.h.

◆ z

float eu::vec3f::z

Definition at line 51 of file vec3.h.


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