star-uvm

Spatial structuring of unstructured volumetric meshes
git clone git://git.meso-star.fr/star-uvm.git
Log | Files | Refs | README | LICENSE

commit 8fd1fe4ea96cbe4e9990615567e211def3792ad3
parent 1fef41acfc0c1c71282f65233461383f77323615
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 16 Dec 2020 10:15:24 +0100

Fix the computation of the tetrahedron projected silhouette edges

Diffstat:
Msrc/suvm_primitive.c | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/suvm_primitive.c b/src/suvm_primitive.c @@ -293,32 +293,32 @@ tetrahedron_setup * vertices. */ if(signf(N[0][i]) != signf(N[1][i])) { /* The edge 0 is silhouette */ f2_normalize(Ep[i][n], f2(Ep[i][n], e[0][k], -e[0][j])); - Ep[i][n][2] = -f2_dot(Ep[i][n], v[0]); + Ep[i][n][2] = -(Ep[i][n][0]*v[0][j] + Ep[i][n][1]*v[0][k]); ++n; } if(signf(N[0][i]) != signf(N[2][i])) { /* The edge 1 is silhouette */ f2_normalize(Ep[i][n], f2(Ep[i][n], e[1][k], -e[1][j])); - Ep[i][n][2] = -f2_dot(Ep[i][n], v[1]); + Ep[i][n][2] = -(Ep[i][n][0]*v[1][j] + Ep[i][n][1]*v[1][k]); ++n; } if(signf(N[0][i]) != signf(N[3][i])) { /* The edge 2 is silhouette */ f2_normalize(Ep[i][n], f2(Ep[i][n], e[2][k], -e[2][j])); - Ep[i][n][2] = -f2_dot(Ep[i][n], v[2]); + Ep[i][n][2] = -(Ep[i][n][0]*v[2][j] + Ep[i][n][1]*v[2][k]); ++n; } if(signf(N[1][i]) != signf(N[3][i])) { /* The edge 3 is silhouette */ f2_normalize(Ep[i][n], f2(Ep[i][n], e[3][k], -e[3][j])); - Ep[i][n][2] = -f2_dot(Ep[i][n], v[0]); + Ep[i][n][2] = -(Ep[i][n][0]*v[0][j] + Ep[i][n][1]*v[0][k]); ++n; } if(signf(N[1][i]) != signf(N[2][i])) { /* The edge 4 is silhouette */ - f2_normalize(Ep[X][n], f2(Ep[i][n], e[4][k], -e[4][j])); - Ep[i][n][2] = -f2_dot(Ep[i][n], v[1]); + f2_normalize(Ep[i][n], f2(Ep[i][n], e[4][k], -e[4][j])); + Ep[i][n][2] = -(Ep[i][n][0]*v[1][j] + Ep[i][n][1]*v[1][k]); ++n; } if(signf(N[2][i]) != signf(N[3][i])) { /* The edge 5 is silhouette */ f2_normalize(Ep[i][n], f2(Ep[i][n], e[5][k], -e[5][j])); - Ep[i][n][2] = -f2_dot(Ep[i][n], v[2]); + Ep[i][n][2] = -(Ep[i][n][0]*v[2][j] + Ep[i][n][2]*v[2][k]); ++n; } /* A tetrahedron can have 3 or 4 silhouette edges once projected in 2D */