mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
euclid3::set_torus added
This commit is contained in:
parent
ed7b1c0651
commit
cca689641a
14
euclid.cpp
14
euclid.cpp
@ -596,8 +596,8 @@ EX namespace euclid3 {
|
|||||||
coord canonicalize(coord x);
|
coord canonicalize(coord x);
|
||||||
EX void build_torus3();
|
EX void build_torus3();
|
||||||
coord twist(coord x, transmatrix& M);
|
coord twist(coord x, transmatrix& M);
|
||||||
extern int twisted;
|
EX int twisted;
|
||||||
extern intmatrix T0;
|
intmatrix T0;
|
||||||
|
|
||||||
struct hrmap_euclid3 : hrmap {
|
struct hrmap_euclid3 : hrmap {
|
||||||
vector<coord> shifttable;
|
vector<coord> shifttable;
|
||||||
@ -908,15 +908,21 @@ EX namespace euclid3 {
|
|||||||
axes optimal_axes;
|
axes optimal_axes;
|
||||||
axes regular_axes;
|
axes regular_axes;
|
||||||
|
|
||||||
intmatrix T, T2, T0, T_edit;
|
intmatrix T, T2, T_edit;
|
||||||
int det;
|
int det;
|
||||||
int coords;
|
int coords;
|
||||||
int twisted, twisted0, twisted_edit;
|
int twisted0, twisted_edit;
|
||||||
|
|
||||||
EX void clear_torus3() {
|
EX void clear_torus3() {
|
||||||
for(int i=0; i<3; i++) user_axes[i] = 0;
|
for(int i=0; i<3; i++) user_axes[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX void set_torus3(int x, int y, int z) {
|
||||||
|
for(int i=0; i<3; i++) for(int j=0; j<3; j++) T0[i][j] = 0;
|
||||||
|
tie(T0[0][0], T0[1][1], T0[2][2]) = make_tuple(x, y, z);
|
||||||
|
build_torus3();
|
||||||
|
}
|
||||||
|
|
||||||
unordered_map<coord, int> canonical_hash;
|
unordered_map<coord, int> canonical_hash;
|
||||||
vector<coord> canonical_seq;
|
vector<coord> canonical_seq;
|
||||||
int canonical_index;
|
int canonical_index;
|
||||||
|
Loading…
Reference in New Issue
Block a user