Include :
- aggiornamento prototipi - aggiunte funzioni inline per UiUnits.
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ class __declspec( novtable) IGeoObj
|
||||
virtual GeoObjType GetType( void) const = 0 ;
|
||||
virtual bool IsValid( void) const = 0 ;
|
||||
virtual const std::string& GetTitle( void) const = 0 ;
|
||||
virtual bool Dump( std::string& sOut, const char* szNewLine = "\n") const = 0 ;
|
||||
virtual bool Dump( std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const = 0 ;
|
||||
virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const = 0 ;
|
||||
virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const = 0 ;
|
||||
virtual bool Translate( const Vector3d& vtMove) = 0 ;
|
||||
|
||||
+2
-2
@@ -114,7 +114,7 @@ class __declspec( novtable) IGeomDB
|
||||
virtual int GetPrevSelectedObj( void) const = 0 ;
|
||||
virtual bool ClearSelection( void) = 0 ;
|
||||
// Attributes
|
||||
virtual bool DumpAttributes( int nId, std::string& sOut, const char* szNewLine) const = 0 ;
|
||||
virtual bool DumpAttributes( int nId, std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const = 0 ;
|
||||
virtual bool CopyAttributes( int nIdSou, int nIdDest) = 0 ;
|
||||
virtual bool SetLevel( int nId, int nLevel) = 0 ;
|
||||
virtual bool RevertLevel( int nId) = 0 ;
|
||||
@@ -175,7 +175,7 @@ class __declspec( novtable) IGeomDB
|
||||
virtual bool SetUserObj( int nId, IUserObj* pUserObj) = 0 ;
|
||||
virtual IUserObj* GetUserObj( int nId) = 0 ;
|
||||
virtual const IUserObj* GetUserObj( int nId) const = 0 ;
|
||||
virtual bool DumpUserObj( int nId, std::string& sOut, const char* szNewLine) const = 0 ;
|
||||
virtual bool DumpUserObj( int nId, std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const = 0 ;
|
||||
virtual bool CopyUserObj( int nIdSou, int nIdDest) = 0 ;
|
||||
virtual bool RemoveUserObj( int nId) = 0 ;
|
||||
// Material library
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2015
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkUiUnits.h Data : 22.07.15 Versione : 1.6g6
|
||||
// Contenuto : Funzioni di conversione per unità di misura in interfaccia.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 22.07.15 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkPoint3d.h"
|
||||
#include "/EgtDev/Include/EGkGeoConst.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
inline double
|
||||
GetInUiUnits( double dVal, bool bMM)
|
||||
{
|
||||
// interfaccia in mm, il valore va bene così
|
||||
if ( bMM)
|
||||
return dVal ;
|
||||
// interfaccia in pollici, devo trasformarlo
|
||||
return ( dVal / ONEINCH) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
inline double
|
||||
GetAreaInUiUnits( double dVal, bool bMM)
|
||||
{
|
||||
// interfaccia in mm, il valore va bene così
|
||||
if ( bMM)
|
||||
return dVal ;
|
||||
// interfaccia in pollici, devo trasformarlo
|
||||
return ( dVal / ( ONEINCH * ONEINCH)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
inline double
|
||||
GetVolumeInUiUnits( double dVal, bool bMM)
|
||||
{
|
||||
// interfaccia in mm, il valore va bene così
|
||||
if ( bMM)
|
||||
return dVal ;
|
||||
// interfaccia in pollici, devo trasformarlo
|
||||
return ( dVal / ( ONEINCH * ONEINCH * ONEINCH)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
inline Vector3d
|
||||
GetInUiUnits( const Vector3d& vtV, bool bMM)
|
||||
{
|
||||
// interfaccia in mm, il vettore va bene così
|
||||
if ( bMM)
|
||||
return vtV ;
|
||||
// interfaccia in pollici, devo trasformarlo
|
||||
Vector3d vtW = vtV ;
|
||||
vtW.x /= ONEINCH ;
|
||||
vtW.y /= ONEINCH ;
|
||||
vtW.z /= ONEINCH ;
|
||||
return vtW ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
inline Point3d
|
||||
GetInUiUnits( const Point3d& ptP, bool bMM)
|
||||
{
|
||||
// interfaccia in mm, il punto va bene così
|
||||
if ( bMM)
|
||||
return ptP ;
|
||||
// interfaccia in pollici, devo trasformarlo
|
||||
Point3d ptQ = ptP ;
|
||||
ptQ.x /= ONEINCH ;
|
||||
ptQ.y /= ONEINCH ;
|
||||
ptQ.z /= ONEINCH ;
|
||||
return ptQ ;
|
||||
}
|
||||
+1
-1
@@ -25,7 +25,7 @@ class __declspec( novtable) IUserObj
|
||||
virtual ~IUserObj( void) {}
|
||||
virtual IUserObj* Clone( void) const = 0 ;
|
||||
virtual const std::string& GetClassName( void) const = 0 ;
|
||||
virtual bool Dump( std::string& sOut, const char* szNewLine = "\n") const = 0 ;
|
||||
virtual bool Dump( std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const = 0 ;
|
||||
virtual bool SetOwner( int nId, IGeomDB* pGDB) = 0 ;
|
||||
virtual int GetOwner( void) const = 0 ;
|
||||
virtual IGeomDB* GetGeomDB( void) const = 0 ;
|
||||
|
||||
@@ -49,6 +49,12 @@ EIN_EXPORT BOOL __stdcall EgtGetMemoryInfo( wchar_t*& wsMem) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtFreeMemory( void* pMem) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtOutLog( const wchar_t* wsMsg) ;
|
||||
|
||||
// UiUnits
|
||||
EIN_EXPORT BOOL __stdcall EgtSetUiUnits( BOOL bMM) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtUiUnitsAreMM( void) ;
|
||||
EIN_EXPORT double __stdcall EgtFromUiUnits( double dVal) ;
|
||||
EIN_EXPORT double __stdcall EgtToUiUnits( double dVal) ;
|
||||
|
||||
// Context (GeomDB)
|
||||
EIN_EXPORT int __stdcall EgtInitContext( void) ;
|
||||
EIN_EXPORT int __stdcall EgtDeleteContext( int nGseCtx) ;
|
||||
|
||||
@@ -49,6 +49,12 @@ EXE_EXPORT bool ExeGetCpuInfo( std::string& sCpu) ;
|
||||
EXE_EXPORT bool ExeGetMemoryInfo( std::string& sMem) ;
|
||||
EXE_EXPORT bool ExeOutLog( const std::string& sMsg) ;
|
||||
|
||||
// UiUnits
|
||||
EXE_EXPORT bool ExeSetUiUnits( bool bMM) ;
|
||||
EXE_EXPORT bool ExeUiUnitsAreMM( void) ;
|
||||
EXE_EXPORT double ExeFromUiUnits( double dVal) ;
|
||||
EXE_EXPORT double ExeToUiUnits( double dVal) ;
|
||||
|
||||
// GeomDB
|
||||
EXE_EXPORT int ExeInitContext( void) ;
|
||||
EXE_EXPORT int ExeDeleteContext( int nGseCtx) ;
|
||||
@@ -517,4 +523,5 @@ EXE_EXPORT bool ExeUnProjectPoint( int nWinX, int nWinY, Point3d& ptP) ;
|
||||
|
||||
// Messages
|
||||
EXE_EXPORT bool ExeLoadMessages( const std::string& sMsgFilePath) ;
|
||||
EXE_EXPORT const std::string& ExeGetLanguage( void) ;
|
||||
EXE_EXPORT const std::string& ExeGetMsg( int nMsg) ;
|
||||
|
||||
Reference in New Issue
Block a user