fake:: ray_iadj

This commit is contained in:
Zeno Rogue 2021-07-13 18:10:19 +02:00
parent 5de7eb2bb2
commit 6aae43f1f8
1 changed files with 8 additions and 0 deletions

View File

@ -324,6 +324,14 @@ EX namespace fake {
return *FPIU( (cgip = pcgip, &(currentmap->get_cellshape(c))) );
}
transmatrix ray_iadj(cell *c, int i) override {
if(PURE) return iadj(c, i);
auto& v = get_cellshape(c).faces_local[i];
hyperpoint h =
project_on_triangle(v[0], v[1], v[2]);
transmatrix T = rspintox(h);
return T * xpush(-2*hdist0(h)) * spintox(h);
}
};
EX hrmap* new_map() { return new hrmap_fake; }