Adds an object to the scene. Parameters ---------- name : str An identifier for the object. obj : SceneObject A SceneObject representing the object, including its pose and material properties.
(self, name, obj)
| 93 | self._camera = camera |
| 94 | |
| 95 | def add_object(self, name, obj): |
| 96 | """Adds an object to the scene. |
| 97 | |
| 98 | Parameters |
| 99 | ---------- |
| 100 | name : str |
| 101 | An identifier for the object. |
| 102 | obj : SceneObject |
| 103 | A SceneObject representing the object, including its pose and material properties. |
| 104 | """ |
| 105 | if not isinstance(obj, SceneObject): |
| 106 | raise ValueError('obj must be an object of type SceneObject') |
| 107 | self._objects[name] = obj |
| 108 | self.close_renderer() |
| 109 | |
| 110 | def remove_object(self, name): |
| 111 | """Removes an object from the scene. |
no test coverage detected