EgtInterface :
- aggiunte interfacce per EgtSurfTmGetVertex, EgtSurfTmGetNearestVertex, EgtSurfTmMoveVertex e EgtSurfTmMoveFacet.
This commit is contained in:
@@ -112,11 +112,46 @@ __stdcall EgtSurfTmFacetFromTria( int nId, int nT)
|
||||
return ExeSurfTmFacetFromTria( nId, nT) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSurfTmGetVertex( int nId, int nVert, int nRefId, double ptVert[3])
|
||||
{
|
||||
// verifica parametri
|
||||
if ( ptVert == nullptr)
|
||||
return FALSE ;
|
||||
// recupero il vertice
|
||||
Point3d ptV ;
|
||||
if ( ! ExeSurfTmGetVertex( nId, nVert, nRefId, ptV))
|
||||
return FALSE ;
|
||||
// lo assegno
|
||||
VEC_FROM_3D( ptVert, ptV)
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSurfTmGetNearestVertex( int nId, const double ptNear[3], int nRefId, int* pnVert, double ptVert[3])
|
||||
{
|
||||
// verifica parametri
|
||||
if ( ptNear == nullptr || pnVert == nullptr || ptVert == nullptr)
|
||||
return FALSE ;
|
||||
// recupero indice del vertice e sue coordinate
|
||||
Point3d ptTmp ;
|
||||
if ( ! ExeSurfTmGetNearestVertex( nId, ptNear, nRefId, *pnVert, ptTmp))
|
||||
return FALSE ;
|
||||
// le assegno
|
||||
VEC_FROM_3D( ptVert, ptTmp)
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSurfTmFacetNearestEndPoint( int nId, int nFacet, const double ptNear[3], int nRefId,
|
||||
double ptEnd[3], double vtNorm[3])
|
||||
{
|
||||
// verifica parametri
|
||||
if ( ptNear == nullptr || ptEnd == nullptr || vtNorm == nullptr)
|
||||
return FALSE ;
|
||||
// recupero il punto e la normale
|
||||
Point3d ptTmp ;
|
||||
Vector3d vtN ;
|
||||
@@ -133,6 +168,9 @@ BOOL
|
||||
__stdcall EgtSurfTmFacetNearestMidPoint( int nId, int nFacet, const double ptNear[3], int nRefId,
|
||||
double ptMid[3], double vtNorm[3])
|
||||
{
|
||||
// verifica parametri
|
||||
if ( ptNear == nullptr || ptMid == nullptr || vtNorm == nullptr)
|
||||
return FALSE ;
|
||||
// recupero il punto e la normale
|
||||
Point3d ptTmp ;
|
||||
Vector3d vtN ;
|
||||
@@ -148,6 +186,9 @@ __stdcall EgtSurfTmFacetNearestMidPoint( int nId, int nFacet, const double ptNea
|
||||
BOOL
|
||||
__stdcall EgtSurfTmFacetCenter( int nId, int nFacet, int nRefId, double ptCen[3], double vtNorm[3])
|
||||
{
|
||||
// verifica parametri
|
||||
if ( ptCen == nullptr || vtNorm == nullptr)
|
||||
return FALSE ;
|
||||
// recupero il centro e la normale
|
||||
Point3d ptTmp ;
|
||||
Vector3d vtN ;
|
||||
@@ -163,6 +204,9 @@ __stdcall EgtSurfTmFacetCenter( int nId, int nFacet, int nRefId, double ptCen[3]
|
||||
BOOL
|
||||
__stdcall EgtSurfTmFacetNormVersor( int nId, int nFacet, int nRefId, double vtNorm[3])
|
||||
{
|
||||
// verifica parametri
|
||||
if ( vtNorm == nullptr)
|
||||
return FALSE ;
|
||||
// recupero il vettore normale
|
||||
Vector3d vtTmp ;
|
||||
if ( ! ExeSurfTmFacetNormVersor( nId, nFacet, nRefId, vtTmp))
|
||||
|
||||
Reference in New Issue
Block a user