Files
EgtInterface/API_GeoDist.cpp
T
Dario Sassi 0c50ffc330 EgtInterface 1.9l2 :
- modifiche a interfacce EgtPointCurveDist, EgtPointCurveDistSide (prima erano EgtGetMinDistPointCurve e EgtGetMinDistPntSidePointCurve)
- aggiunta interfaccia per EgtPointSurfTmDist
- modifiche a interfaccia EgtLineSurfTmInters (prima era EgtSurfTmLineInters).
2018-12-17 11:31:29 +00:00

56 lines
2.0 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2018-2018
//----------------------------------------------------------------------------
// File : API_GeoDist.cpp Data : 15.12.18 Versione : 1.9l2
// Contenuto : Funzioni di distanza tra oggetti del DB geometrico per API.
//
//
//
// Modifiche : 15.12.18 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
//--------------------------- Include ----------------------------------------
#include "stdafx.h"
#include "API.h"
#include "/EgtDev/Include/EInAPI.h"
#include "/EgtDev/Include/EXeExecutor.h"
using namespace std ;
//----------------------------------------------------------------------------
BOOL
__stdcall EgtPointCurveDist( const double ptP[3], int nId, int nRefType, double* pdDist, double* pdU)
{
Point3d ptTemp ;
return ( ExePointCurveDist( ptP, nId, nRefType, pdDist, ptTemp, pdU) ? TRUE : FALSE) ;
}
//----------------------------------------------------------------------------
BOOL
__stdcall EgtPointCurveDistSide( const double ptP[3], int nId, const double vtN[3], int nRefType,
double* pdDist, double ptMin[3], int* pnSide)
{
if ( pdDist == nullptr || ptMin == nullptr || pnSide == nullptr)
return FALSE ;
Point3d ptTmp ;
if ( ! ExePointCurveDistSide( ptP, nId, vtN, nRefType, pdDist, ptTmp, pnSide))
return FALSE ;
VEC_FROM_3D( ptMin, ptTmp)
return TRUE ;
}
//----------------------------------------------------------------------------
BOOL
__stdcall EgtPointSurfTmDist( const double ptP[3], int nId, int nRefType, double* pdDist, double ptMin[3], int* pnTria)
{
if ( pdDist == nullptr || ptMin == nullptr || pnTria == nullptr)
return FALSE ;
Point3d ptTmp ;
if ( ! ExePointSurfTmDist( ptP, nId, nRefType, pdDist, ptTmp, pnTria))
return FALSE ;
VEC_FROM_3D( ptMin, ptTmp)
return TRUE ;
}