From 203769a0c60162b83419e5e3e172e08376633a48 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 21 Jan 2014 16:31:25 +0000 Subject: [PATCH] Include : nuovi prototipi per EgtGeometricKernel. --- EGkFrame3d.h | 17 +++++++++++++++++ EGkGeomDB.h | 6 ++++++ EgkCurveBezier.h | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/EGkFrame3d.h b/EGkFrame3d.h index aa5540d..21b2fe0 100644 --- a/EGkFrame3d.h +++ b/EGkFrame3d.h @@ -102,3 +102,20 @@ operator/( const Frame3d& frRef1, const Frame3d& frRef2) return frRefR ; } + +//---------------------------------------------------------------------------- +// Verifica che due riferimenti sono coincidenti +//---------------------------------------------------------------------------- +inline bool +AreSameFrame( const Frame3d& frRef1, const Frame3d& frRef2) +{ + if ( ! AreSamePointNear( frRef1.Orig(), frRef2.Orig())) + return false ; + if ( ! AreSameVectorExact( frRef1.VersX(), frRef2.VersX())) + return false ; + if ( ! AreSameVectorExact( frRef1.VersY(), frRef2.VersY())) + return false ; + if ( ! AreSameVectorExact( frRef1.VersZ(), frRef2.VersZ())) + return false ; + return true ; +} diff --git a/EGkGeomDB.h b/EGkGeomDB.h index dd795bd..85d0bda 100644 --- a/EGkGeomDB.h +++ b/EGkGeomDB.h @@ -47,12 +47,18 @@ class __declspec( novtable) IGeomDB virtual bool GetLocalBBox( int nId, BBox3d& b3Loc) const = 0 ; virtual bool GetBBox( int nId, const Frame3d& frRef, BBox3d& b3Ref) const = 0 ; virtual int Copy( int nIdSou, int nIdDest, int nParentIdDest) = 0 ; + virtual int CopyGlob( int nIdSou, int nIdDest, int nParentIdDest) = 0 ; virtual bool Erase( int nId) = 0 ; virtual bool Translate( int nId, const Vector3d& vtMove) = 0 ; + virtual bool TranslateGlob( int nId, const Vector3d& vtMove) = 0 ; virtual bool Rotate( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) = 0 ; + virtual bool RotateGlob( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) = 0 ; virtual bool Rotate( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) = 0 ; + virtual bool RotateGlob( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) = 0 ; virtual bool Scale( int nId, const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) = 0 ; + virtual bool ScaleGlob( int nId, const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) = 0 ; virtual bool Mirror( int nId, const Point3d& ptOn, const Vector3d& vtNorm) = 0 ; + virtual bool MirrorGlob( int nId, const Point3d& ptOn, const Vector3d& vtNorm) = 0 ; } ; //----------------------------------------------------------------------------- diff --git a/EgkCurveBezier.h b/EgkCurveBezier.h index 6fa39dc..6a5e7f1 100644 --- a/EgkCurveBezier.h +++ b/EgkCurveBezier.h @@ -24,7 +24,7 @@ class __declspec( novtable) ICurveBezier : public ICurve virtual bool Init( int nDeg, bool bIsRational) = 0 ; virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl) = 0 ; virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl, double dW) = 0 ; - virtual bool SetFromArc( const ICurveArc& crArc) = 0 ; + virtual bool FromArc( const ICurveArc& crArc) = 0 ; virtual int GetDegree( void) const = 0 ; virtual bool IsRational( void) const = 0 ; virtual const Point3d& GetControlPoint( int nInd, bool* pbOk = NULL) const = 0 ;