def convert_to_voxel_attribute(mesh, attr): """ Convert attribute ``attr`` from either per-vertex or per-face attribute into per-voxel attribute. Args: mesh (:py:class:`Mesh`): Input mesh. attr (``numpy.ndarray``): #voxel by k matrix of floats. Returns: Per-voxel attribute. The value at a voxel will be the average of the values at its neighboring vertices or faces. """ return PyMesh.convert_to_voxel_attribute(mesh.raw_mesh, attr)
def convert_to_voxel_attribute(mesh, attr): """ Convert attribute ``attr`` from either per-vertex or per-face attribute into per-voxel attribute. Args: mesh (:py:class:`Mesh`): Input mesh. attr (``numpy.ndarray``): #voxel by k matrix of floats. Returns: Per-voxel attribute. The value at a voxel will be the average of the values at its neighboring vertices or faces. """ return PyMesh.convert_to_voxel_attribute(mesh.raw_mesh, attr);
def convert_to_voxel_attribute(mesh, attr): return PyMesh.convert_to_voxel_attribute(mesh.raw_mesh, attr)