SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
10 #ifndef smtk_session_mesh_vtk_Geometry_h
11 #define smtk_session_mesh_vtk_Geometry_h
13 #include "smtk/session/mesh/Exports.h"
15 #include "smtk/extension/vtk/geometry/Geometry.h"
17 #include "smtk/geometry/Cache.h"
18 #include "smtk/geometry/Generator.h"
45 Geometry(
const std::shared_ptr<smtk::session::mesh::Resource>& parent);
48 smtk::geometry::Resource::Ptr resource()
const override;
49 void queryGeometry(
const smtk::resource::PersistentObject::Ptr& obj, CacheEntry& entry)
51 int dimension(
const smtk::resource::PersistentObject::Ptr& obj)
const override;
52 Purpose purpose(
const smtk::resource::PersistentObject::Ptr& obj)
const override;
53 void update()
const override;
55 void geometricBounds(
const DataType&,
BoundingBox& bbox)
const override;
57 std::weak_ptr<smtk::session::mesh::Resource> m_parent;
65 bool valid(
const Specification& in)
const override
68 return std::get<1>(in).
index() == backend.
index();
71 GeometryPtr operator()(
const Specification& in)
override
73 auto rsrc = std::dynamic_pointer_cast<smtk::session::mesh::Resource>(std::get<0>(in));
79 throw std::invalid_argument(
"Not a mesh session resource.");
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
Definition: Geometry.h:61
A base class for geometry providers that will supply VTK data.
Definition: Geometry.h:51
This class is used to indicate VTK exists as a consumer of renderable geometry.
Definition: Backend.h:38
Declare the class used to register geometry classes specific to a backend.
Definition: Generator.h:54
std::array< double, 6 > BoundingBox
A bounding box is represented as an array of 6 numbers, ordered xmin, xmax, ymin, ymax,...
Definition: Geometry.h:82
A VTK geometry provider for the mesh session.
Definition: Geometry.h:37
#define smtkTypeMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:128
A geometry provider that uses a cache to answer queries.
Definition: Cache.h:40
virtual index_t index() const
Index is a compile-time intrinsic of the derived backend. It is used for disambiguation of backends.
Definition: Backend.h:35
Purpose
The contextual purpose of geometry supplied by the provider.
Definition: Geometry.h:62
#define smtkSuperclassMacro(...)
Add a typedef to the superclass of this class.
Definition: SharedFromThis.h:147
std::unique_ptr< Geometry > GeometryPtr
Definition: PublicPointerDefs.h:332