| DART 6.10.1
    | 
Attach this to a Viewer in order to visualize the support polygon of a Skeleton. More...
#include <SupportPolygonVisual.hpp>
 
  
| Public Member Functions | |
| SupportPolygonVisual (const dart::dynamics::SkeletonPtr &skeleton=nullptr, double elevation=0.02) | |
| Visualize the support polygon of an entire Skeleton. | |
| SupportPolygonVisual (const dart::dynamics::SkeletonPtr &skeleton, std::size_t treeIndex, double elevation=0.02) | |
| Visualize the support polygon of a specific tree in a Skeleton. | |
| void | setSkeleton (const dart::dynamics::SkeletonPtr &skeleton) | 
| Change the Skeleton that is being visualized. | |
| dart::dynamics::SkeletonPtr | getSkeleton () const | 
| Get the Skeleton associated with this visual. | |
| void | visualizeWholeSkeleton () | 
| Visualize the entire Skeleton. | |
| void | visualizeTree (std::size_t treeIndex) | 
| Visualize a specific tree in the Skeleton. | |
| void | setDisplayElevation (double elevation) | 
| Change the elevation height at which the polygon is displayed. | |
| double | getDisplayElevation () const | 
| Get the elevation of display for the support polygon. | |
| void | displayPolygon (bool display) | 
| Display the support polygon. | |
| bool | isPolygonDisplayed () const | 
| Returns true if the support polygon is being displayed. | |
| void | setPolygonColor (const Eigen::Vector4d &color) | 
| Set the color of the support polygon. | |
| Eigen::Vector4d | getPolygonColor () const | 
| Get the color of the support polygon. | |
| void | displayCentroid (bool display) | 
| Display the centroid. | |
| bool | isCentroidDisplayed () const | 
| Returns true if the centroid is being displayed. | |
| void | setCentroidRadius (double radius) | 
| Set the radius of the centroid visualization. | |
| double | getCentroidRadius () const | 
| Get the radius of the centroid visualization. | |
| void | displayCenterOfMass (bool display) | 
| Display the center of mass. | |
| bool | isCenterOfMassDisplayed () const | 
| Returns true if the center of mass is being displayed. | |
| void | setCenterOfMassRadius (double radius) | 
| Set the radius of the center of mass visualization. | |
| double | getCenterOfMassRadius () const | 
| Get the radius of the center of mass visualization. | |
| void | setValidCOMColor (const Eigen::Vector4d &color) | 
| Set the color that will be used for the center of mass if its projection is on the support polygon. | |
| const Eigen::Vector4d & | getValidCOMColor () const | 
| Get the color that will be used for the center of mass if its projection is on the support polygon. | |
| void | setInvalidCOMColor (const Eigen::Vector4d &color) | 
| Set the color that will be used for the center of mass if its projection is NOT on the support polygon. | |
| const Eigen::Vector4d & | getInvalidCOMColor () const | 
| Get the color that will be used for the center of mass if its projection is NOT on the support polygon. | |
| void | refresh () override final | 
| Update the support polygon visual. | |
| Viewer * | getViewer () | 
| const Viewer * | getViewer () const | 
| Protected Member Functions | |
| void | initialize () | 
| Initialize the memory used by this visual. | |
| virtual void | customAttach (Viewer *newViewer) | 
| This function will be called by attach(Viewer*) so you can do customized setup when the Viewer changes. | |
| virtual void | attach (Viewer *newViewer) | 
| This function will get called when the visual is attached to a new Viewer. | |
| Protected Attributes | |
| dart::dynamics::WeakSkeletonPtr | mSkeleton | 
| Skeleton for this visual. | |
| std::size_t | mTreeIndex | 
| Tree index for this visual. | |
| double | mElevation | 
| Elevation that this visual should use. | |
| bool | mDisplayPolygon | 
| Whether to display the polygon. | |
| bool | mDisplayCentroid | 
| Whether to display the centroid. | |
| dart::dynamics::SimpleFramePtr | mCentroid | 
| SimpleFrame for the centroid. | |
| double | mCentroidRadius | 
| Radius to be used by the centroid. | |
| bool | mDisplayCOM | 
| Whether to display the center of mass. | |
| dart::dynamics::SimpleFramePtr | mCom | 
| SimpleFrame for the center of mass. | |
| double | mComRadius | 
| Radius to be used by the center of mass. | |
| Eigen::Vector4d | mValidColor | 
| Color to be used when COM is valid. | |
| Eigen::Vector4d | mInvalidColor | 
| Color to be used when COM is invalid. | |
| ::osg::ref_ptr<::osg::Vec4Array > | mPolygonColor | 
| Color for the polygon. | |
| ::osg::ref_ptr<::osg::Geode > | mPolygonGeode | 
| Geode to hold the polygon. | |
| ::osg::ref_ptr<::osg::Geometry > | mPolygonGeom | 
| Geometry to describe the polygon. | |
| ::osg::ref_ptr<::osg::Vec3Array > | mVertices | 
| Vertices of the polygon. | |
| ::osg::ref_ptr<::osg::DrawElementsUShort > | mFaces | 
| Faces of the polygon. | |
| ::osg::ref_ptr< ShapeFrameNode > | mCentroidNode | 
| Node to render the centroid. | |
| ::osg::ref_ptr< ShapeFrameNode > | mComNode | 
| Node to render the COM. | |
| Private Attributes | |
| Viewer * | mViewer | 
Attach this to a Viewer in order to visualize the support polygon of a Skeleton.
| dart::gui::osg::SupportPolygonVisual::SupportPolygonVisual | ( | const dart::dynamics::SkeletonPtr & | skeleton = nullptr, | 
| double | elevation = 0.02 | ||
| ) | 
Visualize the support polygon of an entire Skeleton.
| dart::gui::osg::SupportPolygonVisual::SupportPolygonVisual | ( | const dart::dynamics::SkeletonPtr & | skeleton, | 
| std::size_t | treeIndex, | ||
| double | elevation = 0.02 | ||
| ) | 
Visualize the support polygon of a specific tree in a Skeleton.
| 
 | protectedvirtualinherited | 
