-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// 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.
+// 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, or (at your option) any later version.
//
-// 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.
+// 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
+// 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
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME OBJECT : kernel of SALOME component
// File : VTKViewer_GeometryFilter.cxx
// Author :
-// Module : SALOME
-// $Header$
-//
+
#include "VTKViewer_AppendFilter.h"
#include <vtkCell.h>
#endif
#endif
-vtkCxxRevisionMacro(VTKViewer_AppendFilter, "$Revision$");
-vtkStandardNewMacro(VTKViewer_AppendFilter);
+vtkStandardNewMacro(VTKViewer_AppendFilter)
VTKViewer_AppendFilter
::VTKViewer_AppendFilter()
int
VTKViewer_AppendFilter
::RequestData(
- vtkInformation *request,
- vtkInformationVector **inputVector,
- vtkInformationVector *outputVector)
+ vtkInformation *request,
+ vtkInformationVector **inputVector,
+ vtkInformationVector *outputVector)
{
int aRet = 0;
if(GetSharedPointsDataSet())
inline
vtkIdType
GetOutputID(vtkIdType theInputID,
- vtkIdType theInputDataSetID,
- const VTKViewer_AppendFilter::TVectorIds& theRanges)
+ vtkIdType theInputDataSetID,
+ const VTKViewer_AppendFilter::TVectorIds& theRanges)
{
theInputID = theInputDataSetID = -1;
- vtkIdType aNbInputs = theRanges.size();
+ vtkIdType aNbInputs = (vtkIdType)theRanges.size(); //!< TODO: conversion from size_t to vtkIdType
if(theInputDataSetID < 0 || theInputDataSetID >= aNbInputs)
return -1;
vtkIdType
VTKViewer_AppendFilter
::GetPointOutputID(vtkIdType theInputID,
- vtkIdType theInputDataSetID)
+ vtkIdType theInputDataSetID)
{
if(GetSharedPointsDataSet())
return theInputID;
vtkIdType
VTKViewer_AppendFilter
::GetCellOutputID(vtkIdType theInputID,
- vtkIdType theInputDataSetID)
+ vtkIdType theInputDataSetID)
{
if(GetSharedPointsDataSet())
return theInputID;
{
void
GetInputID(vtkIdType theOutputID,
- vtkIdType& theInputID,
- vtkIdType& theStartID,
- vtkIdType& theInputDataSetID,
- const VTKViewer_AppendFilter::TVectorIds& theRanges)
+ vtkIdType& theInputID,
+ vtkIdType& theStartID,
+ vtkIdType& theInputDataSetID,
+ const VTKViewer_AppendFilter::TVectorIds& theRanges)
{
theInputID = theStartID = theInputDataSetID = -1;
return;
vtkIdType aStartId = 0;
- vtkIdType aNbInputs = theRanges.size();
+ vtkIdType aNbInputs = (vtkIdType)theRanges.size(); //!< TODO: conversion from size_t to vtkIdType
for(vtkIdType aDataSetId = 0; aDataSetId < aNbInputs; ++aDataSetId){
vtkIdType aRange = theRanges[aDataSetId];
if(aRange > theOutputID){
- theInputID = theOutputID - aStartId;
- theInputDataSetID = aDataSetId;
- theStartID = aStartId;
- break;
+ theInputID = theOutputID - aStartId;
+ theInputDataSetID = aDataSetId;
+ theStartID = aStartId;
+ break;
}
aStartId = aRange;
}
void
VTKViewer_AppendFilter
::GetPointInputID(vtkIdType theOutputID,
- vtkIdType& theInputID,
- vtkIdType& theStartID,
- vtkIdType& theInputDataSetID)
+ vtkIdType& theInputID,
+ vtkIdType& theStartID,
+ vtkIdType& theInputDataSetID)
{
if(GetSharedPointsDataSet()) {
theStartID = theInputDataSetID = 0;
}
::GetInputID(theOutputID,
- theInputID,
- theStartID,
- theInputDataSetID,
- myNodeRanges);
+ theInputID,
+ theStartID,
+ theInputDataSetID,
+ myNodeRanges);
}
void
VTKViewer_AppendFilter
::GetCellInputID(vtkIdType theOutputID,
- vtkIdType& theInputID,
- vtkIdType& theStartID,
- vtkIdType& theInputDataSetID)
+ vtkIdType& theInputID,
+ vtkIdType& theStartID,
+ vtkIdType& theInputDataSetID)
{
::GetInputID(theOutputID,
- theInputID,
- theStartID,
- theInputDataSetID,
- myCellRanges);
+ theInputID,
+ theStartID,
+ theInputDataSetID,
+ myCellRanges);
}
vtkInformationVector *outputVector)
{
int idx;
- vtkIdType numPts, numCells, newCellId, cellId;
- vtkCellData *cd;
+ vtkIdType numPts, numCells, cellId;
+ // vtkCellData *cd;
vtkIdList *ptIds;
vtkDataSet *ds;
int numInputs = this->GetNumberOfInputConnections(0);
if (ds != NULL) {
numCells = ds->GetNumberOfCells();
- cd = ds->GetCellData();
+ // cd = ds->GetCellData();
// copy cell and cell data
for (cellId=0; cellId<numCells; cellId++) {
ds->GetCellPoints(cellId, ptIds);
- newCellId = output->InsertNextCell(ds->GetCellType(cellId), ptIds);
+ output->InsertNextCell(ds->GetCellType(cellId), ptIds);
}
}
}