scene_synthesizer.utils.add_node_to_scene

scene_synthesizer.utils.add_node_to_scene(scene, **kwargs)

Add a new node (and edge) to the scene graph. Uses the same arguments as trimesh.Scene.add_geometry(…). But will just add a transformation to the scene graph if geometry is None or missing, by delegating to trimesh.Scene.graph.update(…).

Parameters:
  • scene (trimesh.scene.Scene) – The scene to add a new node to.

  • **node_name (str) – Name of the added node.

  • **parent_node_name (str) – Name of the parent node in the graph.

  • **geometry (trimesh.Trimesh, ...) – Added geometry.

  • **geom_name (str) – Name of the added geometry.

  • **transform (np.ndarray) – 4x4 homomgeneous transformation matrix that applies to the added node.

  • **constants.EDGE_KEY_METADATA (dict) – Optional metadata for the node.

  • **node_data (dict) – A node data dictionary.