2016-02-09 13:59:26 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2016-02-09 13:59:26 +00:00
|
|
|
// 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.
|
|
|
|
//============================================================================
|
2016-06-02 21:43:30 +00:00
|
|
|
#ifndef vtk_m_rendering_Actor_h
|
|
|
|
#define vtk_m_rendering_Actor_h
|
2016-02-09 13:59:26 +00:00
|
|
|
|
2016-08-31 23:28:41 +00:00
|
|
|
#include <vtkm/rendering/vtkm_rendering_export.h>
|
|
|
|
|
2016-06-02 19:04:01 +00:00
|
|
|
#include <vtkm/rendering/Camera.h>
|
2016-08-31 23:28:41 +00:00
|
|
|
#include <vtkm/rendering/Canvas.h>
|
2016-06-02 19:41:14 +00:00
|
|
|
#include <vtkm/rendering/Mapper.h>
|
2016-08-31 23:28:41 +00:00
|
|
|
|
2016-09-12 17:08:06 +00:00
|
|
|
#include <memory>
|
2016-02-09 13:59:26 +00:00
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace rendering
|
|
|
|
{
|
2016-02-09 13:59:26 +00:00
|
|
|
|
2016-10-19 18:09:15 +00:00
|
|
|
class VTKM_RENDERING_EXPORT Actor
|
2016-02-09 13:59:26 +00:00
|
|
|
{
|
|
|
|
public:
|
2022-01-04 22:38:18 +00:00
|
|
|
Actor(const vtkm::cont::UnknownCellSet& cells,
|
2018-01-18 18:55:15 +00:00
|
|
|
const vtkm::cont::CoordinateSystem& coordinates,
|
|
|
|
const vtkm::cont::Field& scalarField);
|
|
|
|
|
2022-01-04 22:38:18 +00:00
|
|
|
Actor(const vtkm::cont::UnknownCellSet& cells,
|
2017-05-26 17:53:28 +00:00
|
|
|
const vtkm::cont::CoordinateSystem& coordinates,
|
2017-05-18 14:29:41 +00:00
|
|
|
const vtkm::cont::Field& scalarField,
|
2018-01-18 18:55:15 +00:00
|
|
|
const vtkm::cont::ColorTable& colorTable);
|
2016-08-31 23:28:41 +00:00
|
|
|
|
2022-01-04 22:38:18 +00:00
|
|
|
Actor(const vtkm::cont::UnknownCellSet& cells,
|
2017-07-28 17:31:19 +00:00
|
|
|
const vtkm::cont::CoordinateSystem& coordinates,
|
|
|
|
const vtkm::cont::Field& scalarField,
|
|
|
|
const vtkm::rendering::Color& color);
|
|
|
|
|
2023-06-01 17:28:49 +00:00
|
|
|
// Disable copying due to unique_ptr;
|
|
|
|
Actor(const Actor&) = delete;
|
|
|
|
Actor& operator=(const Actor&) = delete;
|
|
|
|
|
|
|
|
Actor(Actor&&) noexcept;
|
|
|
|
Actor& operator=(Actor&&) noexcept;
|
|
|
|
~Actor();
|
|
|
|
|
2017-05-26 17:53:28 +00:00
|
|
|
void Render(vtkm::rendering::Mapper& mapper,
|
|
|
|
vtkm::rendering::Canvas& canvas,
|
2017-05-18 14:29:41 +00:00
|
|
|
const vtkm::rendering::Camera& camera) const;
|
2016-08-31 23:28:41 +00:00
|
|
|
|
2022-01-04 22:38:18 +00:00
|
|
|
const vtkm::cont::UnknownCellSet& GetCells() const;
|
2016-08-31 23:28:41 +00:00
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
const vtkm::cont::CoordinateSystem& GetCoordinates() const;
|
2016-08-31 23:28:41 +00:00
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
const vtkm::cont::Field& GetScalarField() const;
|
2016-08-31 23:28:41 +00:00
|
|
|
|
2018-01-18 18:55:15 +00:00
|
|
|
const vtkm::cont::ColorTable& GetColorTable() const;
|
2016-08-31 23:28:41 +00:00
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
const vtkm::Range& GetScalarRange() const;
|
2016-08-31 23:28:41 +00:00
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
const vtkm::Bounds& GetSpatialBounds() const;
|
2016-08-31 23:28:41 +00:00
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
void SetScalarRange(const vtkm::Range& scalarRange);
|
2017-02-09 23:38:40 +00:00
|
|
|
|
2016-08-31 23:28:41 +00:00
|
|
|
private:
|
|
|
|
struct InternalsType;
|
2023-06-01 17:28:49 +00:00
|
|
|
std::unique_ptr<InternalsType> Internals;
|
2017-07-28 17:31:19 +00:00
|
|
|
|
|
|
|
void Init(const vtkm::cont::CoordinateSystem& coordinates, const vtkm::cont::Field& scalarField);
|
2016-02-09 13:59:26 +00:00
|
|
|
};
|
2017-05-18 14:29:41 +00:00
|
|
|
}
|
|
|
|
} //namespace vtkm::rendering
|
2016-02-09 13:59:26 +00:00
|
|
|
|
2016-06-02 21:43:30 +00:00
|
|
|
#endif //vtk_m_rendering_Actor_h
|