facebookresearch / habitat-sim

A flexible, high-performance 3D simulator for Embodied AI research.
https://aihabitat.org/
MIT License
2.55k stars 415 forks source link

Simplify the draw functions in the Renderer class #484

Open bigbike opened 4 years ago

bigbike commented 4 years ago

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 commented 4 years ago

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