mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-04 14:30:35 +00:00
geometry_information:: edgelen available
This commit is contained in:
parent
c16686404d
commit
9076056fc4
@ -167,6 +167,9 @@ struct geometry_information {
|
|||||||
/** distance from heptagon center to heptagon vertex (either hexf or hcrossf) */
|
/** distance from heptagon center to heptagon vertex (either hexf or hcrossf) */
|
||||||
ld rhexf;
|
ld rhexf;
|
||||||
|
|
||||||
|
/** edge length */
|
||||||
|
ld edgelen;
|
||||||
|
|
||||||
/** basic parameters for 3D geometries */
|
/** basic parameters for 3D geometries */
|
||||||
map<int, int> close_distances;
|
map<int, int> close_distances;
|
||||||
|
|
||||||
@ -635,6 +638,7 @@ void geometry_information::prepare_basics() {
|
|||||||
hexf = fmin;
|
hexf = fmin;
|
||||||
|
|
||||||
rhexf = BITRUNCATED ? hexf : hcrossf;
|
rhexf = BITRUNCATED ? hexf : hcrossf;
|
||||||
|
edgelen = hdist(xpush0(rhexf), xspinpush0(M_PI*2/S7, rhexf));
|
||||||
|
|
||||||
if(BITRUNCATED && !(S7&1))
|
if(BITRUNCATED && !(S7&1))
|
||||||
hexshift = ALPHA/2 + ALPHA * ((S7-1)/2) + M_PI;
|
hexshift = ALPHA/2 + ALPHA * ((S7-1)/2) + M_PI;
|
||||||
@ -679,6 +683,7 @@ void geometry_information::prepare_basics() {
|
|||||||
crossf = hcrossf7 * ac.scale();
|
crossf = hcrossf7 * ac.scale();
|
||||||
hexvdist = ac.scale() * .5;
|
hexvdist = ac.scale() * .5;
|
||||||
rhexf = ac.scale() * .5;
|
rhexf = ac.scale() * .5;
|
||||||
|
edgelen = ac.edgelength;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if CAP_BT
|
#if CAP_BT
|
||||||
|
Loading…
Reference in New Issue
Block a user