##

BuildingModelManip.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 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_BUILDING_BUILDINGMODELMANIP_HH_
#define GAZEBO_GUI_BUILDING_BUILDINGMODELMANIP_HH_
#include <string>
#include <ignition/math/Color.hh>
#include "gazebo/gui/qt.h"
#include "gazebo/rendering/RenderTypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace gui
{
// Forward declare pointers.
class BuildingMaker;
// Forward declare private data.
class BuildingModelManipPrivate;
class GZ_GUI_VISIBLE BuildingModelManip : public QObject
{
Q_OBJECT
public: BuildingModelManip();
public: virtual ~BuildingModelManip();
public: std::string Name() const;
public: rendering::VisualPtr Visual() const;
public: double Transparency() const;
public: ignition::math::Color Color() const;
public: std::string Texture() const;
public: void SetName(const std::string &_name);
public: void SetVisual(const rendering::VisualPtr &_visual);
public: void SetMaker(BuildingMaker *_maker);
public: void SetPose(double _x, double _y, double _z,
double _roll, double _pitch, double _yaw);
public: void SetPosition(double _x, double _y, double _z);
public: void SetRotation(double _roll, double _pitch, double _yaw);
public: void SetSize(double _width, double _depth, double _height);
public: void SetColor(QColor _color);
public: void SetTexture(QString _texture);
public: void SetTransparency(float _transparency);
public: void SetVisible(bool _visible);
public: void SetLevel(const int _level);
public: int Level() const;
Q_SIGNALS: void ColorChanged(const ignition::math::Color &_color);
Q_SIGNALS: void TextureChanged(const std::string &_texture);
private slots: void OnPoseChanged(double _x, double _y, double _z,
double _roll, double _pitch, double _yaw);
private slots: void OnPoseOriginTransformed(double _x, double _y,
double _z, double _roll, double _pitch, double _yaw);
private slots: void OnPositionChanged(double _x, double _y, double _z);
private slots: void OnRotationChanged(double _roll, double _pitch,
double _yaw);
private slots: void OnSizeChanged(double _width, double _depth,
double _height);
private slots: void OnWidthChanged(double _width);
private slots: void OnHeightChanged(double _height);
private slots: void OnDepthChanged(double _depth);
private slots: void OnPosXChanged(double _posX);
private slots: void OnPosYChanged(double _posY);
private slots: void OnPosZChanged(double _posZ);
private slots: void OnYawChanged(double _yaw);
private slots: void OnLevelChanged(int _level);
private slots: void OnColorChanged(const ignition::math::Color &_color);
private slots: void OnTextureChanged(const std::string &_texture);
private slots: void OnTransparencyChanged(float _transparency);
private slots: void OnDeleted();
private: void OnChangeLevel(int _level);
private: std::unique_ptr<BuildingModelManipPrivate> dataPtr;
};
}
}
#endif
gazebo::gui::BuildingModelManip::Color
ignition::math::Color Color() const
Get the color of the manip.
gazebo::gui::BuildingModelManip::SetRotation
void SetRotation(double _roll, double _pitch, double _yaw)
Set the rotation of the manip.
gazebo::gui::BuildingModelManip::Transparency
double Transparency() const
Get the transparency of the manip.
gazebo::gui::BuildingModelManip::TextureChanged
void TextureChanged(const std::string &_texture)
Qt signal emitted when the manip's texture has changed from the 3D view.
gazebo::gui::BuildingModelManip::SetVisible
void SetVisible(bool _visible)
Set the visibility of the manip.
gazebo::gui::BuildingModelManip::Visual
rendering::VisualPtr Visual() const
Get the visual this manip manages.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::gui::BuildingModelManip::SetVisual
void SetVisual(const rendering::VisualPtr &_visual)
Set the visual this manip manages.
qt.h
gazebo::gui::Level
A convenient structure for storing level information.
Definition: EditorView.hh:45
gazebo::gui::BuildingModelManip::SetSize
void SetSize(double _width, double _depth, double _height)
Set the size of the manip.
gazebo::gui::BuildingModelManip::SetMaker
void SetMaker(BuildingMaker *_maker)
Set the maker that the manip is managed by.
gazebo::gui::BuildingModelManip::Level
int Level() const
Get the level for this manip.
system.hh
gazebo::gui::BuildingModelManip::SetTexture
void SetTexture(QString _texture)
Set the texture of the manip.
RenderTypes.hh
gazebo::gui::BuildingModelManip::Name
std::string Name() const
Get the name of the manip object.
gazebo::gui::BuildingModelManip::SetName
void SetName(const std::string &_name)
Set the name of the manip object.
gazebo::gui::BuildingModelManip::~BuildingModelManip
virtual ~BuildingModelManip()
Destructor.
gazebo::gui::BuildingModelManip::SetPose
void SetPose(double _x, double _y, double _z, double _roll, double _pitch, double _yaw)
Set the pose of the manip.
gazebo::gui::BuildingMaker
Create and manage 3D visuals of a building.
Definition: BuildingMaker.hh:48
gazebo::gui::BuildingModelManip::Texture
std::string Texture() const
Get the texture of the manip.
gazebo::gui::BuildingModelManip::SetColor
void SetColor(QColor _color)
Set the color of the manip.
gazebo::gui::BuildingModelManip
Manipulate a 3D visual associated to a 2D editor item.
Definition: BuildingModelManip.hh:43
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::BuildingModelManip::SetTransparency
void SetTransparency(float _transparency)
Set the transparency of the manip.
gazebo::gui::BuildingModelManip::SetPosition
void SetPosition(double _x, double _y, double _z)
Set the position of the manip.
gazebo::gui::BuildingModelManip::ColorChanged
void ColorChanged(const ignition::math::Color &_color)
Qt signal emitted when the manip's color has changed from the 3D view.
gazebo::rendering::VisualPtr
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:114
gazebo::gui::BuildingModelManip::BuildingModelManip
BuildingModelManip()
Constructor.
gazebo::gui::BuildingModelManip::SetLevel
void SetLevel(const int _level)
Set the level for this manip.