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

Irregular (Voronoi) tilings. More...

#include "hyper.h"

Classes

struct  hr::irr::cellinfo
 
struct  hr::irr::heptinfo
 

Namespaces

 hr
 

Functions

ld hr::irr::inner (hyperpoint h1, hyperpoint h2)
 
hyperpoint hr::irr::circumscribe (hyperpoint a, hyperpoint b, hyperpoint c)
 
bool hr::irr::clockwise (hyperpoint h1, hyperpoint h2)
 
void hr::irr::make_cells_of_heptagon ()
 
void hr::irr::set_relmatrices (cellinfo &ci)
 
void hr::irr::rebase (cellinfo &ci)
 
void hr::irr::compute_jpoints ()
 
void hr::irr::bitruncate ()
 
int hr::irr::rearrange (bool total, ld minedge)
 
bool hr::irr::step (int delta)
 
EX void hr::irr::compute_geometry ()
 
bool hr::irr::draw_cell_schematics (cell *c, transmatrix V)
 
EX void hr::irr::link_to_base (heptagon *h, heptspin base)
 
EX void hr::irr::clear_links (heptagon *h)
 
EX void hr::irr::link_start (heptagon *h)
 
EX void hr::irr::link_next (heptagon *parent, int d)
 
EX void hr::irr::may_link_next (heptagon *parent, int d)
 
EX void hr::irr::link_cell (cell *c, int d)
 
int hr::irr::hdist (heptagon *h1, heptagon *h2)
 
void hr::irr::compute_horocycle (heptagon *)
 
void hr::irr::compute_distances (heptagon *h, bool alts)
 
void hr::irr::erase_alt (heptagon *alt)
 
EX int hr::irr::celldist (cell *c, bool alts)
 
void hr::irr::start_game_on_created_map ()
 
bool hr::irr::save_map (const string &fname)
 
bool hr::irr::load_map (const string &fname)
 
void hr::irr::cancel_map_creation ()
 
bool hr::irr::too_small_euclidean ()
 
void hr::irr::show_gridmaker ()
 
EX void hr::irr::visual_creator ()
 
EX void hr::irr::auto_creator ()
 
int hr::irr::readArgs ()
 
EX unsigned char hr::irr::density_code ()
 
EX bool hr::irr::pseudohept (cell *c)
 
EX bool hr::irr::ctof (cell *c)
 
EX bool hr::irr::supports (eGeometry g)
 
EX array< heptagon *, 3 > hr::irr::get_masters (cell *c)
 

Variables

EX int hr::irr::irrid
 
EX ld hr::irr::density = 2
 
EX ld hr::irr::quality = .2
 
EX int hr::irr::place_attempts = 10
 
EX int hr::irr::rearrange_max_attempts = 50
 
EX int hr::irr::rearrange_less = 10
 
EX int hr::irr::cellcount
 
EX map< cell *, int > hr::irr::cellindex
 
EX vector< cellinfo > hr::irr::cells
 
EX map< heptagon *, vector< int > > hr::irr::cells_of_heptagon
 
int hr::irr::runlevel
 
vector< ld > hr::irr::edgelens
 
vector< ld > hr::irr::distlens
 
string hr::irr::status [5]
 
EX hrmap * hr::irr::base
 
EX euc::torus_config_full hr::irr::base_config
 
bool hr::irr::gridmaking
 
int hr::irr::rearrange_index
 
bool hr::irr::cell_sorting
 
EX int hr::irr::bitruncations_requested = 1
 
EX int hr::irr::bitruncations_performed = 0
 
int hr::irr::black_adjacent
 
int hr::irr::white_three
 
EX map< heptagon *, heptinfo > hr::irr::periodmap
 
map< heptagon *, heptagon * > hr::irr::last_on_horocycle
 
eGeometry hr::irr::orig_geometry
 
string hr::irr::irrmapfile = "irregularmap.txt"
 
string hr::irr::irrhelp
 
auto hr::irr::hook
 

Detailed Description

Irregular (Voronoi) tilings.

Variable Documentation

◆ irrhelp

string hr::irr::irrhelp
Initial value:
=
"This option creates irregular grids to play the game on. "
"Currently rather slow algorithms are used, "
"so not recommended with too high density or "
"with too large periodic base geometry. "
"For technical reasons, the density cannot be too small."

◆ hook

auto hr::irr::hook
Initial value:
=
addHook(hooks_args, 100, readArgs) +
addHook(hooks_swapdim, 100, [] {
for(auto& c: cells) {
swapmatrix(c.p);
swapmatrix(c.pusher);
swapmatrix(c.rpusher);
for(auto& jp: c.jpoints) swapmatrix(jp);
for(auto& rm: c.relmatrices) swapmatrix(rm.second);
for(auto& v: c.vertices) swapmatrix(v);
}
}) +
addHook(hooks_drawcell, 100, draw_cell_schematics) +
addHook(shmup::hooks_turn, 100, step)