ImFusion SDK 4.3
SimulatorRenderer Class Reference

#include <RGBD/Include/ImFusion/RGBD/SimulatorRenderer.h>

Renderer for simulating RGB-D sensor output from 3D models. More...

Detailed Description

Renderer for simulating RGB-D sensor output from 3D models.

This class provides functionality to render synthetic RGB-D frames from a set of 3D meshes and a camera configuration. It supports semantic labeling and rendering of surface coordinates.

Usage:

Important aspects:

  • Supports face and vertex label modes for semantic segmentation.
  • Can render surface coordinates (xyz maps) in addition to color, depth, and label images.
  • Not thread-safe.

Example:

renderer.setCamera(cameraComponent);
renderer.setModel(meshes);
auto frame = renderer.render(poseMatrix);
auto colorImg = frame->colorImage();
auto depthImg = frame->depthImage();
void setModel(const std::vector< Mesh * > &meshes)
Sets the 3D model(s) to be rendered.
@ FaceLabel
Uses the labels of faces.
Definition SimulatorRenderer.h:120
std::unique_ptr< SimulatorFrame > render(const mat4 &T)
Renders a frame from the current model and camera at the given pose.
SimulatorRenderer()
Constructs a SimulatorRenderer.
void setCamera(RGBDDataComponent *camera)
Sets the camera configuration.
void setLabelMode(LabelMode mode)
Sets the source of label for creating the semantic segmentation image.
Definition SimulatorRenderer.h:126
void setRenderSurfaceCoordinates(bool value)
Enables or disables rendering of surface coordinates (xyz maps).
Definition SimulatorRenderer.h:131

Public Types

enum  LabelMode { FaceLabel = 0 , VertexLabel = 1 }
 Source of labels to use for creating the label maps. More...
 

Public Member Functions

 SimulatorRenderer ()
 Constructs a SimulatorRenderer.
 
 ~SimulatorRenderer ()
 Destructor.
 
void setCamera (RGBDDataComponent *camera)
 Sets the camera configuration.
 
RGBDDataComponentcamera () const
 Returns the current camera configuration.
 
void setModel (const std::vector< Mesh * > &meshes)
 Sets the 3D model(s) to be rendered.
 
std::vector< Mesh * > model () const
 Returns the current 3D model(s).
 
void setLabelMode (LabelMode mode)
 Sets the source of label for creating the semantic segmentation image.
 
LabelMode labelMode () const
 Returns the source of label for creating the semantic segmentation image.
 
void setRenderSurfaceCoordinates (bool value)
 Enables or disables rendering of surface coordinates (xyz maps).
 
bool renderSurfaceCoordinates () const
 Returns whether rendering of surface coordinates is enabled.
 
std::unique_ptr< SimulatorFramerender (const mat4 &T)
 Renders a frame from the current model and camera at the given pose.
 

Member Enumeration Documentation

◆ LabelMode

enum LabelMode

Source of labels to use for creating the label maps.

Enumerator
FaceLabel 

Uses the labels of faces.

VertexLabel 

Uses the labels of vertices.

Member Function Documentation

◆ setLabelMode()

void setLabelMode ( LabelMode mode)
inline

Sets the source of label for creating the semantic segmentation image.

The mode is not updated if the provided value is incompatible.

◆ render()

std::unique_ptr< SimulatorFrame > render ( const mat4 & T)

Renders a frame from the current model and camera at the given pose.

Returns
Unique pointer to the rendered SimulatorFrame.

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close