mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-01 13:00:57 +00:00
ray:: works with complex subcube-based honeycombs
This commit is contained in:
parent
4590271450
commit
bc5ecf35e0
@ -1017,6 +1017,13 @@ EX namespace hybrid {
|
|||||||
#if MAXMDIM >= 4
|
#if MAXMDIM >= 4
|
||||||
if(rotspace) return rots::ray_iadj(c, i);
|
if(rotspace) return rots::ray_iadj(c, i);
|
||||||
#endif
|
#endif
|
||||||
|
if(is_subcube_based(variation)) {
|
||||||
|
auto& v = reg3::get_face_vertices(c, i);
|
||||||
|
hyperpoint h =
|
||||||
|
project_on_triangle(v[0], v[1], v[2]);
|
||||||
|
transmatrix T = rspintox(h);
|
||||||
|
return T * xpush(-2*hdist0(h)) * spintox(h);
|
||||||
|
}
|
||||||
return currentmap->iadj(c, i);
|
return currentmap->iadj(c, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -647,7 +647,7 @@ void enable_raycaster() {
|
|||||||
fmain +=
|
fmain +=
|
||||||
" if(which == -1) {\n";
|
" if(which == -1) {\n";
|
||||||
|
|
||||||
fmain += "for(int i="+its(flat1)+"; i<"+(prod ? "sides-2" : WDIM == 2 ? "sides" : its(flat2))+"; i++) {\n";
|
fmain += "for(int i="+its(flat1)+"; i<"+(prod ? "sides-2" : (WDIM == 2 || is_subcube_based(variation)) ? "sides" : its(flat2))+"; i++) {\n";
|
||||||
|
|
||||||
// fmain += "int woi = walloffset+i;\n";
|
// fmain += "int woi = walloffset+i;\n";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user