Cloned library of VTK-5.0.0 with extra build files for internal package management.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

84 lines
2.6 KiB

/*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkUnstructuredGridToPolyDataFilter.cxx,v $
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkUnstructuredGridToPolyDataFilter.h"
#include "vtkInformation.h"
#include "vtkUnstructuredGrid.h"
vtkCxxRevisionMacro(vtkUnstructuredGridToPolyDataFilter, "$Revision: 1.10 $");
//----------------------------------------------------------------------------
vtkUnstructuredGridToPolyDataFilter::vtkUnstructuredGridToPolyDataFilter()
{
this->NumberOfRequiredInputs = 1;
this->SetNumberOfInputPorts(1);
}
//----------------------------------------------------------------------------
vtkUnstructuredGridToPolyDataFilter::~vtkUnstructuredGridToPolyDataFilter()
{
}
//----------------------------------------------------------------------------
// Specify the input data or filter.
void vtkUnstructuredGridToPolyDataFilter::SetInput(vtkUnstructuredGrid *input)
{
this->vtkProcessObject::SetNthInput(0, input);
}
//----------------------------------------------------------------------------
// Specify the input data or filter.
vtkUnstructuredGrid *vtkUnstructuredGridToPolyDataFilter::GetInput()
{
if (this->NumberOfInputs < 1)
{
return NULL;
}
return (vtkUnstructuredGrid *)(this->Inputs[0]);
}
//----------------------------------------------------------------------------
// Copy the update information across
void vtkUnstructuredGridToPolyDataFilter::ComputeInputUpdateExtents(vtkDataObject *output)
{
vtkDataObject *input = this->GetInput();
if (input)
{
this->vtkPolyDataSource::ComputeInputUpdateExtents(output);
input->RequestExactExtentOn();
}
}
//----------------------------------------------------------------------------
int
vtkUnstructuredGridToPolyDataFilter
::FillInputPortInformation(int port, vtkInformation* info)
{
if(!this->Superclass::FillInputPortInformation(port, info))
{
return 0;
}
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkUnstructuredGrid");
return 1;
}
//----------------------------------------------------------------------------
void vtkUnstructuredGridToPolyDataFilter::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
}