From: skv Date: Thu, 3 Jul 2014 13:51:34 +0000 (+0400) Subject: Porting on dev version of OCCT from 26.06.2014 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cafc611cd62dd98933bc31975531b3cc93f74d20;p=modules%2Fgui.git Porting on dev version of OCCT from 26.06.2014 --- diff --git a/src/OCCViewer/OCCViewer_Trihedron.cxx b/src/OCCViewer/OCCViewer_Trihedron.cxx old mode 100755 new mode 100644 index 6ffb84132..fb156ad1a --- a/src/OCCViewer/OCCViewer_Trihedron.cxx +++ b/src/OCCViewer/OCCViewer_Trihedron.cxx @@ -69,17 +69,13 @@ OCCViewer_Trihedron::~OCCViewer_Trihedron() /*! * Sets the bounding box (MinMax values). */ -void OCCViewer_Trihedron::bounds( Graphic3d_CBounds& aMinMax ) const +void OCCViewer_Trihedron::bounds( Graphic3d_BndBox4f& theMinMax ) const { - Standard_Real aXMin = -1, aYMin = -1, aZMin = -1; - Standard_Real aXMax = 1, aYMax = 1, aZMax = 1; - - if( aMinMax.XMin > aXMin ) aMinMax.XMin = aXMin; - if( aMinMax.YMin > aYMin ) aMinMax.YMin = aYMin; - if( aMinMax.ZMin > aZMin ) aMinMax.ZMin = aZMin; - if( aMinMax.XMax < aXMax ) aMinMax.XMax = aXMax; - if( aMinMax.YMax < aYMax ) aMinMax.YMax = aYMax; - if( aMinMax.ZMax < aZMax ) aMinMax.ZMax = aZMax; + Graphic3d_Vec4 aMinPt (-1.f, -1.f, -1.f, 1.f); + Graphic3d_Vec4 aMaxPt (1.f, 1.f, 1.f, 1.f); + + theMinMax.Add (aMinPt); + theMinMax.Add (aMaxPt); } /*! diff --git a/src/OCCViewer/OCCViewer_Trihedron.h b/src/OCCViewer/OCCViewer_Trihedron.h index 6cddc578d..28e1e3edb 100644 --- a/src/OCCViewer/OCCViewer_Trihedron.h +++ b/src/OCCViewer/OCCViewer_Trihedron.h @@ -23,7 +23,7 @@ #include "OCCViewer.h" #include -#include +#include #include /*! @@ -43,7 +43,7 @@ public: virtual void ComputeSelection( const Handle( SelectMgr_Selection )&, const Standard_Integer ); - virtual void bounds( Graphic3d_CBounds& ) const; + virtual void bounds( Graphic3d_BndBox4f& ) const; virtual void display();