Include :
- aggiornamento prototipi.
This commit is contained in:
+21
-21
@@ -1,14 +1,15 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2019
|
||||
// EgalTech 2015-2020
|
||||
//----------------------------------------------------------------------------
|
||||
// File : Polygon3d.h Data : 23.07.19 Versione : 2.1g3
|
||||
// File : Polygon3d.h Data : 02.10.20 Versione : 2.2j1
|
||||
// Contenuto : Dichiarazione della classe Polygon3d (poligono nello spazio).
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 30.08.15 DS Creazione modulo.
|
||||
// 19.06.19 DS Aggiunta GetVertices.
|
||||
// 23.07.19 Ds Aggiunte Offset e Invert.
|
||||
// 23.07.19 DS Aggiunte Offset e Invert.
|
||||
// 02.10.20 DS A FromPlaneTrimmedWithBox aggiunto parametro dToler.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -37,12 +38,27 @@ class Polygon3d
|
||||
EGK_EXPORT bool FromRectangle( double dDimX, double dDimY) ;
|
||||
EGK_EXPORT bool FromPolyLine( const PolyLine& PL) ;
|
||||
EGK_EXPORT bool FromPlaneTrimmedWithBox( const Plane3d& plPlane,
|
||||
const Point3d& ptMin, const Point3d& ptMax, bool bOnEq = false, bool bOnCt = false) ;
|
||||
const Point3d& ptMin, const Point3d& ptMax, bool bOnEq = false, bool bOnCt = false, double dToler = EPS_SMALL) ;
|
||||
EGK_EXPORT bool FromPlaneTrimmedWithBox( const Point3d& ptOn, const Vector3d& vtN,
|
||||
const Point3d& ptMin, const Point3d& ptMax, bool bOnEq = false, bool bOnCt = false) ;
|
||||
const Point3d& ptMin, const Point3d& ptMax, bool bOnEq = false, bool bOnCt = false, double dToler = EPS_SMALL) ;
|
||||
EGK_EXPORT bool Trim( const Plane3d& plPlane, bool bInVsOut, bool bOnEq = false, bool bOnCt = false) ;
|
||||
EGK_EXPORT bool Trim( const Polygon3d& plyOther, bool bInVsOut, bool bOnEq = false, bool bOnCt = false) ;
|
||||
EGK_EXPORT bool Add( const Polygon3d& plyOther) ;
|
||||
EGK_EXPORT void Offset( double dDist)
|
||||
{ Translate( dDist * m_Plane.GetVersN()) ; }
|
||||
EGK_EXPORT void Invert( void) ;
|
||||
EGK_EXPORT void Translate( const Vector3d& vtMove) ;
|
||||
EGK_EXPORT bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg)
|
||||
{ double dAngRad = dAngDeg * DEGTORAD ;
|
||||
return Rotate( ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; }
|
||||
EGK_EXPORT bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) ;
|
||||
EGK_EXPORT bool Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) ;
|
||||
EGK_EXPORT bool Mirror( const Point3d& ptOn, const Vector3d& vtNorm) ;
|
||||
EGK_EXPORT bool Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) ;
|
||||
EGK_EXPORT bool ToGlob( const Frame3d& frRef) ;
|
||||
EGK_EXPORT bool ToLoc( const Frame3d& frRef) ;
|
||||
EGK_EXPORT bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest) ;
|
||||
|
||||
EGK_EXPORT bool IsValid( void) const
|
||||
{ return ! m_Plane.GetVersN().IsSmall() ; }
|
||||
EGK_EXPORT const Plane3d& GetPlane( void) const
|
||||
@@ -60,22 +76,6 @@ class Polygon3d
|
||||
EGK_EXPORT double GetPerimeter( void) const ;
|
||||
EGK_EXPORT double GetArea( void) const ;
|
||||
|
||||
public :
|
||||
EGK_EXPORT void Translate( const Vector3d& vtMove) ;
|
||||
EGK_EXPORT bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg)
|
||||
{ double dAngRad = dAngDeg * DEGTORAD ;
|
||||
return Rotate( ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; }
|
||||
EGK_EXPORT bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) ;
|
||||
EGK_EXPORT bool Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) ;
|
||||
EGK_EXPORT bool Mirror( const Point3d& ptOn, const Vector3d& vtNorm) ;
|
||||
EGK_EXPORT bool Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) ;
|
||||
EGK_EXPORT bool ToGlob( const Frame3d& frRef) ;
|
||||
EGK_EXPORT bool ToLoc( const Frame3d& frRef) ;
|
||||
EGK_EXPORT bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest) ;
|
||||
EGK_EXPORT void Offset( double dDist)
|
||||
{ Translate( dDist * m_Plane.GetVersN()) ; }
|
||||
EGK_EXPORT void Invert( void) ;
|
||||
|
||||
private :
|
||||
Plane3d m_Plane ; // piano in cui giace il poligono
|
||||
PNTVECTOR m_vVert ; // elenco ordinato dei vertici del poligono (CCW da Z+ piano)
|
||||
|
||||
Reference in New Issue
Block a user