(self, model=None, max_geom=None)
Initializes a new `MjvScene` instance.

    Args:
      model: (optional) An `MjModel` instance.
      max_geom: (optional) An integer specifying the maximum number of geoms
        that can be represented in the scene. If None, this will be chosen
        automatically based on `model`.
Initializes a new `MjvScene` instance.
Initializes a new MjvScene instance .
def __init__(self, model=None, max_geom=None):
    """Initializes a new `MjvScene` instance.

    Args:
      model: (optional) An `MjModel` instance.
      max_geom: (optional) An integer specifying the maximum number of geoms
        that can be represented in the scene. If None, this will be chosen
        automatically based on `model`.
    """
    model_ptr = model.ptr if model is not None else None
    scene_ptr = ctypes.pointer(types.MJVSCENE())

    if max_geom is None:
      if model is None:
        max_renderable_geoms = 0
      else:
        max_renderable_geoms = _estimate_max_renderable_geoms(model)
      max_geom = max(1000, max_renderable_geoms)

    # Allocate and initialize resources for the abstract scene.
    mjlib.mjv_makeScene(model_ptr, scene_ptr, max_geom)

    # Free resources when the ctypes pointer is garbage collected.
    _create_finalizer(scene_ptr, mjlib.mjv_freeScene)

    super().__init__(scene_ptr)
def __init__ ( self , model = None , max_geom = None ) : model_ptr = model . ptr if model is not None else None scene_ptr = ctypes . pointer ( types . MJVSCENE ( ) ) if max_geom is None : if model is None : max_renderable_geoms = 0 else : max_renderable_geoms = _estimate_max_renderable_geoms ( model ) max_geom = max ( 1000 , max_renderable_geoms ) # Allocate and initialize resources for the abstract scene. mjlib . mjv_makeScene ( model_ptr , scene_ptr , max_geom ) # Free resources when the ctypes pointer is garbage collected. _create_finalizer ( scene_ptr , mjlib . mjv_freeScene ) super ( ) . __init__ ( scene_ptr )