Main Content


Remove mesh from mesh TSDF

Since R2024a


    isRemoved = removeMesh(mTSDF,id) removes one or more meshes with the specified IDs from the truncated signed distance field (TSDF) and returns an indication of which meshes were successfully removed.

    Input Arguments

    collapse all

    Truncated signed distance field for 3-D meshes, specified as a meshtsdf object.

    Example: meshtsdf(meshes,TruncationDistance=5) creates a TSDF for the specified meshes with a truncation distance of 5 meters.

    ID of mesh to remove, specified as a nonnegative integer or N-element vector of nonnegative integers. N is the total number of meshes to remove.

    Example: removed = removeMesh(tsdf,2) removes meshes in the TSDF with mesh ID of 2.

    Example: removed = removeMesh(tsdf,[1 2 3]) removes meshes in the TSDF with mesh IDs 1, 2, and 3.

    Output Arguments

    collapse all

    Indication of whether meshes were removed or not, returned as logical 1 (true) if the mesh was successfully removed or 0 (false) if id specifies an ID of a mesh that does not exist in mTSDF. If id is an N-element of nonnegative integers, then isRemoved is an N-element vector of logical scalars corresponding to each of the N IDs in id.

    Extended Capabilities

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2024a

    See Also