This function will get called when the visual is attached to a new Viewer.
It adds this node as a child to the root node of the Viewer so the refresh() function will be called at each update cycle. It will also call customAttach(Viewer*) so you can do customized setup.
| 
 | protectedvirtualinherited | 
This function will be called by attach(Viewer*) so you can do customized setup when the Viewer changes.
By default this function does nothing, so overriding it is completely safe.
| void dart::gui::osg::SupportPolygonVisual::displayCenterOfMass | ( | bool | display | ) | 
Display the center of mass.
| void dart::gui::osg::SupportPolygonVisual::displayCentroid | ( | bool | display | ) | 
Display the centroid.
| void dart::gui::osg::SupportPolygonVisual::displayPolygon | ( | bool | display | ) | 
Display the support polygon.
| double dart::gui::osg::SupportPolygonVisual::getCenterOfMassRadius | ( | ) | const | 
Get the radius of the center of mass visualization.
| double dart::gui::osg::SupportPolygonVisual::getCentroidRadius | ( | ) | const | 
Get the radius of the centroid visualization.
| double dart::gui::osg::SupportPolygonVisual::getDisplayElevation | ( | ) | const | 
Get the elevation of display for the support polygon.
| const Eigen::Vector4d & dart::gui::osg::SupportPolygonVisual::getInvalidCOMColor | ( | ) | const | 
Get the color that will be used for the center of mass if its projection is NOT on the support polygon.
| Eigen::Vector4d dart::gui::osg::SupportPolygonVisual::getPolygonColor | ( | ) | const | 
Get the color of the support polygon.
| dart::dynamics::SkeletonPtr dart::gui::osg::SupportPolygonVisual::getSkeleton | ( | ) | const | 
Get the Skeleton associated with this visual.
| const Eigen::Vector4d & dart::gui::osg::SupportPolygonVisual::getValidCOMColor | ( | ) | const | 
Get the color that will be used for the center of mass if its projection is on the support polygon.
| 
 | inherited | 
| 
 | inherited | 
| 
 | protected | 
Initialize the memory used by this visual.
| bool dart::gui::osg::SupportPolygonVisual::isCenterOfMassDisplayed | ( | ) | const | 
Returns true if the center of mass is being displayed.
| bool dart::gui::osg::SupportPolygonVisual::isCentroidDisplayed | ( | ) | const | 
Returns true if the centroid is being displayed.
| bool dart::gui::osg::SupportPolygonVisual::isPolygonDisplayed | ( | ) | const | 
Returns true if the support polygon is being displayed.
| 
 | finaloverridevirtual | 
Update the support polygon visual.
Implements dart::gui::osg::ViewerAttachment.
| void dart::gui::osg::SupportPolygonVisual::setCenterOfMassRadius | ( | double | radius | ) | 
Set the radius of the center of mass visualization.
| void dart::gui::osg::SupportPolygonVisual::setCentroidRadius | ( | double | radius | ) | 
Set the radius of the centroid visualization.
| void dart::gui::osg::SupportPolygonVisual::setDisplayElevation | ( | double | elevation | ) | 
Change the elevation height at which the polygon is displayed.
| void dart::gui::osg::SupportPolygonVisual::setInvalidCOMColor | ( | const Eigen::Vector4d & | color | ) | 
Set the color that will be used for the center of mass if its projection is NOT on the support polygon.
| void dart::gui::osg::SupportPolygonVisual::setPolygonColor | ( | const Eigen::Vector4d & | color | ) | 
Set the color of the support polygon.
| void dart::gui::osg::SupportPolygonVisual::setSkeleton | ( | const dart::dynamics::SkeletonPtr & | skeleton | ) | 
Change the Skeleton that is being visualized.
| void dart::gui::osg::SupportPolygonVisual::setValidCOMColor | ( | const Eigen::Vector4d & | color | ) | 
Set the color that will be used for the center of mass if its projection is on the support polygon.
| void dart::gui::osg::SupportPolygonVisual::visualizeTree | ( | std::size_t | treeIndex | ) | 
Visualize a specific tree in the Skeleton.
| void dart::gui::osg::SupportPolygonVisual::visualizeWholeSkeleton | ( | ) | 
Visualize the entire Skeleton.
| 
 | protected | 
SimpleFrame for the centroid.
| 
 | protected | 
Node to render the centroid.
| 
 | protected | 
Radius to be used by the centroid.
| 
 | protected | 
SimpleFrame for the center of mass.
| 
 | protected | 
Node to render the COM.
| 
 | protected | 
Radius to be used by the center of mass.
| 
 | protected | 
Whether to display the centroid.
| 
 | protected | 
Whether to display the center of mass.
| 
 | protected | 
Whether to display the polygon.
| 
 | protected | 
Elevation that this visual should use.
| 
 | protected | 
Faces of the polygon.
| 
 | protected | 
Color to be used when COM is invalid.
| 
 | protected | 
Color for the polygon.
| 
 | protected | 
Geode to hold the polygon.
| 
 | protected | 
Geometry to describe the polygon.
| 
 | protected | 
Skeleton for this visual.
| 
 | protected | 
Tree index for this visual.
| 
 | protected | 
Color to be used when COM is valid.
| 
 | protected | 
Vertices of the polygon.
| 
 | privateinherited |