eaa2eedb16
- aggiunta EGkCurveByApprox - sistemazioni varie.
51 lines
1.5 KiB
C++
51 lines
1.5 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2014-2014
|
|
//----------------------------------------------------------------------------
|
|
// File : EGkCurveByInterp.h Data : 05.08.14 Versione : 1.5h1
|
|
// Contenuto : Dichiarazione della classe CurveByInterp.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 05.08.14 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include"/EgtDev/Include/EGkGeoCollection.h"
|
|
|
|
class ICurve ;
|
|
|
|
//----------------------- Macro per import/export ----------------------------
|
|
#undef EGK_EXPORT
|
|
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
|
#define EGK_EXPORT __declspec( dllexport)
|
|
#else
|
|
#define EGK_EXPORT __declspec( dllimport)
|
|
#endif
|
|
|
|
//----------------------------------------------------------------------------
|
|
class CurveByInterp
|
|
{
|
|
|
|
public :
|
|
EGK_EXPORT bool Reset( void) ;
|
|
EGK_EXPORT bool AddPoint( const Point3d& ptP) ;
|
|
EGK_EXPORT ICurve* GetCurve( int nMethod, int nType) ;
|
|
|
|
public :
|
|
EGK_EXPORT enum METHOD { BESSEL = 1, AKIMA = 2, AKIMA_CORNER = 3} ;
|
|
EGK_EXPORT enum TYPE { BIARCS = 1, CUBIC_BEZIERS = 2} ;
|
|
|
|
private :
|
|
bool CalcAkimaTangents( bool bDetectCorner) ;
|
|
bool CalcBesselTangents( void) ;
|
|
|
|
private :
|
|
PNTVECTOR m_vPnt ;
|
|
DBLVECTOR m_vPar ;
|
|
VCT3DVECTOR m_vPrevDer ;
|
|
VCT3DVECTOR m_vNextDer ;
|
|
} ;
|