Files
Include/EGkDistPointCurve.h
T
2014-01-05 09:49:02 +00:00

54 lines
1.8 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2013-2014
//----------------------------------------------------------------------------
// File : EGkDistPointCurve.h Data : 02.01.14 Versione : 1.5a1
// Contenuto : Dichiarazione della classe distanza punto da Curva.
//
//
//
// Modifiche : 02.01.14 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkPoint3d.h"
#include "/EgtDev/Include/EGkCurve.h"
//----------------------- 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 DistPointCurve
{
public :
EGK_EXPORT DistPointCurve( const Point3d& ptP, const ICurve& Curve) ;
public :
EGK_EXPORT bool GetSqDist( double& dSqDist) ;
EGK_EXPORT bool GetDist( double& dDist) ;
EGK_EXPORT bool GetPointMinDist( Point3d& ptMinDist, bool* pbDet = nullptr) ;
EGK_EXPORT bool GetParamAtPointMinDist( double& dParam, bool* pbDet = nullptr) ;
private :
DistPointCurve( void) ;
void LineCalculate( const Point3d& ptP, const ICurve& Curve) ;
void ArcCalculate( const Point3d& ptP, const ICurve& Curve) ;
void CrvBezierCalculate( const Point3d& ptP, const ICurve& Curve) ;
void CrvCompositeCalculate( const Point3d& ptP, const ICurve& Curve) ;
private :
bool m_bDet ;
double m_dDist ;
double m_dParam ;
Point3d m_ptMinDist ;
} ;