iDynTree::IModelVisualization class

Interface to the visualization of a model istance.

Constructors, destructors, conversion operators

~IModelVisualization() pure virtual
Denstructor.

Public functions

auto setPositions(const Transform& world_H_base, const VectorDynSize& jointPos) -> bool pure virtual
Set the position of the model (using base position and joint positions)
auto setLinkPositions(const LinkPositions& linkPos) -> bool pure virtual
Set the positions of the model by directly specifing link positions wrt to the world.
auto model() -> Model& pure virtual
Reference to the used model.
auto getInstanceName() -> std::string pure virtual
Get the instance name.
void setModelVisibility(const bool isVisible) pure virtual
Set the visibility of all the link of the model.
void setModelColor(const ColorViz& modelColor) pure virtual
Set the color of all the geometries of the model.
void resetModelColor() pure virtual
Reset the colors of the model.
auto setLinkColor(const LinkIndex& linkIndex, const ColorViz& linkColor) -> bool pure virtual
Set the color of all the geometries of the given link.
auto setVisualColor(const LinkIndex& linkIndex, const std::string& visualName, const ColorViz& visualColor) -> bool pure virtual
Set the color of a single visual of a given link.
auto setLinkTransparency(const LinkIndex& linkIndex, const double transparency) -> bool pure virtual
Set the transparency of a given link of the model.
void setModelTransparency(const double transparency) pure virtual
Set the transparency of all the links of the model.
auto resetLinkColor(const LinkIndex& linkIndex) -> bool pure virtual
Reset the colors of given link.
auto getLinkNames() -> std::vector<std::string> pure virtual
Get the name of the link in the model.
auto setLinkVisibility(const std::string& linkName, bool isVisible) -> bool pure virtual
Set a given link visibility.
auto getFeatures() -> std::vector<std::string> pure virtual
Get list of visualization features that can be enabled/disabled.
auto setFeatureVisibility(const std::string& elementKey, bool isVisible) -> bool pure virtual
auto jets() -> IJetsVisualization& pure virtual
Get a reference to the internal IJetsVisualization interface.
auto getWorldLinkTransform(const LinkIndex& linkIndex) -> Transform pure virtual
Get the transformation of given link with respect to visualizer world $ {}^w wH_{link}$ .
auto getWorldLinkTransform(const std::string& linkName) -> Transform pure virtual
Get the transformation of given link with respect to visualizer world $ {}^w H_{link}$ .
auto getWorldFrameTransform(const FrameIndex& frameIndex) -> Transform pure virtual
Get the transformation of given frame with respect to visualizer world $ {}^w H_{frame}$ .
auto getWorldFrameTransform(const std::string& frameName) -> Transform pure virtual
Get the transformation of given frame with respect to visualizer world $ {}^w H_{frame}$ .
auto label() -> ILabel& pure virtual
Get the label for the model.

Function documentation

void iDynTree::IModelVisualization::setModelColor(const ColorViz& modelColor) pure virtual

Set the color of all the geometries of the model.

This will overwrite the material of the model, but it can be reset by resetModelColor.

bool iDynTree::IModelVisualization::setLinkColor(const LinkIndex& linkIndex, const ColorViz& linkColor) pure virtual

Set the color of all the geometries of the given link.

This will overwrite the material of the link, but it can be reset by resetLinkColor.

bool iDynTree::IModelVisualization::setVisualColor(const LinkIndex& linkIndex, const std::string& visualName, const ColorViz& visualColor) pure virtual

Set the color of a single visual of a given link.

This will overwrite the material of the visual, but it can be reset by resetLinkColor.

bool iDynTree::IModelVisualization::setLinkTransparency(const LinkIndex& linkIndex, const double transparency) pure virtual

Set the transparency of a given link of the model.

This will overwrite the material of the link, but it can be reset by resetLinkColor.

void iDynTree::IModelVisualization::setModelTransparency(const double transparency) pure virtual

Set the transparency of all the links of the model.

This will overwrite the material of the links, but they can be reset by resetLinkColor.

std::vector<std::string> iDynTree::IModelVisualization::getFeatures() pure virtual

Get list of visualization features that can be enabled/disabled.

This method will return the follow list:

Visualization featureDescriptionDefault value
wireframeVisualize mesh of the model as wireframefalse

bool iDynTree::IModelVisualization::setFeatureVisibility(const std::string& elementKey, bool isVisible) pure virtual

Returns true if the visibility is correctly setted, false otherwise.