From: apo Date: Fri, 19 Aug 2005 11:49:37 +0000 (+0000) Subject: To make VTKViewer_UnscaledActor an infinite actor (with infinite bounds) X-Git-Tag: T_3_0_2a1~31 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8feb2513fc80caff0238c2ab0ae471e58db95fb2;p=modules%2Fgui.git To make VTKViewer_UnscaledActor an infinite actor (with infinite bounds) --- diff --git a/src/VTKViewer/VTKViewer_Trihedron.cxx b/src/VTKViewer/VTKViewer_Trihedron.cxx index 0ee7a5986..387bbf83e 100755 --- a/src/VTKViewer/VTKViewer_Trihedron.cxx +++ b/src/VTKViewer/VTKViewer_Trihedron.cxx @@ -20,7 +20,26 @@ vtkStandardNewMacro(VTKViewer_UnScaledActor); /*!Constructor*/ -VTKViewer_UnScaledActor::VTKViewer_UnScaledActor() {/*!Do nothing*/} +VTKViewer_UnScaledActor::VTKViewer_UnScaledActor() +{ + Bounds[0] = Bounds[2] = Bounds[4] = VTK_LARGE_FLOAT; + Bounds[1] = Bounds[3] = Bounds[5] = -VTK_LARGE_FLOAT; +} + +float* +VTKViewer_UnScaledActor +::GetBounds() +{ + return Bounds; +} + +/*! Sets \a mySize= \a theSize variable. + * \param theSize - integer size + */ +void VTKViewer_UnScaledActor::SetSize(int theSize) +{ + mySize = theSize; +} /*!This causes the actor to be rendered. * Set new scale for actor. @@ -48,13 +67,6 @@ void VTKViewer_UnScaledActor::Render(vtkRenderer *theRenderer) vtkFollower::Render(theRenderer); } -/*! Sets \a mySize= \a theSize variable. - * \param theSize - integer size - */ -void VTKViewer_UnScaledActor::SetSize(int theSize){ - mySize = theSize; -} - vtkStandardNewMacro(VTKViewer_LineActor); vtkCxxSetObjectMacro(VTKViewer_LineActor,LabelActor,VTKViewer_UnScaledActor); diff --git a/src/VTKViewer/VTKViewer_Trihedron.h b/src/VTKViewer/VTKViewer_Trihedron.h index 2c42c86b2..9c3597ca5 100755 --- a/src/VTKViewer/VTKViewer_Trihedron.h +++ b/src/VTKViewer/VTKViewer_Trihedron.h @@ -34,9 +34,10 @@ public: /*!Create new instance of VTKViewer_UnScaledActor.*/ static VTKViewer_UnScaledActor *New(); + virtual float* GetBounds(); virtual void SetSize(int theSize); virtual void Render(vtkRenderer *theRenderer); - + protected: VTKViewer_UnScaledActor(); /*!Destructor. Do nothing.*/