HyperRogue  11.3d
game/visualization engine based on non-Euclidean geometry
Classes | Namespaces | Typedefs | Functions | Variables
euclid.cpp File Reference

Euclidean geometry, including 2D, 3D, and quotient spaces. More...

#include "hyper.h"

Classes

struct  hr::euc::coord
 
struct  hr::euc::torus_config
 
struct  hr::euc::torus_config_full
 
struct  hr::euc::hrmap_euclidean
 

Namespaces

 hr
 

Typedefs

typedef array< coord, 3 > hr::euc::intmatrix
 

Functions

EX vector< coord > hr::euc::get_shifttable ()
 
EX coord hr::euc::basic_canonicalize (coord x)
 
hrmap_euclidean * hr::euc::cubemap ()
 
hrmap_euclidean * hr::euc::eucmap ()
 
EX vector< coord > & hr::euc::get_current_shifttable ()
 
EX map< coord, heptagon * > & hr::euc::get_spacemap ()
 
EX map< heptagon *, coord > & hr::euc::get_ispacemap ()
 
EX cell *& hr::euc::get_camelot_center ()
 
EX hrmap * hr::euc::new_map ()
 
EX transmatrix hr::euc::move_matrix (heptagon *h, int i)
 
EX bool hr::euc::pseudohept (cell *c)
 
EX int hr::euc::dist_alt (cell *c)
 
EX bool hr::euc::get_emerald (cell *c)
 
bool hr::euc::cellvalid (coord v)
 
EX int hr::euc::celldistance (coord v)
 
EX int hr::euc::celldistance (cell *c1, cell *c2)
 
EX void hr::euc::set_land (cell *c)
 
EX int hr::euc::dist_relative (cell *c)
 
int hr::euc::determinant (const intmatrix T)
 
intmatrix hr::euc::scaled_inverse (const intmatrix T)
 
EX torus_config hr::euc::torus3 (int x, int y, int z)
 
EX torus_config hr::euc::clear_torus3 ()
 
EX bool hr::euc::valid_third_turn (const intmatrix &m)
 
EX torus_config hr::euc::make_third_turn (int a, int b, int c)
 
EX torus_config hr::euc::make_quarter_turn (int a, int b, int c)
 
EX bool hr::euc::valid_irr_torus ()
 
EX void hr::euc::build_torus3 (eGeometry g)
 
EX void hr::euc::build_torus3 ()
 
void hr::euc::swap01 (transmatrix &M)
 
gp::loc hr::euc::ort1 ()
 
int hr::euc::diagonal_cross (const coord &a, const coord &b)
 
EX void hr::euc::prepare_torus3 ()
 
EX void hr::euc::show_fundamental ()
 
intmatrix hr::euc::on_periods (gp::loc a, gp::loc b)
 
torus_config hr::euc::single_row_torus (int qty, int dy)
 
torus_config hr::euc::regular_torus (gp::loc p)
 
EX torus_config hr::euc::rectangular_torus (int x, int y, bool klein)
 
void hr::euc::torus_config_option (string name, char key, torus_config tc)
 
EX void hr::euc::show_torus3 ()
 
int hr::euc::euArgs ()
 
EX int hr::euc::dscalar (gp::loc e1, gp::loc e2)
 
EX int hr::euc::dsquare (gp::loc e)
 
EX int hr::euc::dcross (gp::loc e1, gp::loc e2)
 
EX gp::loc hr::euc::full_coords2 (cell *c)
 
EX cell * hr::euc::at (gp::loc p)
 
EX coord hr::euc::to_coord (gp::loc p)
 
EX gp::loc hr::euc::sdxy ()
 
EX pair< bool, string > hr::euc::coord_display (const transmatrix &V, cell *c)
 
EX gp::loc hr::euc::to_loc (const coord &v)
 
EX map< gp::loc, cdata > & hr::euc::get_cdata ()
 
EX transmatrix hr::euc::eumove (coord co)
 
EX transmatrix hr::euc::eumove (gp::loc co)
 
EX bool hr::euc::chiral (gp::loc g)
 
EX void hr::euc::twist_once (gp::loc coo)
 
EX int hr::euc::dist (int sx, int sy, bool reduce IS(true))
 
EX int hr::euc::dist (gp::loc a, gp::loc b)
 
EX int hr::euc::cyldist (gp::loc a, gp::loc b)
 
EX bool hr::euc::in ()
 
EX bool hr::euc::in (int dim)
 
EX bool hr::euc::in (int dim, int s7)
 
EX gp::loc hr::euc2_coordinates (cell *c)
 

Variables

const EX coord hr::euc::euzero = coord(0,0,0)
 
const EX coord hr::euc::eutester = coord(3,7,0)
 
EX intmatrix hr::euc::euzeroall = make_array<coord>(euzero, euzero, euzero)
 
EX torus_config hr::euc::eu_input
 
EX torus_config hr::euc::eu_edit
 
EX torus_config_full hr::euc::eu
 
auto hr::euc::euhook = addHook(hooks_args, 100, euArgs)
 

Detailed Description

Euclidean geometry, including 2D, 3D, and quotient spaces.

Function Documentation

◆ at()

EX cell* hr::euc::at ( gp::loc  p)

this is slow, but we use it only for small p's