Gazebo Rendering

API Reference

3.7.2
BaseRenderTarget< T > Class Template Referenceabstract

#include <BaseRenderTarget.hh>

Public Member Functions

 BaseRenderTarget ()
 
virtual ~BaseRenderTarget ()
 
virtual void AddRenderPass (const RenderPassPtr &_pass) override
 Add a render pass to the render target. More...
 
virtual math::Color BackgroundColor () const override
 Get the background color of the render target. This should be the same as the scene background color. More...
 
virtual PixelFormat Format () const override
 Set the render target image format. More...
 
virtual unsigned int Height () const override
 Get render target height in pixels. More...
 
virtual void PostRender () override
 Post process this object and any of its children after rendering. More...
 
virtual void PreRender () override
 Prepare this object and any of its children for rendering. This should be called for each object in a scene just before rendering, which can be achieved by a single call to Scene::PreRender. More...
 
virtual void RemoveRenderPass (const RenderPassPtr &_pass) override
 Remove a render pass from the render target. More...
 
virtual RenderPassPtr RenderPassByIndex (unsigned int _index) const override
 Get a render pass by index. More...
 
virtual unsigned int RenderPassCount () const override
 Get the number of render passes applied to the render target. More...
 
virtual void SetFormat (PixelFormat _format) override
 Set the render target image format. More...
 
virtual void SetHeight (const unsigned int _height) override
 Set the render target height in pixels. More...
 
virtual void SetWidth (const unsigned int _width) override
 Set the render target width in pixels. More...
 
virtual unsigned int Width () const override
 Get render target width in pixels. More...
 
- Public Member Functions inherited from RenderTarget
virtual ~RenderTarget ()
 Destructor. More...
 
virtual void Copy (Image &_image) const =0
 Write rendered image to given Image. The RenderTarget will convert the underlying image to the specified format listed in the given Image. However if the given image is not of the correct size no work will be done. Calling this function before an image has been rendered will result in undefined behavior. More...
 
- Public Member Functions inherited from Object
virtual ~Object ()
 Destructor. More...
 
virtual void Destroy ()=0
 Destroy any resources associated with this object. Invoking any other functions after destroying an object will result in undefined behavior. More...
 
virtual unsigned int Id () const =0
 Get the object ID. This ID will be unique across all objects inside a given scene, but necessarily true for objects across different scenes. More...
 
virtual std::string Name () const =0
 Get the object name. This name will be unique across all objects inside a given scene, but necessarily true for objects across different scenes. More...
 
virtual ScenePtr Scene () const =0
 Get the Scene that created this object. More...
 

Protected Member Functions

virtual void Rebuild ()
 
virtual void RebuildImpl ()=0
 

Protected Attributes

PixelFormat format = PF_UNKNOWN
 
unsigned int height = 0u
 
bool renderPassDirty = false
 Flag to indicate if render pass need to be rebuilt. More...
 
std::vector< RenderPassPtrrenderPasses
 A chain of render passes applied to the render target. More...
 
bool targetDirty = true
 
unsigned int width = 0u
 

Constructor & Destructor Documentation

◆ BaseRenderTarget()

◆ ~BaseRenderTarget()

~BaseRenderTarget
virtual

Member Function Documentation

◆ AddRenderPass()

void AddRenderPass ( const RenderPassPtr _pass)
overridevirtual

Add a render pass to the render target.

Parameters
[in]_passNew render pass to add

Implements RenderTarget.

◆ BackgroundColor()

math::Color BackgroundColor ( ) const
overridevirtual

Get the background color of the render target. This should be the same as the scene background color.

Returns
Render target background color.

Implements RenderTarget.

◆ Format()

PixelFormat Format ( ) const
overridevirtual

Set the render target image format.

Returns
Render target format

Implements RenderTarget.

◆ Height()

unsigned int Height ( ) const
overridevirtual

Get render target height in pixels.

Returns
The Render target height in pixels

Implements RenderTarget.

◆ PostRender()

void PostRender ( )
overridevirtual

Post process this object and any of its children after rendering.

Implements Object.

Reimplemented in Ogre2RenderTexture, OgreRenderTexture, Ogre2RenderTarget, and OgreRenderTarget.

◆ PreRender()

void PreRender ( )
overridevirtual

Prepare this object and any of its children for rendering. This should be called for each object in a scene just before rendering, which can be achieved by a single call to Scene::PreRender.

Implements Object.

Reimplemented in Ogre2RenderTexture, OgreRenderTexture, Ogre2RenderTarget, and OgreRenderTarget.

◆ Rebuild()

void Rebuild
protectedvirtual

◆ RebuildImpl()

virtual void RebuildImpl ( )
protectedpure virtual

Implemented in Ogre2RenderTarget, and OgreRenderTarget.

◆ RemoveRenderPass()

void RemoveRenderPass ( const RenderPassPtr _pass)
overridevirtual

Remove a render pass from the render target.

Parameters
[in]_passrender pass to remove

Implements RenderTarget.

◆ RenderPassByIndex()

RenderPassPtr RenderPassByIndex ( unsigned int  _index) const
overridevirtual

Get a render pass by index.

Returns
Render pass at the specified index

Implements RenderTarget.

◆ RenderPassCount()

unsigned int RenderPassCount ( ) const
overridevirtual

Get the number of render passes applied to the render target.

Returns
Number of render passes applied

Implements RenderTarget.

◆ SetFormat()

void SetFormat ( PixelFormat  _format)
overridevirtual

Set the render target image format.

Parameters
[in]_formatNew target format

Implements RenderTarget.

◆ SetHeight()

void SetHeight ( const unsigned int  _height)
overridevirtual

Set the render target height in pixels.

Parameters
[in]_heightNew render target height in pixels

Implements RenderTarget.

◆ SetWidth()

void SetWidth ( const unsigned int  _width)
overridevirtual

Set the render target width in pixels.

Parameters
[in]_widthNew render target width in pixels

Implements RenderTarget.

◆ Width()

unsigned int Width ( ) const
overridevirtual

Get render target width in pixels.

Returns
The render target width in pixels

Implements RenderTarget.

Member Data Documentation

◆ format

PixelFormat format = PF_UNKNOWN
protected

◆ height

unsigned int height = 0u
protected

◆ renderPassDirty

bool renderPassDirty = false
protected

Flag to indicate if render pass need to be rebuilt.

◆ renderPasses

std::vector<RenderPassPtr> renderPasses
protected

A chain of render passes applied to the render target.

◆ targetDirty

bool targetDirty = true
protected

◆ width

unsigned int width = 0u
protected

The documentation for this class was generated from the following file: