ray:: works with complex subcube-based honeycombs

This commit is contained in:
Zeno Rogue 2021-07-07 23:34:15 +02:00
parent 4590271450
commit bc5ecf35e0
2 changed files with 8 additions and 1 deletions

View File

@ -1017,6 +1017,13 @@ EX namespace hybrid {
#if MAXMDIM >= 4
if(rotspace) return rots::ray_iadj(c, i);
#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);
}

View File

@ -647,7 +647,7 @@ void enable_raycaster() {
fmain +=
" 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";