33 #ifndef DART_GUI_OSG_GRIDVISUAL_HPP_
34 #define DART_GUI_OSG_GRIDVISUAL_HPP_
37 #include <osg/LineWidth>
87 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:50
::osg::ref_ptr<::osg::Vec3Array > mMajorLineVertices
Vertices of major lines.
Definition: GridVisual.hpp:178
PlaneType getPlaneType() const
Returns the plane type among XY, YZ, ZX planes.
Definition: GridVisual.cpp:113
const Eigen::Vector3d & getOffset() const
Returns the elevation of display for the support polygon.
Definition: GridVisual.cpp:129
::osg::ref_ptr<::osg::LineWidth > mMinorLineWidth
Line width for minor line.
Definition: GridVisual.hpp:208
void setAxisLineWidth(float width)
Sets line width for axis lines.
Definition: GridVisual.cpp:193
void setNumMinorLinesPerMajorLine(std::size_t size)
Sets the number of minor lines per major line.
Definition: GridVisual.cpp:87
float getMajorLineWidth() const
Returns line width for major lines.
Definition: GridVisual.cpp:219
void display(bool display)
Displays the support polygon.
Definition: GridVisual.cpp:135
::osg::ref_ptr<::osg::DrawElementsUInt > mMajorLineFaces
Faces of major lines.
Definition: GridVisual.hpp:196
float getMinorLineWidth() const
Returns line width for minor lines.
Definition: GridVisual.cpp:235
void setPlaneType(PlaneType type)
Set the plane type among XY, YZ, ZX planes.
Definition: GridVisual.cpp:103
::osg::ref_ptr<::osg::Geometry > mMajorLineGeom
Geometry to describe minor lines.
Definition: GridVisual.hpp:169
void setMajorLineWidth(float width)
Sets line width for major lines.
Definition: GridVisual.cpp:209
bool mNeedUpdate
Dirty flag to notify this grid needs to be updated.
Definition: GridVisual.hpp:211
::osg::ref_ptr<::osg::Vec3Array > mMinorLineVertices
Vertices of axis lines.
Definition: GridVisual.hpp:175
::osg::ref_ptr<::osg::Geometry > mAxisLineGeom
Geometry to describe axis lines.
Definition: GridVisual.hpp:166
::osg::ref_ptr<::osg::Geode > mGeode
Geode to hold the grid.
Definition: GridVisual.hpp:163
::osg::ref_ptr<::osg::DrawElementsUInt > mAxis1NegativeFaces
Faces of the first axis negative line.
Definition: GridVisual.hpp:187
::osg::ref_ptr<::osg::Vec3Array > mAxisLineVertices
Vertices of minor lines.
Definition: GridVisual.hpp:181
std::size_t getNumMinorLinesPerMajorLine() const
Returns the number of minor lines per major line.
Definition: GridVisual.cpp:97
double getMinorLineStepSize() const
Returns the step size of minor lines in meters.
Definition: GridVisual.cpp:81
::osg::ref_ptr<::osg::Vec4Array > mMinorLineColor
Color for minor lines.
Definition: GridVisual.hpp:160
void setNumCells(std::size_t cells)
Sets the number of cells along each axis.
Definition: GridVisual.cpp:52
GridVisual()
Default constructor.
Definition: GridVisual.cpp:46
void setMinorLineStepSize(double size)
Sets the step size of minor lines in meters.
Definition: GridVisual.cpp:68
PlaneType
Definition: GridVisual.hpp:53
bool isDisplayed() const
Returns true if the support polygon is being displayed.
Definition: GridVisual.cpp:149
bool mDisplayGrid
Whether to display the grid.
Definition: GridVisual.hpp:151
std::size_t mNumMinorLinesPerMajorLine
Number of minor lines per major line.
Definition: GridVisual.hpp:145
void setOffset(const Eigen::Vector3d &offset)
Changes the offset at which the grid is displayed.
Definition: GridVisual.cpp:119
Eigen::Vector4d getMinorLineColor() const
Returns the color of minor lines.
Definition: GridVisual.cpp:186
::osg::ref_ptr<::osg::Vec4Array > mMajorLineColor
Color for major lines.
Definition: GridVisual.hpp:157
::osg::ref_ptr<::osg::LineWidth > mAxisLineWidth
Line width for axis line.
Definition: GridVisual.hpp:202
float getAxisLineWidth() const
Returns line width for axis lines.
Definition: GridVisual.cpp:203
void setMajorLineColor(const Eigen::Vector4d &color)
Sets the color of major lines.
Definition: GridVisual.cpp:155
Eigen::Vector4d getMajorLineColor() const
Returns the color of major lines.
Definition: GridVisual.cpp:167
::osg::ref_ptr<::osg::DrawElementsUInt > mMinorLineFaces
Faces of minor lines.
Definition: GridVisual.hpp:199
::osg::ref_ptr<::osg::DrawElementsUInt > mAxis1PositiveFaces
Faces of the first axis positive line.
Definition: GridVisual.hpp:184
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:142
::osg::ref_ptr<::osg::Geometry > mMinorLineGeom
Geometry to describe major lines.
Definition: GridVisual.hpp:172
void setMinorLineColor(const Eigen::Vector4d &color)
Sets the color of minor lines.
Definition: GridVisual.cpp:174
void initialize()
Initializes the memory used by this visual.
Definition: GridVisual.cpp:488
::osg::ref_ptr<::osg::LineWidth > mMajorLineWidth
Line width for major line.
Definition: GridVisual.hpp:205
std::size_t getNumCells() const
Returns the number of cells along each axis.
Definition: GridVisual.cpp:62
PlaneType mPlaneType
Plane type among XY, YZ, ZX planes.
Definition: GridVisual.hpp:136
Eigen::Vector3d mOffset
Elevation that this visual should use.
Definition: GridVisual.hpp:148
::osg::ref_ptr<::osg::DrawElementsUInt > mAxis2PositiveFaces
Faces of the second axis positive line.
Definition: GridVisual.hpp:190
::osg::ref_ptr<::osg::DrawElementsUInt > mAxis2NegativeFaces
Faces of the second axis negative line.
Definition: GridVisual.hpp:193
::osg::ref_ptr<::osg::Vec4Array > mAxisLineColor
Color for axis lines.
Definition: GridVisual.hpp:154
void setMinorLineWidth(float width)
Sets line width for minor lines.
Definition: GridVisual.cpp:225
std::size_t mNumCells
Number of cells along each axis.
Definition: GridVisual.hpp:139
Definition: Viewer.hpp:77
Definition: Random-impl.hpp:92
Definition: BulletCollisionDetector.cpp:65
Definition: SharedLibraryManager.hpp:46