コード例 #1
0
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)
コード例 #2
0
ファイル: attribute_utils.py プロジェクト: qnzhou/PyMesh
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);
コード例 #3
0
ファイル: attribute_utils.py プロジェクト: octwanna/PyMesh
def convert_to_voxel_attribute(mesh, attr):
    return PyMesh.convert_to_voxel_attribute(mesh.raw_mesh, attr)