Changeset 3254
- Timestamp:
- 03/11/10 09:44:42 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 6 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Bamgx/BamgObjects.h
r3252 r3254 33 33 namespace bamg { 34 34 35 /*INLINE functions{{{1*/36 inline TriangleAdjacent Adj(const TriangleAdjacent & a)37 { return a.Adj();}38 39 inline TriangleAdjacent Next(const TriangleAdjacent & ta)40 { return TriangleAdjacent(ta.t,NextEdge[ta.a]);}41 42 inline TriangleAdjacent Previous(const TriangleAdjacent & ta)43 { return TriangleAdjacent(ta.t,PreviousEdge[ta.a]);}44 inline void Adj(GeometricalEdge * & on,int &i)45 {int j=i;i=on->DirAdj[i];on=on->Adj[j];}46 inline double qualite(const Vertex &va,const Vertex &vb,const Vertex &vc)47 {48 double ret;49 I2 ia=va,ib=vb,ic=vc;50 I2 ab=ib-ia,bc=ic-ib,ac=ic-ia;51 Icoor2 deta=Det(ab,ac);52 if (deta <=0) ret = -1;53 else {54 double a = sqrt((double) (ac,ac)),55 b = sqrt((double) (bc,bc)),56 c = sqrt((double) (ab,ab)),57 p = a+b+c;58 double h= Max(Max(a,b),c),ro=deta/p;59 ret = ro/h;}60 return ret;61 }62 Icoor2 inline det(const Vertex & a,const Vertex & b,const Vertex & c){63 register Icoor2 bax = b.i.x - a.i.x ,bay = b.i.y - a.i.y;64 register Icoor2 cax = c.i.x - a.i.x ,cay = c.i.y - a.i.y;65 return bax*cay - bay*cax;66 }67 68 /*}}}1*/69 70 35 /*INLINE functions of CLASS VertexOnVertex{{{1*/ 71 36 inline void VertexOnVertex::Set(const Triangles & Th ,long i,Triangles & ThNew) { -
issm/trunk/src/c/Bamgx/shared/shared.h
r3252 r3254 8 8 9 9 #include "BigPrimeNumber.h" 10 #include "qualite.h" 11 #include "Next.h" 12 #include "Previous.h" 13 #include "Adj.h" 10 14 #include "TheVertex.h" 11 15 #include "FindTriangleAdjacent.h" -
issm/trunk/src/c/Makefile.am
r3252 r3254 360 360 ./Bamgx/shared/BigPrimeNumber.h\ 361 361 ./Bamgx/shared/BigPrimeNumber.cpp\ 362 ./Bamgx/shared/Adj.h\ 363 ./Bamgx/shared/Next.h\ 364 ./Bamgx/shared/Previous.h\ 365 ./Bamgx/shared/qualite.h\ 362 366 ./Bamgx/objects/Triangles.cpp\ 363 367 ./Bamgx/objects/Triangles.h\ … … 728 732 ./Bamgx/shared/BigPrimeNumber.h\ 729 733 ./Bamgx/shared/BigPrimeNumber.cpp\ 734 ./Bamgx/shared/Adj.h\ 735 ./Bamgx/shared/Next.h\ 736 ./Bamgx/shared/Previous.h\ 737 ./Bamgx/shared/qualite.h\ 730 738 ./Bamgx/objects/Triangles.cpp\ 731 739 ./Bamgx/objects/Triangles.h\
Note:
See TracChangeset
for help on using the changeset viewer.