code: def native(meshes, xs, ys, zs, expose_horizon=False, horizon_method='boolean'):
      
  
      centers_flat = meshes.get_column_flat('centers')
      vertices_flat = meshes.get_column_flat('vertices')
      triangles_flat = meshes.get_column_flat('triangles')  # should handle offset automatically
  
      if horizon_method=='boolean':
          normals_flat = meshes.get_column_flat('tnormals')
      elif horizon_method=='linear':
          normals_flat = meshes.get_column_flat('vnormals')
      else:
          raise NotImplementedError
  
      # viewing_vector is defined as star -> earth
      # NOTE: this will need to flip if we change the convention on the z-direction
      viewing_vector = np.array([0., 0., 1.])
  
  
      # we need to send in ALL vertices but only the visible triangle information
      info = libphoebe.mesh_visibility(viewing_vector,
                                       vertices_flat,
                                       triangles_flat,
                                       normals_flat,
                                       tvisibilities=True,
                                       taweights=True,
                                       method=horizon_method,
                                       horizon=expose_horizon)
  
      visibilities = meshes.unpack_column_flat(info['tvisibilities'], computed_type='triangles')
      weights = meshes.unpack_column_flat(info['taweights'], computed_type='triangles')
  
      if expose_horizon:
          horizons = info['horizon']
  
          # TODO: we need to do this per component and somehow return them in
          # a predictable order or as a dictionary a la the other returned quantities
          horizons = [vertices_flat[horizon_i] for horizon_i in horizons]
  
      else:
          horizons = None
  
      return visibilities, weights, horizons
docs: TODO: add documentation
  
      this is the new eclipse detection method in libphoebe