##

ModelAlign.hh
Go to the documentation of this file.
/*
* Copyright (C) 2014 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GAZEBO_GUI_MODELALIGN_HH_
#define GAZEBO_GUI_MODELALIGN_HH_
#include <memory>
#include <string>
#include <vector>
#include <ignition/math/Box.hh>
#include <ignition/math/Pose3.hh>
#include <ignition/math/Vector3.hh>
#include "gazebo/common/KeyEvent.hh"
#include "gazebo/common/MouseEvent.hh"
#include "gazebo/common/SingletonT.hh"
#include "gazebo/rendering/RenderTypes.hh"
#include "gazebo/util/system.hh"
GZ_SINGLETON_DECLARE(GZ_GUI_VISIBLE, gazebo, gui, ModelAlign)
namespace gazebo
{
namespace gui
{
class ModelAlignPrivate;
class GZ_GUI_VISIBLE ModelAlign : public SingletonT<ModelAlign>
{
private: ModelAlign();
private: virtual ~ModelAlign();
public: void Init();
public: void Clear();
public: void AlignVisuals(std::vector<rendering::VisualPtr> _visuals,
const std::string &_axis, const std::string &_config,
const std::string &_target, const bool _publish = true,
const bool _inverted = false);
private: void MinMax(
const std::vector<ignition::math::Vector3d> &_vertices,
ignition::math::Vector3d &_min,
ignition::math::Vector3d &_max);
private: void Transform(const ignition::math::Box &_bbox,
const ignition::math::Pose3d &_worldPose,
std::vector<ignition::math::Vector3d> &_vertices);
private: void SetHighlighted(const rendering::VisualPtr &_vis,
const bool _highlight);
private: friend class SingletonT<ModelAlign>;
private: std::unique_ptr<ModelAlignPrivate> dataPtr;
};
}
}
#endif
gui
gui
Definition: ModelAlign.hh:37
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
SingletonT
Singleton template class.
Definition: SingletonT.hh:33
system.hh
RenderTypes.hh
gazebo::msgs::Init
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
KeyEvent.hh
gazebo::rendering::VisualPtr
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:114
GZ_SINGLETON_DECLARE
#define GZ_SINGLETON_DECLARE(visibility, n1, n2, singletonType)
Helper to declare typed SingletonT.
Definition: SingletonT.hh:61
gazebo
gazebo
Definition: ModelAlign.hh:37
SingletonT.hh
MouseEvent.hh
gazebo::gui::ModelAlign
A gui tool for aligning models.
Definition: ModelAlign.hh:47