diff --git a/EgtGraphics.rc b/EgtGraphics.rc index 619d357..b4afa94 100644 Binary files a/EgtGraphics.rc and b/EgtGraphics.rc differ diff --git a/SceneBasic.cpp b/SceneBasic.cpp index 8b97ac9..1843fbd 100644 --- a/SceneBasic.cpp +++ b/SceneBasic.cpp @@ -437,8 +437,8 @@ Scene::CalcDimViewFromExtView( void) // ricavo le dimensioni const double COEFF = 1.05 ; - double dHalfWidth = COEFF * max( fabs( ptMin.x), fabs( ptMax.x)) ; - double dHalfHeight = COEFF * max( fabs( ptMin.y), fabs( ptMax.y)) ; + double dHalfWidth = COEFF * max( abs( ptMin.x), abs( ptMax.x)) ; + double dHalfHeight = COEFF * max( abs( ptMin.y), abs( ptMax.y)) ; // adatto le dimensioni a quelle della vista return AdjustDimView( dHalfWidth, dHalfHeight) ; diff --git a/SceneCamera.cpp b/SceneCamera.cpp index 90bd36c..bd8d545 100644 --- a/SceneCamera.cpp +++ b/SceneCamera.cpp @@ -133,13 +133,13 @@ Scene::GetCamera( double* pdAngVertDeg, double* pdAngOrizzDeg, double* pdDist) c double dAngVertDeg ; double dAngOrizzDeg ; m_vtDirCamera.ToSpherical( nullptr, &dAngVertDeg, &dAngOrizzDeg) ; - if ( fabs( dAngVertDeg) < EPS_ANG_SMALL) { + if ( abs( dAngVertDeg) < EPS_ANG_SMALL) { if ( m_bUpOk) (-m_vtUp).ToSpherical( nullptr, nullptr, &dAngOrizzDeg) ; else dAngOrizzDeg = -90 ; } - else if ( fabs( dAngVertDeg - ANG_STRAIGHT) < EPS_ANG_SMALL) { + else if ( abs( dAngVertDeg - ANG_STRAIGHT) < EPS_ANG_SMALL) { if ( m_bUpOk) (m_vtUp).ToSpherical( nullptr, nullptr, &dAngOrizzDeg) ; else @@ -392,8 +392,8 @@ Scene::ZoomWin( const Point3d& ptWin1, const Point3d& ptWin2) SetCenter( ptNewCen) ; // imposto il nuovo zoom - double dHalfWidth = 0.5 * fabs( ptView1.x - ptView2.x) ; - double dHalfHeight = 0.5 * fabs( ptView1.y - ptView2.y) ; + double dHalfWidth = 0.5 * abs( ptView1.x - ptView2.x) ; + double dHalfHeight = 0.5 * abs( ptView1.y - ptView2.y) ; // adatto le dimensioni a quelle della vista return AdjustDimView( dHalfWidth, dHalfHeight) ; diff --git a/SceneGeom.cpp b/SceneGeom.cpp index af9c251..243ccc6 100644 --- a/SceneGeom.cpp +++ b/SceneGeom.cpp @@ -281,7 +281,7 @@ Scene::DrawGeoObj( const IGdbIterator& iIter, int nPass, const MdStMkCol& siObj) double dTh ; Vector3d vtExtr ; if ( pCurve->GetExtrusion( vtExtr) && ! vtExtr.IsSmall() && - pCurve->GetThickness( dTh) && fabs( dTh) > EPS_SMALL) { + pCurve->GetThickness( dTh) && abs( dTh) > EPS_SMALL) { // segmenti di raccordo PNTVECTOR vPnt ; bool bDense = ( nGeoType == CRV_ARC || nGeoType == CRV_BEZ) ; diff --git a/SceneGrid.cpp b/SceneGrid.cpp index 4d89e34..a3c2cbf 100644 --- a/SceneGrid.cpp +++ b/SceneGrid.cpp @@ -33,7 +33,7 @@ bool Scene::SetGridGeo( double dSnapStep, int nMinLineSstep, int nMajLineSstep, int nExtSstep) { const double MIN_SNAP_STEP = 0.1 ; - m_dSnapStep = std::max( fabs( dSnapStep), MIN_SNAP_STEP) ; + m_dSnapStep = max( abs( dSnapStep), MIN_SNAP_STEP) ; m_nMinLineSstep = abs( nMinLineSstep) ; m_nMajLineSstep = abs( nMajLineSstep) ; m_nExtSstep = abs( nExtSstep) ; @@ -127,6 +127,10 @@ Scene::DrawGrid( void) glColor3f( LIME.GetRed(), LIME.GetGreen(), LIME.GetBlue()) ; glVertex3f( 0, 0, Z_DOWN) ; glVertex3f( 0, dExt, Z_DOWN) ; + // asse Z+ + glColor3f( BLUE.GetRed(), BLUE.GetGreen(), BLUE.GetBlue()) ; + glVertex3f( 0, 0, Z_DOWN) ; + glVertex3f( 0, 0, float( m_nMajLineSstep * m_dSnapStep)) ; // se richiesta griglia, assi X- e Y- if ( m_bShowGrid) { glColor3f( m_colMajLine.GetRed(), m_colMajLine.GetGreen(), m_colMajLine.GetBlue()) ; diff --git a/SceneSelect.cpp b/SceneSelect.cpp index 2837c08..d476d85 100644 --- a/SceneSelect.cpp +++ b/SceneSelect.cpp @@ -319,7 +319,7 @@ Scene::GetPointFromSelect( int nSelId, const Point3d& ptView, Point3d& ptSel, in double dTh ; Vector3d vtExtr ; if ( pCrv->GetExtrusion( vtExtr) && ! vtExtr.IsSmall() && - pCrv->GetThickness( dTh) && fabs( dTh) > EPS_SMALL) { + pCrv->GetThickness( dTh) && abs( dTh) > EPS_SMALL) { vtExtr *= dTh ; vtExtr.ToGlob( frEnt) ; // correggo il punto di riferimento del contrario dell'estrusione diff --git a/SceneSnap.cpp b/SceneSnap.cpp index f12aa7b..f71a72a 100644 --- a/SceneSnap.cpp +++ b/SceneSnap.cpp @@ -90,7 +90,7 @@ Scene::GetGridSnapPointZ( bool bSketch, const Point3d& ptWin, const Point3d& ptG // determino l'intersezione della linea di mira con il piano di elevazione double dDenom = vtLine * vtNorm ; - if ( fabs( dDenom) < COS_ORTO_ANG_SMALL) + if ( abs( dDenom) < COS_ORTO_ANG_SMALL) return false ; double dU = ( ( ptGrid - ptLine) * vtNorm) / dDenom ; Point3d ptNear = ptLine + dU * vtLine ; @@ -119,7 +119,7 @@ Scene::FindGridSnapPoint( bool bSketch, const Point3d& ptWin) // determino l'intersezione di questa linea con il piano della griglia double dDenom = vtLine * frGrid.VersZ() ; - if ( fabs( dDenom) < COS_ORTO_ANG_SMALL) + if ( abs( dDenom) < COS_ORTO_ANG_SMALL) return false ; double dU = ( ( frGrid.Orig() - ptLine) * frGrid.VersZ()) / dDenom ; m_ptLastSnapPnt = ptLine + dU * vtLine ; @@ -499,7 +499,7 @@ Scene::AdjustForCurveExtr( const Point3d& ptWin, const Frame3d& frEnt, const ICu double dTh ; Vector3d vtExtr ; if ( ! pCrv->GetExtrusion( vtExtr) || vtExtr.IsSmall() || - ! pCrv->GetThickness( dTh) || fabs( dTh) < EPS_SMALL) + ! pCrv->GetThickness( dTh) || abs( dTh) < EPS_SMALL) return false ; vtExtr *= dTh ; @@ -1005,7 +1005,7 @@ Scene::GetPlaneSnapPoint( const Point3d& ptWin, const Plane3d& plPlane, Point3d& // determino l'intersezione di questa linea con il piano double dDenom = vtLine * plPlane.GetVersN() ; - if ( fabs( dDenom) < COS_ORTO_ANG_ZERO) + if ( abs( dDenom) < COS_ORTO_ANG_ZERO) return false ; double dU = ( plPlane.GetDist() - ( ptLine - ORIG) * plPlane.GetVersN()) / dDenom ; ptSel = ptLine + dU * vtLine ;