Skip to content

Commit

Permalink
Improved the documentation of iTexture.
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Dafarra committed Jan 22, 2021
1 parent b10c4b8 commit b7267fc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/visualization/include/iDynTree/Visualizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class ICameraAnimator

/**
* Enable the control of camera via the mouse.
* By default, left button rotates the camera, the right button translates it on the plane.
* The middle button, translates the camera up and down, while the wheel increases or decreases the zoom.
*/
virtual void enableMouseControl(bool enabled = true) = 0;

Expand Down Expand Up @@ -576,6 +578,12 @@ class IModelVisualization
virtual Transform getWorldLinkTransform(const LinkIndex& linkIndex) = 0;
};

/**
* The interface for an object that can be used as an additional target for the renderer.
* This allows rendering the scene using dimensions and environment that are different from
* the main window. The camera is in common. Any camera change in the main window is also
* reflected in the other textures.
*/
class ITexture
{
public:
Expand Down Expand Up @@ -604,7 +612,11 @@ class ITexture
* @brief Get the pixels of the texture.
*
* Remember to call draw() first.
* @param pixels The output pixels
* @param pixels The output pixels. The size of the vector will be equal to the total number of
* pixels of the rendered texture, i.e. width of the texture times its height. Both these two parameters
* can be set in the textureOptions passed to the method ITexturesHandler::add. The pixels are saved in
* col-major format.
* @note This operation may affect the time performances of the visualizer, especially if the texture is large.
* @return True in case of success, false otherwise
*/
virtual bool getPixels(std::vector<PixelViz>& pixels) const = 0;
Expand Down

0 comments on commit b7267fc

Please sign in to comment.