Grid Class Reference

Displays a grid of cells, drawn with lines. More...

#include <rendering/rendering.hh>

Public Member Functions

 Grid (Scene *_scene, const uint32_t _cellCount, const float _cellLength, const float _lineWidth, const common::Color &_color) GAZEBO_DEPRECATED(9.0)
 Constructor. More...
 
 Grid (Scene *_scene, const uint32_t _cellCount, const float _cellLength, const ignition::math::Color &_color)
 Constructor. More...
 
 ~Grid ()
 Destructor. More...
 
uint32_t CellCount () const
 Get the number of cells. More...
 
float CellLength () const
 Get the cell length. More...
 
ignition::math::Color Color () const
 Return the grid color. More...
 
void Enable (const bool _enable)
 Enable or disable the grid. More...
 
VisualPtr GridVisual () const
 Get thevisual associated with this grid. More...
 
uint32_t Height () const
 Get the number of cells in the normal direction of the grid. More...
 
double HeightOffset () const
 Get the height offset. More...
 
void Init ()
 Initialize the grid. More...
 
float LineWidth () const GAZEBO_DEPRECATED(9.0)
 Get the width of the grid line. More...
 
void SetCellCount (const uint32_t _count)
 Set the number of cells. More...
 
void SetCellLength (const float _len)
 Set the cell length. More...
 
void SetColor (const common::Color &_color) GAZEBO_DEPRECATED(9.0)
 Sets the color of the grid. More...
 
void SetColor (const ignition::math::Color &_color)
 Sets the color of the grid. More...
 
void SetHeight (const uint32_t _count)
 Set the height of the grid. More...
 
void SetHeightOffset (const double _offset)
 Set the height offset of the grid. More...
 
void SetLineWidth (const float _width) GAZEBO_DEPRECATED(9.0)
 Set the line width. More...
 
void SetUserData (const Ogre::Any &_data)
 Sets user data on all ogre objects we own. More...
 

Detailed Description

Displays a grid of cells, drawn with lines.

Displays a grid of cells, drawn with lines. A grid with an identity orientation is drawn along the XY plane.

Constructor & Destructor Documentation

Grid ( Scene _scene,
const uint32_t  _cellCount,
const float  _cellLength,
const float  _lineWidth,
const common::Color _color 
)

Constructor.

Parameters
[in]_sceneThe scene this object is part of
[in]_cellCountThe number of cells to draw
[in]_cellLengthThe size of each cell
[in]_lineWidthThe width of the lines to use
[in]_colorThe color of the grid
Deprecated:
Use constructor which accepts ignition::math::Color.
Grid ( Scene _scene,
const uint32_t  _cellCount,
const float  _cellLength,
const ignition::math::Color &  _color 
)

Constructor.

Parameters
[in]_sceneThe scene this object is part of
[in]_cellCountThe number of cells to draw
[in]_cellLengthThe size of each cell
[in]_colorThe color of the grid
~Grid ( )

Destructor.

Member Function Documentation

uint32_t CellCount ( ) const

Get the number of cells.

Returns
The number of cells in each direction.
float CellLength ( ) const

Get the cell length.

Returns
The cell length
ignition::math::Color Color ( ) const

Return the grid color.

Returns
The grid color
void Enable ( const bool  _enable)

Enable or disable the grid.

Parameters
[in]_enableSet to true to view the grid, false to make invisible.
VisualPtr GridVisual ( ) const

Get thevisual associated with this grid.

Returns
The visual associated with this grid
uint32_t Height ( ) const

Get the number of cells in the normal direction of the grid.

Returns
The height
double HeightOffset ( ) const

Get the height offset.

Returns
The height offset.
void Init ( )

Initialize the grid.

float LineWidth ( ) const

Get the width of the grid line.

Returns
The line width
Deprecated:
Grid lines are always 1px wide.
void SetCellCount ( const uint32_t  _count)

Set the number of cells.

Parameters
[in]_countThe number of cells
void SetCellLength ( const float  _len)

Set the cell length.

Parameters
[in]_lenThe cell length
void SetColor ( const common::Color _color)

Sets the color of the grid.

Parameters
[in]_colorThe grid color
Deprecated:
Use function which accepts ignition::math::Color.
void SetColor ( const ignition::math::Color &  _color)

Sets the color of the grid.

Parameters
[in]_colorThe grid color
void SetHeight ( const uint32_t  _count)

Set the height of the grid.

Parameters
[in]_countGrid height
void SetHeightOffset ( const double  _offset)

Set the height offset of the grid.

Parameters
[in]_countGrid height offset.
void SetLineWidth ( const float  _width)

Set the line width.

Parameters
[in]_widthThe width of the grid
Deprecated:
Grid lines are always 1px wide.
void SetUserData ( const Ogre::Any &  _data)

Sets user data on all ogre objects we own.

Parameters
[in]_dataThe user data

The documentation for this class was generated from the following file: