adjusted RogueViz Kohonen to 3D

This commit is contained in:
Zeno Rogue 2019-04-03 20:35:12 +02:00
parent 4c5a9091c2
commit b05eb3754f
2 changed files with 13 additions and 3 deletions

View File

@ -411,7 +411,7 @@ void buildcellcrawler(cell *c, cellcrawler& cr, int dir) {
map<int, cellcrawler> scc;
pair<int, int> get_cellcrawler_id(cell *c) {
if(among(geometry, gZebraQuotient, gMinimal) || (euwrap && !fulltorus) || IRREGULAR) {
if(among(geometry, gZebraQuotient, gMinimal, gField435, gField534) || (euwrap && !fulltorus) || IRREGULAR || (DIM == 3 && sphere)) {
// Zebra Quotient does exhibit some symmetries,
// but these are so small anyway that it is safer to just build
// a crawler for every neuron
@ -714,7 +714,8 @@ void sominit(int initto, bool load_compressed) {
dispersion_count = 0;
scc.clear();
for(cell *c: currentmap->allcells()) {
for(int i=0; i<cells; i++) {
cell *c = net[i].where;
auto cid = get_cellcrawler_id(c);
if(!scc.count(cid.first)) {
printf("Building cellcrawler id = %x\n", cid.first);
@ -1345,6 +1346,9 @@ int readArgs() {
else if(argis("-somkrad")) {
gaussian = 0; uninit(0);
}
else if(argis("-somskrad")) {
shift(); krad = argi();
}
else if(argis("-somsim")) {
gaussian = 0; uninit(1);
}

View File

@ -1111,6 +1111,12 @@ void queuedisk(const transmatrix& V, const colorpair& cp, bool legend, const str
auto& sh = *(vshapes[vertex_shape]);
if(vertex_shape == 0) ;
else if(DIM == 3) {
V1 = face_the_player(V);
if(info) queueaction(PPR::MONSTER_HEAD, [info] () { svg::link = *info; });
queuepolyat(V1, sh, darken_a(cp.color1), PPR::MONSTER_HEAD);
if(info) queueaction(PPR::MONSTER_HEAD, [] () { svg::link = ""; });
}
else if(rog3) {
int p = poly_outline; poly_outline = OUTLINE_TRANS;
queuepolyat(V, sh, 0x80, PPR::MONSTER_SHADOW);
@ -1305,7 +1311,7 @@ bool drawVertex(const transmatrix &V, cell *c, shmup::monster *m) {
}
hyperpoint h = tC0(V * m->at);
transmatrix V2 = rgpushxto0(h) * ypush(PURE ? .3 : .2); // todo-variation
transmatrix V2 = DIM == 3 ? V : rgpushxto0(h) * ypush(PURE ? .3 : .2); // todo-variation
if(doshow && !behindsphere(V2)) {
auto info = vd.info;
if(info) queueaction(PPR::MONSTER_HEAD, [info] () { svg::link = *info; });