ModelAlign.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-2015 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 _GAZEBO_MODEL_ALIGN_HH_
18 #define _GAZEBO_MODEL_ALIGN_HH_
19 
20 #include <string>
21 #include <vector>
22 
25 
27 
29 #include "gazebo/util/system.hh"
30 
31 namespace gazebo
32 {
33  namespace gui
34  {
35  class ModelAlignPrivate;
36 
39  class GAZEBO_VISIBLE ModelAlign : public SingletonT<ModelAlign>
40  {
42  private: ModelAlign();
43 
45  private: virtual ~ModelAlign();
46 
48  public: void Init();
49 
52  public: void Clear();
53 
60  public: void AlignVisuals(std::vector<rendering::VisualPtr> _visuals,
61  const std::string &_axis, const std::string &_config,
62  const std::string &_target, bool _publish = true);
63 
66  private: void PublishVisualPose(rendering::VisualPtr _vis);
67 
72  private: void GetMinMax(std::vector<math::Vector3> _vertices,
73  math::Vector3 &_min, math::Vector3 &_max);
74 
80  private: void Transform(math::Box _bbox, math::Pose _worldPose,
81  std::vector<math::Vector3> &_vertices);
82 
88  private: void SetHighlighted(rendering::VisualPtr _vis, bool _highlight);
89 
91  private: friend class SingletonT<ModelAlign>;
92 
95  private: ModelAlignPrivate *dataPtr;
96  };
97  }
98 }
99 #endif
A gui tool for aligning models.
Definition: ModelAlign.hh:39
Encapsulates a position and rotation in three space.
Definition: Pose.hh:37
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
Mathematical representation of a box and related functions.
Definition: Box.hh:35
Singleton template class.
Definition: SingletonT.hh:33
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:107
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66
Private data for the ModelAlign class.
Definition: ModelAlignPrivate.hh:37