aether::geometry Namespace Reference

Classes

struct  hex_coord
 
struct  vec2f
 
struct  vec3f
 

Functions

Eigen::Vector3f vec3f_to_eigen (const vec3f &v)
 
vec3f vec3f_from_eigen (const Eigen::Vector3f &v)
 
net_quat net_encode_quaternion (const Eigen::Quaternionf &q)
 
Eigen::Quaternionf net_decode_quaternion (const net_quat &q)
 
std::vector< hex_coordhex_spiral (size_t radius)
 
Eigen::Vector2f hex_to_square (const hex_coord &h)
 
hex_coord square_to_hex (const Eigen::Vector2f &p)
 
vec2f vec2f_new (float x, float y)
 
std::ostream & operator<< (std::ostream &os, const vec3f &v)
 
vec3f vec3f_new (float x, float y, float z)
 
void vec2f_add_scaled (vec2f *y, float alpha, const vec2f *x)
 
void vec3f_add_scaled (vec3f *y, float alpha, const vec3f *x)
 
float dot (const vec2f &x, const vec2f &y)
 
float dot (const vec3f &x, const vec3f &y)
 
float sqr_magnitude (const vec2f &x)
 
float sqr_magnitude (const vec3f &x)
 
float norm2 (const vec2f &x)
 
float norm2 (const vec3f &x)
 
void normalize (vec2f &x)
 
void normalize (vec3f &x)
 
vec2f normalized (const vec2f &x)
 
vec3f normalized (const vec3f &x)
 
float distance (const vec2f &p0, const vec2f &p1)
 
float distance (const vec3f &p0, const vec3f &p1)
 
float closer_than (const vec2f &p0, const vec2f &p1, float dist)
 
float closer_than (const vec3f &p0, const vec3f &p1, float dist)
 

Variables

const std::vector< hex_coorddirections
 

Function Documentation

float aether::geometry::closer_than ( const vec2f p0,
const vec2f p1,
float  dist 
)
inline
float aether::geometry::closer_than ( const vec3f p0,
const vec3f p1,
float  dist 
)
inline
float aether::geometry::distance ( const vec2f p0,
const vec2f p1 
)
inline
float aether::geometry::distance ( const vec3f p0,
const vec3f p1 
)
inline
float aether::geometry::dot ( const vec2f x,
const vec2f y 
)
inline
float aether::geometry::dot ( const vec3f x,
const vec3f y 
)
inline
std::vector<hex_coord> aether::geometry::hex_spiral ( size_t  radius)
Eigen::Vector2f aether::geometry::hex_to_square ( const hex_coord h)
Eigen::Quaternionf aether::geometry::net_decode_quaternion ( const net_quat &  q)
inline
net_quat aether::geometry::net_encode_quaternion ( const Eigen::Quaternionf &  q)
inline
float aether::geometry::norm2 ( const vec2f x)
inline
float aether::geometry::norm2 ( const vec3f x)
inline
void aether::geometry::normalize ( vec2f x)
inline
void aether::geometry::normalize ( vec3f x)
inline
vec2f aether::geometry::normalized ( const vec2f x)
inline
vec3f aether::geometry::normalized ( const vec3f x)
inline
std::ostream& aether::geometry::operator<< ( std::ostream &  os,
const vec3f v 
)
inline
float aether::geometry::sqr_magnitude ( const vec2f x)
inline
float aether::geometry::sqr_magnitude ( const vec3f x)
inline
hex_coord aether::geometry::square_to_hex ( const Eigen::Vector2f &  p)
void aether::geometry::vec2f_add_scaled ( vec2f y,
float  alpha,
const vec2f x 
)
inline
vec2f aether::geometry::vec2f_new ( float  x,
float  y 
)
inline
void aether::geometry::vec3f_add_scaled ( vec3f y,
float  alpha,
const vec3f x 
)
inline
vec3f aether::geometry::vec3f_from_eigen ( const Eigen::Vector3f &  v)
inline
vec3f aether::geometry::vec3f_new ( float  x,
float  y,
float  z 
)
inline
Eigen::Vector3f aether::geometry::vec3f_to_eigen ( const vec3f v)
inline

Variable Documentation

const std::vector<hex_coord> aether::geometry::directions
Initial value:
= {
hex_coord(1, 0, -1),
hex_coord(1, -1, 0),
hex_coord(0, -1, 1),
hex_coord(-1, 0, 1),
hex_coord(-1, 1, 0),
hex_coord(0, 1, -1),
}