From cafc611cd62dd98933bc31975531b3cc93f74d20 Mon Sep 17 00:00:00 2001 From: skv Date: Thu, 3 Jul 2014 17:51:34 +0400 Subject: [PATCH] Porting on dev version of OCCT from 26.06.2014 --- src/OCCViewer/OCCViewer_Trihedron.cxx | 16 ++++++---------- src/OCCViewer/OCCViewer_Trihedron.h | 4 ++-- 2 files changed, 8 insertions(+), 12 deletions(-) mode change 100755 => 100644 src/OCCViewer/OCCViewer_Trihedron.cxx 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(); -- 2.39.2