##

Grid.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.
*
*/
// This was leveraged from rviz.
#ifndef GAZEBO_RENDERING_GRID_HH_
#define GAZEBO_RENDERING_GRID_HH_
#include <memory>
#include <string>
#include <vector>
#include <ignition/math/Color.hh>
#include "gazebo/util/system.hh"
namespace Ogre
{
class SceneNode;
class Any;
}
namespace gazebo
{
namespace common
{
class Color;
}
namespace rendering
{
class Scene;
// Forward declare provate data
class GridPrivate;
class GZ_RENDERING_VISIBLE Grid
{
public: Grid(Scene *_scene, const uint32_t _cellCount,
const float _cellLength, const float _lineWidth,
const common::Color &_color) GAZEBO_DEPRECATED(9.0);
public: Grid(Scene *_scene, const uint32_t _cellCount,
const float _cellLength, const ignition::math::Color &_color);
public: ~Grid();
public: void Init();
public: void Enable(const bool _enable);
public: VisualPtr GridVisual() const;
public: void SetUserData(const Ogre::Any &_data);
public: void SetColor(const common::Color &_color) GAZEBO_DEPRECATED(9.0);
public: void SetColor(const ignition::math::Color &_color);
public: ignition::math::Color Color() const;
public: void SetCellCount(const uint32_t _count);
public: uint32_t CellCount() const;
public: void SetCellLength(const float _len);
public: float CellLength() const;
public: void SetLineWidth(const float _width) GAZEBO_DEPRECATED(9.0);
public: float LineWidth() const GAZEBO_DEPRECATED(9.0);
public: void SetHeight(const uint32_t _count);
public: uint32_t Height() const;
public: void SetHeightOffset(const double _offset);
public: double HeightOffset() const;
private: void Create();
private: std::unique_ptr<GridPrivate> dataPtr;
};
}
}
#endif
gazebo::rendering::Grid::Enable
void Enable(const bool _enable)
Enable or disable the grid.
gazebo::rendering::Grid::Init
void Init()
Initialize the grid.
Ogre
Definition: JointMaker.hh:39
gazebo::rendering::Scene
Representation of an entire scene graph.
Definition: Scene.hh:101
gazebo::rendering::Grid::LineWidth
float LineWidth() const GAZEBO_DEPRECATED(9.0)
Get the width of the grid line.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::rendering::Grid::SetCellLength
void SetCellLength(const float _len)
Set the cell length.
gazebo::rendering::Grid::HeightOffset
double HeightOffset() const
Get the height offset.
common
common
Definition: FuelModelDatabase.hh:37
system.hh
gazebo::rendering::Grid::SetLineWidth
void SetLineWidth(const float _width) GAZEBO_DEPRECATED(9.0)
Set the line width.
gazebo::rendering::Grid::SetUserData
void SetUserData(const Ogre::Any &_data)
Sets user data on all ogre objects we own.
gazebo::rendering::Grid::Grid
Grid(Scene *_scene, const uint32_t _cellCount, const float _cellLength, const float _lineWidth, const common::Color &_color) GAZEBO_DEPRECATED(9.0)
Constructor.
gazebo::rendering::Grid::SetCellCount
void SetCellCount(const uint32_t _count)
Set the number of cells.
gazebo::rendering::Grid::CellCount
uint32_t CellCount() const
Get the number of cells.
gazebo::rendering::Grid::CellLength
float CellLength() const
Get the cell length.
gazebo::rendering::Grid
Displays a grid of cells, drawn with lines.
Definition: Grid.hh:58
rendering
rendering
Definition: RenderEngine.hh:31
gazebo::rendering::Grid::Color
ignition::math::Color Color() const
Return the grid color.
gazebo::rendering::Grid::SetHeightOffset
void SetHeightOffset(const double _offset)
Set the height offset of the grid.
gazebo::msgs::Init
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
gazebo::rendering::Grid::SetColor
void SetColor(const common::Color &_color) GAZEBO_DEPRECATED(9.0)
Sets the color of the grid.
gazebo::common::Color
Defines a color.
Definition: Color.hh:36
GAZEBO_DEPRECATED
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:328
gazebo::rendering::VisualPtr
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:114
gazebo::rendering::Grid::GridVisual
VisualPtr GridVisual() const
Get thevisual associated with this grid.
gazebo::rendering::Grid::SetHeight
void SetHeight(const uint32_t _count)
Set the height of the grid.
gazebo::rendering::Grid::~Grid
~Grid()
Destructor.
gazebo::rendering::Grid::Height
uint32_t Height() const
Get the number of cells in the normal direction of the grid.