Gazebo Rendering

API Reference

6.6.3
gz/rendering/BoundingBox.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #ifndef IGNITION_RENDERING_BOUNDINGBOX_HH_
18 #define IGNITION_RENDERING_BOUNDINGBOX_HH_
19 
20 #include <cstdint>
21 #include <memory>
22 #include <utility>
23 #include <vector>
24 
25 #include <ignition/common/SuppressWarning.hh>
26 #include <ignition/math/Vector3.hh>
27 #include <ignition/math/Quaternion.hh>
28 
31 
32 namespace ignition
33 {
34 namespace rendering
35 {
36 inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
37  class BoundingBoxPrivate;
38 
41  class IGNITION_RENDERING_VISIBLE BoundingBox
42  {
44  public: BoundingBox();
45 
48  public: BoundingBox(const BoundingBox &_box);
49 
52  public: BoundingBox(BoundingBox &&_box) noexcept;
53 
55  public: virtual ~BoundingBox();
56 
60  public: BoundingBox &operator=(BoundingBox &&_box);
61 
65  public: BoundingBox &operator=(const BoundingBox &_box);
66 
70  public: const math::Vector3d &Center() const;
71 
76  public: void SetCenter(const math::Vector3d &_center);
77 
81  public: const math::Vector3d &Size() const;
82 
86  public: void SetSize(const math::Vector3d &_size);
87 
90  public: const math::Quaterniond &Orientation() const;
91 
95  public: void SetOrientation(const math::Quaterniond &_orientation);
96 
107  public: const std::vector<math::Vector3d> &Vertices3D() const;
108 
111  public: uint32_t Label() const;
112 
115  public: void SetLabel(uint32_t _label);
116 
120  private: std::unique_ptr<BoundingBoxPrivate> dataPtr;
122  };
123 }
124 }
125 }
126 #endif
const std::vector< math::Vector3d > & Vertices3D() const
Get the vertices of the 3D bounding box representation.
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
2D or 3D Bounding box. It stores the position / orientation / size info of the box and its label
Definition: gz/rendering/BoundingBox.hh:41
STL class.
uint32_t Label() const
Get the label of the bounding box.
BoundingBox & operator=(BoundingBox &&_box)
Move assignment operator.
void SetOrientation(const math::Quaterniond &_orientation)
Set the orientation of the bounding box.
const math::Vector3d & Size() const
Get the size of the bounding box.
virtual ~BoundingBox()
Destructor.
const math::Quaterniond & Orientation() const
Get the orientation of the bounding box.
void SetSize(const math::Vector3d &_size)
Set the size of the bounding box.
const math::Vector3d & Center() const
Get the center of the bounding box.
void SetLabel(uint32_t _label)
Set the label of the bounding box.
void SetCenter(const math::Vector3d &_center)
Set the center of the bounding box.
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING