Files
Include/EGkGeomDB.h
T
Dario Sassi a1e4c312bd Include :
- modifiche per materiali.
2014-04-27 20:11:17 +00:00

132 lines
7.6 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2013-2014
//----------------------------------------------------------------------------
// File : EGkGeomDB.h Data : 26.04.14 Versione : 1.5d7
// Contenuto : Dichiarazione della interfaccia IGeomDB.
//
//
//
// Modifiche : 24.11.13 DS Creazione modulo.
// 26.04.14 DS Agg. gestione libreria materiali.
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkGdbConst.h"
#include "/EgtDev/Include/EGkGeoFrame3d.h"
#include "/EgtDev/Include/EGkGeoObj.h"
#include "/EgtDev/Include/EGkMaterial.h"
#include "/EgtDev/Include/EGtILogger.h"
#include <string>
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
#if defined( I_AM_EGK) // da definirsi solo nella DLL
#define EGK_EXPORT __declspec( dllexport)
#else
#define EGK_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
class __declspec( novtable) IGeomDB
{
public :
virtual ~IGeomDB( void) {}
virtual bool Init( void) = 0 ;
virtual bool Clear( void) = 0 ;
virtual bool Load( const std::string& sFileIn) = 0 ;
virtual bool Save( const std::string& sFileOut, bool bBinary = true) 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 int GetGdbType( int nId) const = 0 ;
virtual IGeoObj* GetGeoObj( int nId) = 0 ;
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 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, int nFlag = BBF_NONE) const = 0 ;
virtual bool GetGlobalBBox( int nId, BBox3d& b3Glob, int nFlag = BBF_NONE) const = 0 ;
virtual bool GetRefBBox( int nId, const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_NONE) const = 0 ;
virtual int Copy( int nIdSou, int nIdDest, int nParentIdDest) = 0 ;
virtual int CopyGlob( int nIdSou, int nIdDest, int nParentIdDest) = 0 ;
virtual bool Relocate( int nId, int nNewParentId) = 0 ;
virtual bool RelocateGlob( int nId, int nNewParentId) = 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 TranslateGroup( 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 RotateGroup( 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 RotateGroup( 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 ScaleGroup( 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 MirrorGroup( int nId, const Point3d& ptOn, const Vector3d& vtNorm) = 0 ;
// selection
virtual bool SelectObj( int nId) = 0 ;
virtual bool DeselectObj( int nId) = 0 ;
virtual bool SelectGroupObjs( int nId) = 0 ;
virtual bool DeselectGroupObjs( int nId) = 0 ;
virtual bool IsSelectedObj( int nId) const = 0 ;
virtual int GetSelectedObjNbr( void) const = 0 ;
virtual int GetFirstSelectedObj( void) const = 0 ;
virtual int GetNextSelectedObj( void) const = 0 ;
virtual bool ClearSelection( void) = 0 ;
// attributes
virtual bool DumpAttributes( int nId, std::string& sOut, const char* szNewLine) const = 0 ;
virtual bool SetLevel( int nId, int nLevel) = 0 ;
virtual bool RevertLevel( int nId) = 0 ;
virtual bool GetLevel( int nId, int& nLevel) const = 0 ;
virtual bool GetCalcLevel( int nId, int& nLevel) const = 0 ;
virtual bool SetMode( int nId, int nMode) = 0 ;
virtual bool RevertMode( int nId) = 0 ;
virtual bool GetMode( int nId, int& nMode) const = 0 ;
virtual bool GetCalcMode( int nId, int& nMode) const = 0 ;
virtual bool SetStatus( int nId, int nStat) = 0 ;
virtual bool RevertStatus( int nId) = 0 ;
virtual bool GetStatus( int nId, int& nStat) const = 0 ;
virtual bool GetCalcStatus( int nId, int& nStat) const = 0 ;
virtual bool SetMark( int nId) = 0 ;
virtual bool ResetMark( int nId) = 0 ;
virtual bool GetMark( int nId, int& nMark) const = 0 ;
virtual bool GetCalcMark( int nId, int& nMark) const = 0 ;
virtual bool SetDefaultMaterial( Color cCol) = 0 ;
virtual bool GetDefaultMaterial( Color& cCol) const = 0 ;
virtual bool SetMaterial( int nId, int nMat) = 0 ;
virtual bool SetMaterial( int nId, const std::string& sMatName) = 0 ;
virtual bool SetMaterial( int nId, Color cCol) = 0 ;
virtual bool GetMaterial( int nId, int& nMat) const = 0 ;
virtual bool GetMaterial( int nId, Material& mMat) const = 0 ;
virtual bool GetMaterial( int nId, Color& cCol) const = 0 ;
virtual bool GetCalcMaterial( int nId, int& nMat) const = 0 ;
virtual bool GetCalcMaterial( int nId, Material& mMat) const = 0 ;
virtual bool GetCalcMaterial( int nId, Color& cCol) const = 0 ;
virtual bool SetName( int nId, const std::string& sName) = 0 ;
virtual bool GetName( int nId, std::string& sName) const = 0 ;
virtual bool RemoveName( int nId) = 0 ;
virtual bool SetInfo( int nId, const std::string& sKey, const std::string& sInfo) = 0 ;
virtual bool GetInfo( int nId, const std::string& sKey, std::string& sInfo) const = 0 ;
virtual bool RemoveInfo( int nId, const std::string& sKey) = 0 ;
// material library
virtual int AddMaterial( const std::string& sName, const Material& matM) = 0 ;
virtual int FindMaterial( const std::string& sName) const = 0 ;
virtual bool EraseMaterial( int nMat, bool& bInUse) = 0 ;
virtual bool GetMaterialData( int nMat, Material& matM) const = 0 ;
virtual bool GetMaterialName( int nMat, std::string& sName) const = 0 ;
virtual bool ExistsMaterial( int nMat) const = 0 ;
virtual bool IsCustomMaterial( int nMat, bool& bCustom) const = 0 ;
virtual bool ModifyMaterialData( int nMat, const Material& matM) = 0 ;
virtual bool ModifyMaterialName( int nMat, const std::string& sName) = 0 ;
} ;
//-----------------------------------------------------------------------------
EGK_EXPORT IGeomDB* CreateGeomDB( void) ;