2216a87ab4
Ora si esporta la generica classe distanza punto curva.
55 lines
1.7 KiB
C++
55 lines
1.7 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2013-2014
|
|
//----------------------------------------------------------------------------
|
|
// File : DistPointArc.h Data : 28.12.13 Versione : 1.4l5
|
|
// Contenuto : Dichiarazione della classe distanza punto da circonferenza/arco.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 28.12.13 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/EGkPoint3d.h"
|
|
#include "/EgtDev/Include/EGkCurveArc.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 DistPointArc
|
|
{
|
|
friend class DistPointCurve ;
|
|
|
|
public :
|
|
EGK_EXPORT DistPointArc( const Point3d& ptP, const ICurveArc& arArc) ;
|
|
|
|
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 :
|
|
DistPointArc( void) ;
|
|
void DistPointCircle( const Point3d& ptP, const ICurveArc& arArc) ;
|
|
void DistPointFlatArc( const Point3d& ptP, const ICurveArc& arArc) ;
|
|
void DistPointHelix( const Point3d& ptP, const ICurveArc& arArc) ;
|
|
|
|
private :
|
|
bool m_bDet ;
|
|
double m_dDist ;
|
|
double m_dParam ;
|
|
Point3d m_ptMinDist ;
|
|
} ;
|
|
|