EgtGraphics :

- Aggiunte due funzioni per ExportThreeJS.
This commit is contained in:
riccardo.elitropi
2022-08-22 17:46:43 +02:00
parent 5e317faba6
commit 8e986740fa
3 changed files with 27 additions and 1 deletions
+2
View File
@@ -106,6 +106,7 @@ class Scene : public IEGrScene
bool ZoomChange( double dCoeff) override ;
bool ZoomOnPoint( const Point3d& ptWin, double dCoeff) override ;
bool ZoomWin( const Point3d& ptWin1, const Point3d& ptWin2) override ;
void GetOrthoCamParam( double* pdWidth, double* pdHeight, double* pdNear, double* pdFar) const override ;
// ShowMode
bool SetShowMode( int nShowMode) override
{ if ( nShowMode != SM_WIREFRAME &&
@@ -142,6 +143,7 @@ class Scene : public IEGrScene
bool SetGridShow( bool bShowGrid, bool bShowFrame) override ;
bool SetGridGeo( double dSnapStep, int nMinLineSstep, int nMajLineSstep, int nExtSstep) override ;
bool SetGridColor( Color colMinLine, Color colMajLine) override ;
void GetGridParam( double* pdSnapStep, int* pnExtStep) const override ;
// Glob Frame
bool SetGlobFrameShow( bool bShow) override ;
// Direct
+15 -1
View File
@@ -418,4 +418,18 @@ Scene::ZoomWin( const Point3d& ptWin1, const Point3d& ptWin2)
// adatto le dimensioni a quelle della vista
return AdjustDimView( dHalfWidth, dHalfHeight) ;
}
}
//----------------------------------------------------------------------------
void
Scene::GetOrthoCamParam( double* pdWidth, double* pdHeight, double* pdNear, double* pdFar) const
{
if ( pdWidth != nullptr)
*pdWidth = m_dHalfWidth ;
if ( pdHeight != nullptr)
*pdHeight = m_dHalfHeight ;
if ( pdNear != nullptr)
*pdNear = m_dZNear ;
if ( pdFar != nullptr)
*pdFar = m_dZFar ;
}
+10
View File
@@ -170,4 +170,14 @@ Scene::DrawGrid( void)
glLineWidth( (float) GetLineWidth()) ;
return true ;
}
//----------------------------------------------------------------------------
void
Scene::GetGridParam(double* pdSnapStep, int* pnExtStep) const
{
if ( pdSnapStep != nullptr)
*pdSnapStep = m_dSnapStep ;
if ( pnExtStep != nullptr)
*pnExtStep = m_nExtSstep ;
}