habitat-sim icon indicating copy to clipboard operation
habitat-sim copied to clipboard

Simplify the draw functions in the Renderer class

Open bigbike opened this issue 5 years ago • 1 comments

Currently, the signatures of the draw functions in Renderer class look like this:

  // draw the scene graph with the camera specified by user                                                           
  void draw(RenderCamera& camera, scene::SceneGraph& sceneGraph);                                                     
                                                                                                                      
  // draw the scene graph with the visual sensor provided by user                                                     
  void draw(sensor::VisualSensor& visualSensor, scene::SceneGraph& sceneGraph);  

Is the 2nd argument sceneGraph really necessary? The camera or the visualSensor is a feature attached to the scene node. And from the scene node, we can retrieve the scene graph.

🚀 Feature

Motivation

Pitch

Alternatives

Additional context

bigbike avatar Feb 11 '20 00:02 bigbike

Also, we may use CORRADE_ASSERT instead of ASSERT within the functions.

bigbike avatar Feb 11 '20 00:02 bigbike