Euphoria
Classes | Namespaces | Functions | Variables
vec3.h File Reference
#include <tuple>
#include "assert/assert.h"
#include "base/numeric.h"

Go to the source code of this file.

Classes

struct  eu::v3
 a 3d vector More...
 
struct  eu::n3
 a 3d unit (vector) More...
 

Namespaces

namespace  eu
 
namespace  eu::kk
 

Functions

v3 eu::operator+ (const v3 &lhs, const v3 &rhs)
 
v3 eu::operator- (const v3 &lhs, const v3 &rhs)
 
v3 eu::operator* (float lhs, const v3 &rhs)
 
v3 eu::operator* (const v3 &lhs, float rhs)
 
v3 eu::operator/ (const v3 &lhs, float rhs)
 
v3 eu::operator/ (float lhs, const v3 &rhs)
 
v3 eu::lerp_v3 (const v3 &f, float v, const v3 &t)
 
std::string eu::string_from (const v3 &v)
 convert a 3d vector to string, prefer fmt
 
std::string eu::string_from (const n3 &v)
 converts a 3d unit vector to string, prefer fmt
 
constexpr v3 eu::min (const v3 &lhs, const v3 &rhs)
 component wise min value
 
constexpr v3 eu::max (const v3 &lhs, const v3 &rhs)
 component wise max value
 

Variables

constexpr v3 eu::zero3f = v3{0.0f, 0.0f, 0.0f}
 
constexpr n3 eu::kk::x_axis = n3{1.0f, 0.0f, 0.0f}
 
constexpr n3 eu::kk::y_axis = n3{0.0f, 1.0f, 0.0f}
 
constexpr n3 eu::kk::z_axis = n3{0.0f, 0.0f, 1.0f}
 
constexpr n3 eu::kk::up = y_axis
 
constexpr n3 eu::kk::down = -y_axis
 
constexpr n3 eu::kk::right = x_axis
 
constexpr n3 eu::kk::left = -x_axis
 
constexpr n3 eu::kk::in = -z_axis
 
constexpr n3 eu::kk::out = z_axis