diff --git a/vroni/Include/mydefs.h b/vroni/Include/mydefs.h index d652c96..ce40fe2 100644 --- a/vroni/Include/mydefs.h +++ b/vroni/Include/mydefs.h @@ -10,4 +10,5 @@ #define MIC #define MAT #define EXT_APPL_PNTS -#define EXT_APPL_SITES \ No newline at end of file +#define EXT_APPL_SITES +#define GRAPHICS \ No newline at end of file diff --git a/vroni/Include/vddata.h b/vroni/Include/vddata.h index f12e290..6804bfb 100644 --- a/vroni/Include/vddata.h +++ b/vroni/Include/vddata.h @@ -45,6 +45,7 @@ typedef enum { PARABOLA, HYPERBOLA, HYPERELL, + DEGENERATE_HYPERELL, NONE } BisectorType ; diff --git a/vroni/Include/vroni_object.h b/vroni/Include/vroni_object.h index 7daa4bf..87fe01a 100644 --- a/vroni/Include/vroni_object.h +++ b/vroni/Include/vroni_object.h @@ -1028,11 +1028,16 @@ public: int num_arc_buf, max_num_arc_buf; int num_vdn_buf, max_num_vdn_buf; + // MODIF : aggiunti dPar1 e dPar2 struct vde_buffer { coord p1; /* (x,y) coords of start point of a line seg */ coord p2; /* (x,y) coords of end point of a line seg */ int color; /* color information; see defs.h */ + + double dPar1; /* parametro sul bisettore a cui viene calcolato il punto p1 */ + double dPar2; /* parametro sul bisettore a cui viene calcolato il punto p2 */ + //Ensure construction doesn't implicitly initialize elements - done explicitly later anyway inline vde_buffer() {} }; /* buffer for drawing edges of the VD */ @@ -1343,9 +1348,12 @@ public: void ResetOffsetBuffer(void); void ResetCurBuffer(void); void ResetVDBuffer(void); - void UpdateBuffer(void); + void UpdateBuffer(void); void AddEdgeToBuffer(double_arg x1, double_arg y1, double_arg x2, double_arg y2, int color); + // MODIF : aggiunta la funzione che gestisce anche i due parametri dPar1 e dPar2 + void AddEdgeToBuffer(double_arg x1, double_arg y1, + double_arg x2, double_arg y2, int color, double dPar1, double dPar2); void AddCirToBuffer(coord cntr, double_arg radius); void WriteIpeOutput(char *filename); void AddOffToBuffer(double_arg x1, double_arg y1, @@ -3082,10 +3090,11 @@ public : // voronoi void ResetVoronoiDiagram(void) ; - void GetVDBisectorPoints( int i, double ptS[3], double ptE[3]) ; - void GetVDBisectorParams( int i, double& dParS, double& dParE) ; - BisectorType GetVDBisectorType( int i) ; - void GetVDBisectorPointAtParam( int nEdge, double dPar, double pt[3]) ; + BisectorType GetBisectorType( int i) ; + int GetApproxedBisectorPointsNbr( int nEdge) ; + vr_bool GetApproxedBisectorPoint( int nEdge, int nPointIdx, double pt[3], double& dPar) ; + vr_bool GetDegenerateHyperEllipticBisectorData( int nEdge, double ptS[3], double ptE[3], double ptC[3], double& dParS, double& dParE) ; + vr_bool GetLinearBisectorData( int nEdge, double ptS[3], double ptE[3], double& dParS, double& dParE) ; // media axis vr_bool IsWMATEdge( int nEdge) ; @@ -3093,6 +3102,8 @@ public : // debug void MyWriteVoronoiRegion( FILE *output) ; + int m_nBufferedVDEdge = -1 ; + }; diff --git a/vroni/Lib/vroniD32.lib b/vroni/Lib/vroniD32.lib index 99da55b..cce4c98 100644 Binary files a/vroni/Lib/vroniD32.lib and b/vroni/Lib/vroniD32.lib differ diff --git a/vroni/Lib/vroniD64.lib b/vroni/Lib/vroniD64.lib index fe4695d..7628ab5 100644 Binary files a/vroni/Lib/vroniD64.lib and b/vroni/Lib/vroniD64.lib differ diff --git a/vroni/Lib/vroniR32.lib b/vroni/Lib/vroniR32.lib index 4935e22..131bb17 100644 Binary files a/vroni/Lib/vroniR32.lib and b/vroni/Lib/vroniR32.lib differ diff --git a/vroni/Lib/vroniR64.lib b/vroni/Lib/vroniR64.lib index 923b22d..bf677cc 100644 Binary files a/vroni/Lib/vroniR64.lib and b/vroni/Lib/vroniR64.lib differ