TriEdgeFlip::ComputPriority now use vcg::CircumCenter(triangle) to compute circumcenter coordinates
This commit is contained in:
parent
9841c8db32
commit
2aac6ba625
|
@ -23,7 +23,8 @@
|
||||||
|
|
||||||
#include <vcg/complex/local_optimization.h>
|
#include <vcg/complex/local_optimization.h>
|
||||||
#include <vcg/simplex/face/topology.h>
|
#include <vcg/simplex/face/topology.h>
|
||||||
#include <vcg/space/point3.h>
|
//#include <vcg/space/point3.h>
|
||||||
|
#include <vcg/space/triangle3.h>
|
||||||
|
|
||||||
namespace vcg
|
namespace vcg
|
||||||
{
|
{
|
||||||
|
@ -316,6 +317,8 @@ namespace vcg
|
||||||
typedef typename LocalOptimization<TRIMESH_TYPE>::HeapElem HeapElem;
|
typedef typename LocalOptimization<TRIMESH_TYPE>::HeapElem HeapElem;
|
||||||
typedef typename LocalOptimization<TRIMESH_TYPE>::HeapType HeapType;
|
typedef typename LocalOptimization<TRIMESH_TYPE>::HeapType HeapType;
|
||||||
|
|
||||||
|
typedef typename vcg::Triangle3<ScalarType> TriangleType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*!
|
/*!
|
||||||
* Default constructor
|
* Default constructor
|
||||||
|
@ -373,7 +376,7 @@ namespace vcg
|
||||||
v3 = app.v->P();
|
v3 = app.v->P();
|
||||||
|
|
||||||
|
|
||||||
CoordType e01 = v0-v1;
|
/*CoordType e01 = v0-v1;
|
||||||
CoordType e12 = v1-v2;
|
CoordType e12 = v1-v2;
|
||||||
CoordType e20 = v2-v0;
|
CoordType e20 = v2-v0;
|
||||||
CoordType e01Norm = e01; e01Norm.Normalize();
|
CoordType e01Norm = e01; e01Norm.Normalize();
|
||||||
|
@ -395,7 +398,10 @@ namespace vcg
|
||||||
if(SumC==0) return 20;
|
if(SumC==0) return 20;
|
||||||
|
|
||||||
|
|
||||||
CoordType CircumCenter= v0*C0/SumC + v1*C1/SumC + v2*C2/SumC;
|
CoordType CircumCenter= v0*C0/SumC + v1*C1/SumC + v2*C2/SumC;*/
|
||||||
|
|
||||||
|
TriangleType triangle(v0, v1, v2);
|
||||||
|
CoordType CircumCenter = vcg::Circumcenter(triangle);
|
||||||
|
|
||||||
ScalarType Radius= Distance(v0,CircumCenter);
|
ScalarType Radius= Distance(v0,CircumCenter);
|
||||||
ScalarType Radius1= Distance(v1,CircumCenter);
|
ScalarType Radius1= Distance(v1,CircumCenter);
|
||||||
|
|
Loading…
Reference in New Issue