# meshtsdf

## Description

The `meshtsdf`

discretizes meshes and stores their associated
truncated signed distance fields (TSDF) over a voxelized 3-D space. Voxels that are outside of
a mesh contain positive distances and voxels that are inside a mesh have negative distance.
Any voxels that are more than a specified truncation distance from meshes have values equal to
the truncation distance. Once you create the TSDF, you can modify the poses of meshes and get
updated distance and gradient information over the discretized region.

## Creation

### Description

creates an empty TSDF
manager with default properties.`mTSDF`

= meshtsdf

specifies one or more meshes and computes the signed distance over each meshes truncated
region. Use the `mTSDF`

= meshtsdf(`meshStruct`

)`geom2struct`

function to convert geometry objects into an array of mesh structures.

specifies properties using one or more name-value arguments in addition to the arguments
from other syntaxes. For example, `mTSDF`

= meshtsdf(___,`Name=Value`

)`meshtsdf(TruncationDistance=10)`

sets
the truncation distance to `10`

meters.

### Input Arguments

## Properties

## Object Functions

`activeVoxels` | Return information about active voxels |

`addMesh` | Add mesh to mesh TSDF |

`copy` | Deep copy TSDF |

`removeMesh` | Remove mesh from mesh TSDF |

`distance` | Compute distance to zero level set for query points |

`gradient` | Compute gradient of truncated signed distance field |

`poses` | Get poses for one or more meshes in TSDF |

`updatePose` | Update pose of mesh in TSDF |

`show` | Display TSDF in figure |

## Examples

## Limitations

`meshtsdf`

supports`packNGo`

(MATLAB Coder) only for MATLAB^{®}host targets.

## References

[1] Zhao, Hongkai. “A Fast Sweeping
Method for Eikonal Equations.” *Mathematics of Computation* 74, no. 250
(May 21, 2004): 603–27. https://doi.org/10.1090/S0025-5718-04-01678-3.

## Extended Capabilities

## Version History

**Introduced in R2024a**

## See Also

### Topics

- Pick-And-Place Workflow Using CHOMP for Manipulators (Robotics System Toolbox)