(entity, alpha=None)
Modifies an entity for use as a 'visual hint'.

  Contacts will be disabled for all geoms within the entity, and its bodies will
  be converted to "mocap" bodies (which are viewed as fixed from the perspective
  of the dynamics). The geom alpha values may also be overridden to render the
  geoms as translucent.

  Args:
    entity: A `composer.Entity`, modified in place.
    alpha: Optional float between 0 and 1, used to override the alpha values for
      all of the geoms in this entity.
Modifies an entity for use as a 'visual hint'.
Modifies an entity for use as a visual hint .
def _hintify(entity, alpha=None):
  """Modifies an entity for use as a 'visual hint'.

  Contacts will be disabled for all geoms within the entity, and its bodies will
  be converted to "mocap" bodies (which are viewed as fixed from the perspective
  of the dynamics). The geom alpha values may also be overridden to render the
  geoms as translucent.

  Args:
    entity: A `composer.Entity`, modified in place.
    alpha: Optional float between 0 and 1, used to override the alpha values for
      all of the geoms in this entity.
  """
  for subentity in entity.iter_entities():
    # TODO(b/112084359): This assumes that all geoms either define explicit RGBA
    #                    values, or inherit from the top-level default. It will
    #                    not correctly handle more complicated hierarchies of
    #                    default classes.
    if (alpha is not None
        and subentity.mjcf_model.default.geom is not None
        and subentity.mjcf_model.default.geom.rgba is not None):
      subentity.mjcf_model.default.geom.rgba = _replace_alpha(
          subentity.mjcf_model.default.geom.rgba, alpha=alpha)
    for body in subentity.mjcf_model.find_all('body'):
      body.mocap = 'true'
    for geom in subentity.mjcf_model.find_all('geom'):
      if alpha is not None and geom.rgba is not None:
        geom.rgba = _replace_alpha(geom.rgba, alpha=alpha)
      geom.contype = 0
      geom.conaffinity = 0
def _hintify ( entity , alpha = None ) : for subentity in entity . iter_entities ( ) : # TODO(b/112084359): This assumes that all geoms either define explicit RGBA #                    values, or inherit from the top-level default. It will #                    not correctly handle more complicated hierarchies of #                    default classes. if ( alpha is not None and subentity . mjcf_model . default . geom is not None and subentity . mjcf_model . default . geom . rgba is not None ) : subentity . mjcf_model . default . geom . rgba = _replace_alpha ( subentity . mjcf_model . default . geom . rgba , alpha = alpha ) for body in subentity . mjcf_model . find_all ( 'body' ) : body . mocap = 'true' for geom in subentity . mjcf_model . find_all ( 'geom' ) : if alpha is not None and geom . rgba is not None : geom . rgba = _replace_alpha ( geom . rgba , alpha = alpha ) geom . contype = 0 geom . conaffinity = 0