cc2db726db
aggiunto map da sKey a nType.
99 lines
4.7 KiB
C++
99 lines
4.7 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2013-2013
|
|
//----------------------------------------------------------------------------
|
|
// File : CurveArc.h Data : 22.11.13 Versione : 1.3a1
|
|
// Contenuto : Dichiarazione della classe CurveArc.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 16.04.13 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/EGkCurveArc.h"
|
|
#include "CurveAux.h"
|
|
|
|
//----------------------------------------------------------------------------
|
|
class CurveArc : public ICurveArc
|
|
{
|
|
public :
|
|
virtual ~CurveArc( void) ;
|
|
virtual CurveArc* Clone( void) const ;
|
|
virtual GeoObjType GetType( void) const { return CRV_ARC ; }
|
|
virtual const std::string& GetKey( void) const ;
|
|
virtual bool IsValid( void) const { return ( m_nStatus == OK) ; }
|
|
virtual bool Save( std::ostream& osOut) const ;
|
|
virtual bool Load( CScan& TheScanner) ;
|
|
virtual bool Translate( const Vector3d& vtMove) ;
|
|
virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) ;
|
|
virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngRad)
|
|
{ return Rotate( ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; }
|
|
virtual bool Scale( const Point3d& ptCen, double dCoeffX, double dCoeffY, double dCoeffZ) ;
|
|
virtual bool Mirror( const Point3d& ptOn, const Vector3d& vtNorm) ;
|
|
virtual bool ToGlob( const Frame3d& frRef) ;
|
|
virtual bool ToLoc( const Frame3d& frRef) ;
|
|
|
|
public :
|
|
virtual bool IsSimple( void) const { return true ; }
|
|
virtual bool IsClosed( void) const
|
|
{ return ::IsClosed( *this) ; }
|
|
virtual bool GetStartPoint( Point3d& ptStart) const ;
|
|
virtual bool GetEndPoint( Point3d& ptEnd) const ;
|
|
virtual bool GetDomain( double& dStart, double& dEnd) const ;
|
|
virtual bool GetLength( double& dLen) const ;
|
|
virtual bool GetPointD1D2( double dU, Point3d& ptPos, Vector3d& vtDer1, Vector3d& vtDer2) const ;
|
|
virtual bool GetPoint( double dU, Point3d& ptPos) const
|
|
{ return ::GetPoint( *this, dU, ptPos) ; }
|
|
virtual bool GetPointTang( double dU, Point3d& ptPos, Vector3d& vtTang) const
|
|
{ return ::GetPointTang( *this, dU, ptPos, vtTang) ; }
|
|
virtual bool GetPointTangNormCurv( double dU, Point3d& ptPos, Vector3d& vtT, Vector3d& vtN, double& dCurv) const
|
|
{ return ::GetPointTangNormCurv( *this, dU, ptPos, vtT, vtN, dCurv) ; }
|
|
virtual bool Reverse( void) ;
|
|
|
|
public :
|
|
virtual bool Set( const Point3d& ptCen, const Vector3d& vtN, double dRad,
|
|
const Vector3d& vtS, double dAngCenDeg, double dDeltaN) ;
|
|
virtual bool Set( const Point3d& ptCen, double dRad, double dAngIniDeg, double dAngCenDeg, double dDeltaZ) ;
|
|
virtual bool Set( const Point3d& ptCen, double dRad) ;
|
|
virtual bool IsInPlaneXY( void) const
|
|
{ return ( m_VtN.IsZplus()) ; }
|
|
virtual const Point3d& GetCenter( void) const
|
|
{ return m_PtCen ; }
|
|
virtual const Vector3d& GetNormVersor( void) const
|
|
{ return m_VtN ; }
|
|
virtual const Vector3d& GetStartVersor( void) const
|
|
{ return m_VtS ; }
|
|
virtual double GetRadius( void) const
|
|
{ return m_dRad ; }
|
|
virtual double GetAngCenter( void) const
|
|
{ return m_dAngCenDeg ; }
|
|
virtual double GetDeltaN( void) const
|
|
{ return m_dDeltaN ; }
|
|
|
|
public :
|
|
CurveArc( void) ;
|
|
inline const CurveArc& operator =( const CurveArc& caSrc)
|
|
{ if ( &caSrc != this)
|
|
Set( caSrc.m_PtCen, caSrc.m_VtN, caSrc.m_dRad,
|
|
caSrc.m_VtS, caSrc.m_dAngCenDeg, caSrc.m_dDeltaN) ;
|
|
return *this ; }
|
|
|
|
private :
|
|
bool Validate( void) ;
|
|
|
|
private :
|
|
enum Status { ERR = 0, OK = 1, TO_VERIFY = 2} ;
|
|
|
|
private :
|
|
Status m_nStatus ; // stato
|
|
Point3d m_PtCen ; // punto centro
|
|
Vector3d m_VtN ; // versore normale al piano dell'arco
|
|
Vector3d m_VtS ; // versore al punto iniziale
|
|
double m_dRad ; // raggio
|
|
double m_dAngCenDeg ; // angolo al centro in gradi (positivo se antiorario visto da VtN)
|
|
double m_dDeltaN ; // variazione di quota lungo VtN della fine rispetto all'inizio
|
|
} ;
|