diff --git a/EGkColor.h b/EGkColor.h index 17bfdd4..f780159 100644 --- a/EGkColor.h +++ b/EGkColor.h @@ -35,21 +35,21 @@ class Color m_Col[GREEN] = (( dGreen < 0) ? 0 : (( dGreen > 1) ? MAX_RGB : int( dGreen * MAX_RGB))) ; m_Col[BLUE] = (( dBlue < 0) ? 0 : (( dBlue > 1) ? MAX_RGB : int( dBlue * MAX_RGB))) ; m_Col[ALPHA] = (( dAlpha < 0) ? 0 : (( dAlpha > 1) ? MAX_ALPHA : int( dAlpha * MAX_ALPHA))) ; } - int GetIntRed( void) + int GetIntRed( void) const { return m_Col[RED] ; } - int GetIntGreen( void) + int GetIntGreen( void) const { return m_Col[GREEN] ; } - int GetIntBlue( void) + int GetIntBlue( void) const { return m_Col[BLUE] ; } - int GetIntAlpha( void) + int GetIntAlpha( void) const { return m_Col[ALPHA] ; } - float GetRed( void) + float GetRed( void) const { return ( (float) m_Col[RED] / MAX_RGB) ; } - float GetGreen( void) + float GetGreen( void) const { return ( (float) m_Col[GREEN] / MAX_RGB) ; } - float GetBlue( void) + float GetBlue( void) const { return ( (float) m_Col[BLUE] / MAX_RGB) ; } - float GetAlpha( void) + float GetAlpha( void) const { return ( (float) m_Col[ALPHA] / MAX_ALPHA) ; } bool operator == ( const Color& other) { return ( m_Col[RED] == other.m_Col[RED] && diff --git a/EGkGdbIterator.h b/EGkGdbIterator.h index fcfe8d2..b78c960 100644 --- a/EGkGdbIterator.h +++ b/EGkGdbIterator.h @@ -38,11 +38,13 @@ class __declspec( novtable) IGdbIterator virtual GdbType GetGdbType( void) const = 0 ; virtual IGeoObj* GetGeoObj( void) = 0 ; virtual IGeoFrame3d* GetGeoFrame( void) = 0 ; - virtual bool GetGroupFrame( Frame3d& frGlob) = 0 ; - virtual bool GetGroupGlobFrame( Frame3d& frGlob) = 0 ; - virtual int GetId( void) = 0 ; - virtual int GetParentId( void) = 0 ; - virtual bool GetGlobFrame( Frame3d& frGlob) = 0 ; + virtual bool GetGroupFrame( Frame3d& frGlob) const = 0 ; + virtual bool GetGroupGlobFrame( Frame3d& frGlob) const = 0 ; + virtual int GetId( void) const = 0 ; + virtual int GetParentId( void) const = 0 ; + virtual bool GetGlobFrame( Frame3d& frGlob) const = 0 ; + virtual bool SetColor( Color cCol) = 0 ; + virtual bool GetColor( Color& cCol) const = 0 ; } ; //----------------------------------------------------------------------------- diff --git a/EGkGeomDB.h b/EGkGeomDB.h index 8c42bf0..723ea62 100644 --- a/EGkGeomDB.h +++ b/EGkGeomDB.h @@ -16,6 +16,7 @@ #include "/EgtDev/Include/EGkGdbConst.h" #include "/EgtDev/Include/EGkGeoFrame3d.h" #include "/EgtDev/Include/EGkGeoObj.h" +#include "/EgtDev/Include/EGkColor.h" #include "/EgtDev/Include/EGtILogger.h" #include @@ -36,7 +37,7 @@ class __declspec( novtable) IGeomDB virtual bool Clear( void) = 0 ; virtual bool Load( const std::string& sFileIn) = 0 ; virtual bool Save( const std::string& sFileOut) const = 0 ; - virtual bool ExistsNode( int nId) const = 0 ; + virtual bool ExistsObj( int nId) const = 0 ; virtual int AddGroup( int nId, int nParentId, const Frame3d& frFrame) = 0 ; virtual int AddGeoObj( int nId, int nParentId, IGeoObj* pGeoObj) = 0 ; virtual GdbType GetGdbType( int nId) const = 0 ; @@ -44,7 +45,7 @@ class __declspec( novtable) IGeomDB virtual IGeoFrame3d* GetGeoFrame( int nId) = 0 ; virtual bool GetGroupFrame( int nId, Frame3d& frGrp) const = 0 ; virtual bool GetGroupGlobFrame( int nId, Frame3d& frGlob) const = 0 ; - virtual int GetGroupNodes( int nId) const = 0 ; + virtual int GetGroupObjs( int nId) const = 0 ; virtual int GetParentId( int nId) const = 0 ; virtual bool GetGlobFrame( int nId, Frame3d& frGlob) const = 0 ; virtual bool GetLocalBBox( int nId, BBox3d& b3Loc) const = 0 ; @@ -63,6 +64,10 @@ class __declspec( novtable) IGeomDB 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 ; + virtual bool DumpAttributes( int nId, std::string& sOut, const char* szNewLine) const = 0 ; + virtual bool SetDefaultColor( Color cCol) = 0 ; + virtual bool SetColor( int nId, Color cCol) = 0 ; + virtual bool GetColor( int nId, Color& cCol) const = 0 ; } ; //-----------------------------------------------------------------------------