-// VISU OBJECT : interactive object for VISU entities implementation
+// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_VectorsAct.cxx
// Author : Laurent CORNABE with help of Nicolas REJNERI
// Module : VISU
-// $Header$
#include "VISU_VectorsAct.h"
#include "VISU_VectorsPL.hxx"
-#include "VTKViewer_PassThroughFilter.h"
+#include <SVTK_Actor.h>
// VTK Includes
#include <vtkObjectFactory.h>
#include <vtkDataSetMapper.h>
#include <vtkPolyDataMapper.h>
#include <vtkPolyData.h>
-
+#include <vtkPassThroughFilter.h>
+#include <VISU_UsedPointsFilter.hxx>
+#include <vtkUnstructuredGrid.h>
+#include <VISU_MergeFilter.hxx>
//----------------------------------------------------------------------------
vtkStandardNewMacro(VISU_VectorsAct);
VISU_VectorsAct
::SetPipeLine(VISU_PipeLine* thePipeLine)
{
- myVectorsPL = dynamic_cast<VISU_VectorsPL*>(thePipeLine);
- VISU_Actor::SetPipeLine(myVectorsPL);
- myVectorsPL->Delete();
+ myVectorsPL = dynamic_cast<VISU_VectorsPL*>( thePipeLine );
+
+ Superclass::SetPipeLine( myVectorsPL.GetPointer() );
}
VISU_VectorsAct
::SetTransform(VTKViewer_Transform* theTransform)
{
- Superclass::SetTransform(theTransform);
- myVectorsPL->SetTransform(theTransform);
+ // To perform only vector's specific action,
+ // there is nothing to be done for the Superclass
+ myVectorsPL->SetTransform( theTransform );
}
else if(vtkPolyDataMapper* aMapper = dynamic_cast<vtkPolyDataMapper*>(theMapper))
aMapper->SetInput(myPassFilter[3]->GetPolyDataOutput());
}
+
vtkLODActor::SetMapper(theMapper);
}
+
+
+//----------------------------------------------------------------------------
+unsigned long int
+VISU_VectorsAct
+::GetMemorySize()
+{
+ unsigned long int aSize = Superclass::GetMemorySize();
+
+ aSize += GetPipeLine()->GetMemorySize();
+
+ return aSize;
+}
+
+//----------------------------------------------------------------------------
+vtkDataSet*
+VISU_VectorsAct
+::GetValLabelsInput()
+{
+ VISU_VectorsPL* aPL = dynamic_cast<VISU_VectorsPL*>( GetPipeLine() );
+ if ( aPL )
+ {
+ return aPL->GetMergedInput();
+ /*VISU_UsedPointsFilter* aFilter = aPL->GetUsedPointsFilter();
+ vtkSmartPointer< VISU_MergeFilter > aFilter = aPL->myMergeFilter;
+ if ( aFilter )
+ {
+ aFilter->Update();
+ return aFilter->GetOutput();
+ }*/
+ }
+
+ return Superclass::GetValLabelsInput();
+}