2d3d:: no more matrix/unmappable warnings

This commit is contained in:
Zeno Rogue 2019-05-11 15:13:55 +02:00
parent 73f53b93a8
commit 00b601b1de
2 changed files with 5 additions and 2 deletions

View File

@ -184,7 +184,7 @@ void bshape2(hpcshape& sh, PPR prio, int shapeid, matrixlist& m) {
int mapped = 0; int mapped = 0;
for(auto& m: matrices) { for(auto& m: matrices) {
hyperpoint z = m.first * h; hyperpoint z = m.first * h;
if(z[0] > -1e-5 && z[1] > -1e-5 && z[2] > -1e-5) { if(z[0] > -1e-5 && z[1] > -1e-5 && z[GDIM] > -1e-5) {
nh = m.second[r] * z, mapped++; nh = m.second[r] * z, mapped++;
} }
} }

View File

@ -427,11 +427,14 @@ void set_column(transmatrix& T, int i, const hyperpoint& H) {
} }
transmatrix build_matrix(hyperpoint h1, hyperpoint h2, hyperpoint h3) { transmatrix build_matrix(hyperpoint h1, hyperpoint h2, hyperpoint h3) {
transmatrix T = Id; transmatrix T;
for(int i=0; i<MDIM; i++) for(int i=0; i<MDIM; i++)
T[i][0] = h1[i], T[i][0] = h1[i],
T[i][1] = h2[i], T[i][1] = h2[i],
T[i][2] = h3[i]; T[i][2] = h3[i];
if(DIM == 3)
for(int i=0; i<MDIM; i++)
T[i][3] = (i == WDIM);
return T; return T;
} }