33#ifndef DART_GUI_OSG_GRIDVISUAL_HPP_
34#define DART_GUI_OSG_GRIDVISUAL_HPP_
37#include <osg/LineWidth>
86 void setOffset(
const Eigen::Vector3d& offset);
std::string type
Definition SdfParser.cpp:82
Attach this to a Viewer in order to visualize grid.
Definition GridVisual.hpp:49
::osg::ref_ptr<::osg::Vec3Array > mMajorLineVertices
Vertices of major lines.
Definition GridVisual.hpp:177
PlaneType getPlaneType() const
Returns the plane type among XY, YZ, ZX planes.
Definition GridVisual.cpp:116
const Eigen::Vector3d & getOffset() const
Returns the elevation of display for the support polygon.
Definition GridVisual.cpp:132
::osg::ref_ptr<::osg::LineWidth > mMinorLineWidth
Line width for minor line.
Definition GridVisual.hpp:207
void setAxisLineWidth(float width)
Sets line width for axis lines.
Definition GridVisual.cpp:196
void setNumMinorLinesPerMajorLine(std::size_t size)
Sets the number of minor lines per major line.
Definition GridVisual.cpp:90
float getMajorLineWidth() const
Returns line width for major lines.
Definition GridVisual.cpp:222
void display(bool display)
Displays the support polygon.
Definition GridVisual.cpp:138
::osg::ref_ptr<::osg::DrawElementsUInt > mMajorLineFaces
Faces of major lines.
Definition GridVisual.hpp:195
float getMinorLineWidth() const
Returns line width for minor lines.
Definition GridVisual.cpp:238
void setPlaneType(PlaneType type)
Set the plane type among XY, YZ, ZX planes.
Definition GridVisual.cpp:106
::osg::ref_ptr<::osg::Geometry > mMajorLineGeom
Geometry to describe minor lines.
Definition GridVisual.hpp:168
void setMajorLineWidth(float width)
Sets line width for major lines.
Definition GridVisual.cpp:212
bool mNeedUpdate
Dirty flag to notify this grid needs to be updated.
Definition GridVisual.hpp:210
::osg::ref_ptr<::osg::Vec3Array > mMinorLineVertices
Vertices of axis lines.
Definition GridVisual.hpp:174
::osg::ref_ptr<::osg::Geometry > mAxisLineGeom
Geometry to describe axis lines.
Definition GridVisual.hpp:165
::osg::ref_ptr<::osg::Geode > mGeode
Geode to hold the grid.
Definition GridVisual.hpp:162
::osg::ref_ptr<::osg::DrawElementsUInt > mAxis1NegativeFaces
Faces of the first axis negative line.
Definition GridVisual.hpp:186
::osg::ref_ptr<::osg::Vec3Array > mAxisLineVertices
Vertices of minor lines.
Definition GridVisual.hpp:180
std::size_t getNumMinorLinesPerMajorLine() const
Returns the number of minor lines per major line.
Definition GridVisual.cpp:100
double getMinorLineStepSize() const
Returns the step size of minor lines in meters.
Definition GridVisual.cpp:84
::osg::ref_ptr<::osg::Vec4Array > mMinorLineColor
Color for minor lines.
Definition GridVisual.hpp:159
void setNumCells(std::size_t cells)
Sets the number of cells along each axis.
Definition GridVisual.cpp:55
GridVisual()
Default constructor.
Definition GridVisual.cpp:49
void setMinorLineStepSize(double size)
Sets the step size of minor lines in meters.
Definition GridVisual.cpp:71
PlaneType
Definition GridVisual.hpp:52
bool isDisplayed() const
Returns true if the support polygon is being displayed.
Definition GridVisual.cpp:152
bool mDisplayGrid
Whether to display the grid.
Definition GridVisual.hpp:150
std::size_t mNumMinorLinesPerMajorLine
Number of minor lines per major line.
Definition GridVisual.hpp:144
void setOffset(const Eigen::Vector3d &offset)
Changes the offset at which the grid is displayed.
Definition GridVisual.cpp:122
Eigen::Vector4d getMinorLineColor() const
Returns the color of minor lines.
Definition GridVisual.cpp:189
::osg::ref_ptr<::osg::Vec4Array > mMajorLineColor
Color for major lines.
Definition GridVisual.hpp:156
::osg::ref_ptr<::osg::LineWidth > mAxisLineWidth
Line width for axis line.
Definition GridVisual.hpp:201
float getAxisLineWidth() const
Returns line width for axis lines.
Definition GridVisual.cpp:206
void setMajorLineColor(const Eigen::Vector4d &color)
Sets the color of major lines.
Definition GridVisual.cpp:158
Eigen::Vector4d getMajorLineColor() const
Returns the color of major lines.
Definition GridVisual.cpp:170
::osg::ref_ptr<::osg::DrawElementsUInt > mMinorLineFaces
Faces of minor lines.
Definition GridVisual.hpp:198
::osg::ref_ptr<::osg::DrawElementsUInt > mAxis1PositiveFaces
Faces of the first axis positive line.
Definition GridVisual.hpp:183
void refresh() override final
Updates the support polygon visual.
Definition GridVisual.cpp:418
double mMinorLineStepSize
Step size of minor lines in meters.
Definition GridVisual.hpp:141
::osg::ref_ptr<::osg::Geometry > mMinorLineGeom
Geometry to describe major lines.
Definition GridVisual.hpp:171
void setMinorLineColor(const Eigen::Vector4d &color)
Sets the color of minor lines.
Definition GridVisual.cpp:177
void initialize()
Initializes the memory used by this visual.
Definition GridVisual.cpp:529
::osg::ref_ptr<::osg::LineWidth > mMajorLineWidth
Line width for major line.
Definition GridVisual.hpp:204
std::size_t getNumCells() const
Returns the number of cells along each axis.
Definition GridVisual.cpp:65
PlaneType mPlaneType
Plane type among XY, YZ, ZX planes.
Definition GridVisual.hpp:135
Eigen::Vector3d mOffset
Elevation that this visual should use.
Definition GridVisual.hpp:147
::osg::ref_ptr<::osg::DrawElementsUInt > mAxis2PositiveFaces
Faces of the second axis positive line.
Definition GridVisual.hpp:189
::osg::ref_ptr<::osg::DrawElementsUInt > mAxis2NegativeFaces
Faces of the second axis negative line.
Definition GridVisual.hpp:192
::osg::ref_ptr<::osg::Vec4Array > mAxisLineColor
Color for axis lines.
Definition GridVisual.hpp:153
void setMinorLineWidth(float width)
Sets line width for minor lines.
Definition GridVisual.cpp:228
std::size_t mNumCells
Number of cells along each axis.
Definition GridVisual.hpp:138
Definition Random-impl.hpp:92
Definition BulletCollisionDetector.cpp:60