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 
55  public: void AlignVisuals(std::vector<rendering::VisualPtr> _visuals,
56  const std::string &_axis, const std::string &_config,
57  const std::string &_target, bool _publish = true);
58 
61  private: void PublishVisualPose(rendering::VisualPtr _vis);
62 
67  private: void GetMinMax(std::vector<math::Vector3> _vertices,
68  math::Vector3 &_min, math::Vector3 &_max);
69 
75  private: void Transform(math::Box _bbox, math::Pose _worldPose,
76  std::vector<math::Vector3> &_vertices);
77 
79  private: friend class SingletonT<ModelAlign>;
80 
83  private: ModelAlignPrivate *dataPtr;
84  };
85  }
86 }
87 #endif
A gui tool for aligning models.
Definition: ModelAlign.hh:39
Encapsulates a position and rotation in three space.
Definition: Pose.hh:40
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:43
Mathematical representation of a box and related functions.
Definition: Box.hh:33
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:102
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48
Private data for the ModelAlign class.
Definition: ModelAlignPrivate.hh:37