//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt 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. //============================================================================ #ifndef vtk_m_filter_Tube_h #define vtk_m_filter_Tube_h #include #include namespace vtkm { namespace filter { /// \brief generate tube geometry from polylines. /// Takes as input a set of polylines, radius, num sides and capping flag. /// Produces tubes along each polyline class Tube : public vtkm::filter::FilterDataSet { public: VTKM_CONT Tube(); VTKM_CONT void SetRadius(vtkm::FloatDefault r) { this->Radius = r; } VTKM_CONT void SetNumberOfSides(vtkm::Id n) { this->NumberOfSides = n; } VTKM_CONT void SetCapping(bool v) { this->Capping = v; } template VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input, vtkm::filter::PolicyBase policy); //Map a new field onto the resulting dataset after running the filter //this call is only valid after DoExecute is called template VTKM_CONT bool MapFieldOntoOutput(vtkm::cont::DataSet& result, const vtkm::cont::Field& field, vtkm::filter::PolicyBase policy); private: vtkm::worklet::Tube Worklet; vtkm::FloatDefault Radius; vtkm::Id NumberOfSides; bool Capping; }; } } // namespace vtkm::filter #ifndef vtk_m_filter_Tube_hxx #include #endif #endif // vtk_m_filter_Tube_h