SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
BoundingBox.h
1 //=========================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //=========================================================================
10 
11 #ifndef smtk_geometry_BoundingBox_h
12 #define smtk_geometry_BoundingBox_h
13 
14 #include "smtk/CoreExports.h"
15 
16 #include "smtk/resource/PersistentObject.h"
17 #include "smtk/resource/query/DerivedFrom.h"
18 #include "smtk/resource/query/Query.h"
19 
20 #include <array>
21 
22 namespace smtk
23 {
24 namespace geometry
25 {
26 
30 struct SMTKCORE_EXPORT BoundingBox
31  : public smtk::resource::query::DerivedFrom<BoundingBox, smtk::resource::query::Query>
32 {
33  virtual std::array<double, 6> operator()(const smtk::resource::PersistentObject::Ptr&) const = 0;
34 };
35 
36 inline std::array<double, 6> BoundingBox::operator()(
37  const smtk::resource::PersistentObject::Ptr&) const
38 {
39  return { { 1., 0., 1., 0., 1., 0. } };
40 }
41 } // namespace geometry
42 } // namespace smtk
43 
44 #endif
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
smtk::geometry::BoundingBox
An API for computing the bounding box for a geometric resource or component.
Definition: BoundingBox.h:30
smtk::resource::query::DerivedFrom
Query functors can be registered to Resources as the implementation of a base (and often abstract) Qu...
Definition: DerivedFrom.h:34