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.
|
|
|
|
//============================================================================
|
|
|
|
#ifndef vtk_m_rendering_Scene_h
|
|
|
|
#define vtk_m_rendering_Scene_h
|
|
|
|
|
2016-08-31 23:28:41 +00:00
|
|
|
#include <vtkm/rendering/vtkm_rendering_export.h>
|
|
|
|
|
2016-06-02 21:43:30 +00:00
|
|
|
#include <vtkm/rendering/Actor.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>
|
|
|
|
#include <vtkm/rendering/Mapper.h>
|
2016-02-09 13:59:26 +00:00
|
|
|
|
2016-09-12 17:08:06 +00:00
|
|
|
#include <memory>
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace rendering
|
|
|
|
{
|
2016-02-09 13:59:26 +00:00
|
|
|
|
2023-07-27 20:07:19 +00:00
|
|
|
/// @brief A simple collection of things to render.
|
|
|
|
///
|
|
|
|
/// The `Scene` is a simple collection of `Actor` objects.
|
2016-10-19 18:09:15 +00:00
|
|
|
class VTKM_RENDERING_EXPORT Scene
|
2016-02-09 13:59:26 +00:00
|
|
|
{
|
|
|
|
public:
|
2016-08-31 23:28:41 +00:00
|
|
|
Scene();
|
2016-05-26 14:38:55 +00:00
|
|
|
|
2023-07-27 20:07:19 +00:00
|
|
|
/// @brief Add an `Actor` to the scene.
|
2023-06-02 16:36:39 +00:00
|
|
|
void AddActor(vtkm::rendering::Actor actor);
|
2016-02-09 13:59:26 +00:00
|
|
|
|
2023-07-27 20:07:19 +00:00
|
|
|
/// @brief Get one of the `Actor`s from the scene.
|
2017-05-18 14:29:41 +00:00
|
|
|
const vtkm::rendering::Actor& GetActor(vtkm::IdComponent index) const;
|
2016-04-07 23:40:04 +00:00
|
|
|
|
2023-07-27 20:07:19 +00:00
|
|
|
/// @brief Get the number of `Actor`s in the scene.
|
2016-08-31 23:28:41 +00:00
|
|
|
vtkm::IdComponent GetNumberOfActors() const;
|
2016-04-15 19:24:23 +00:00
|
|
|
|
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-06-08 23:20:25 +00:00
|
|
|
|
2023-07-27 20:07:19 +00:00
|
|
|
/// @brief The computed spatial bounds of combined data from all contained `Actor`s.
|
2016-08-31 23:28:41 +00:00
|
|
|
vtkm::Bounds GetSpatialBounds() const;
|
2016-04-15 19:24:23 +00:00
|
|
|
|
2016-05-26 14:38:55 +00:00
|
|
|
private:
|
2016-08-31 23:28:41 +00:00
|
|
|
struct InternalsType;
|
2016-09-12 17:08:06 +00:00
|
|
|
std::shared_ptr<InternalsType> Internals;
|
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
|
|
|
|
|
|
|
#endif //vtk_m_rendering_Scene_h
|