]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
To make VTKViewer_UnscaledActor an infinite actor (with infinite bounds)
authorapo <apo@opencascade.com>
Fri, 19 Aug 2005 11:49:37 +0000 (11:49 +0000)
committerapo <apo@opencascade.com>
Fri, 19 Aug 2005 11:49:37 +0000 (11:49 +0000)
src/VTKViewer/VTKViewer_Trihedron.cxx
src/VTKViewer/VTKViewer_Trihedron.h

index 0ee7a5986ea8e9324d7573426ee562b62c4f2d48..387bbf83ebd0ea1c91d0c5b264349eaa4c7face8 100755 (executable)
 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);
index 2c42c86b2626d530ca81790386f685960eefe09b..9c3597ca54abb762169ff7a994fcde348c05ff51 100755 (executable)
@@ -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.*/