|
Last change
on this file since 3254 was 3254, checked in by Mathieu Morlighem, 16 years ago |
|
Added sme shared Bamg tools
|
|
File size:
534 bytes
|
| Line | |
|---|
| 1 | #ifndef _QUALITE_H_
|
|---|
| 2 | #define _QUALITE_H_
|
|---|
| 3 |
|
|---|
| 4 | #include "../meshtype.h"
|
|---|
| 5 | #include "../objects/Vertex.h"
|
|---|
| 6 |
|
|---|
| 7 | namespace bamg {
|
|---|
| 8 |
|
|---|
| 9 | inline double qualite(const Vertex &va,const Vertex &vb,const Vertex &vc){
|
|---|
| 10 | double ret;
|
|---|
| 11 | I2 ia=va,ib=vb,ic=vc;
|
|---|
| 12 | I2 ab=ib-ia,bc=ic-ib,ac=ic-ia;
|
|---|
| 13 | Icoor2 deta=Det(ab,ac);
|
|---|
| 14 | if (deta <=0) ret = -1;
|
|---|
| 15 | else {
|
|---|
| 16 | double a = sqrt((double) (ac,ac)),
|
|---|
| 17 | b = sqrt((double) (bc,bc)),
|
|---|
| 18 | c = sqrt((double) (ab,ab)),
|
|---|
| 19 | p = a+b+c;
|
|---|
| 20 | double h= Max(Max(a,b),c),ro=deta/p;
|
|---|
| 21 | ret = ro/h;
|
|---|
| 22 | }
|
|---|
| 23 | return ret;
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 | }
|
|---|
| 27 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.