Changeset 3237
- Timestamp:
- 03/09/10 15:38:32 (15 years ago)
- Location:
- issm/trunk/src/c/Bamgx
- Files:
-
- 1 added
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Bamgx/BamgObjects.h
r3236 r3237 134 134 return bax*cay - bay*cax; 135 135 } 136 inline TriangleAdjacent FindTriangleAdjacent(Edge &E){ 137 Vertex * a = E.v[0]; 138 Vertex * b = E.v[1]; 139 140 Triangle * t = a->t; 141 int i = a->vint; 142 TriangleAdjacent ta(t,EdgesVertexTriangle[i][0]); // Previous edge 143 if (!t || i<0 || i>=3){ 144 throw ErrorException(__FUNCT__,exprintf("!t || i<0 !! i>=3")); 145 } 146 if ( a!=(*t)(i)){ 147 throw ErrorException(__FUNCT__,exprintf("a!=(*t)(i)")); 148 } 149 int k=0; 150 do { // turn around vertex in direct sens (trigo) 151 k++; 152 if (k>=20000){ 153 throw ErrorException(__FUNCT__,exprintf("k>=20000")); 154 } 155 // in no crack => ta.EdgeVertex(1) == a otherwise ??? 156 if (ta.EdgeVertex(1) == a && ta.EdgeVertex(0) == b) return ta; // find 157 ta = ta.Adj(); 158 if (ta.EdgeVertex(0) == a && ta.EdgeVertex(1) == b) return ta; // find 159 --ta; 160 } while (t != (Triangle *)ta); 161 throw ErrorException(__FUNCT__,exprintf("FindTriangleAdjacent: triangle not found")); 162 return TriangleAdjacent(0,0);//for compiler 163 } 136 164 137 /*}}}1*/ 165 138 -
issm/trunk/src/c/Bamgx/objects/CrackedEdge.h
r3236 r3237 13 13 #include "Triangle.h" 14 14 #include "../shared/TheVertex.h" 15 #include "../shared/FindTriangleAdjacent.h" 15 16 16 17 namespace bamg { -
issm/trunk/src/c/Bamgx/objects/Edge.h
r3232 r3237 50 50 51 51 }; 52 53 //FOR NOW54 inline TriangleAdjacent FindTriangleAdjacent(Edge &E);55 56 52 } 57 53 #endif -
issm/trunk/src/c/Bamgx/shared/shared.h
r3236 r3237 10 10 #include "CloseBoundaryEdge.h" 11 11 #include "CloseBoundaryEdgeV2.h" 12 #include "FindTriangle.h"13 12 #include "ForceEdge.h" 14 13 #include "shared.h" … … 16 15 #include "swap.h" 17 16 #include "TheVertex.h" 17 #include "FindTriangleAdjacent.h" 18 18 19 19 #endif
Note:
See TracChangeset
for help on using the changeset viewer.