Usage
vcgClostKD(x, mesh, sign = TRUE, barycentric = FALSE,
smoothNormals = FALSE, borderchk = FALSE, k = 50, nofPoints = 16,
maxDepth = 64, angdev = NULL, weightnorm = FALSE, ...)
Arguments
x
k x 3 matrix containing 3D-coordinates or object of class "mesh3d".
mesh
triangular surface mesh stored as object of class "mesh3d".
sign
logical: if TRUE, signed distances are returned.
barycentric
logical: if TRUE, barycentric coordinates of the hit
points are returned.
smoothNormals
logical: if TRUE, laplacian smoothed normals are used.
borderchk
logical: request checking if the hit face is at the border of the mesh.
k
integer: check the kdtree for thek closest faces (using faces' barycenters.
nofPoints
integer: number of points per cell in the kd-tree (don't change unless you know what you are doing!)
maxDepth
integer: depth of the kd-tree (don't change unless you know what you are doing!)
angdev
maximum deviation between reference and target normals. If the none of the k closest triangles match this criterion, the closest point on the closest triangle is returned but the corresponding distance in $quality is set to 1e5.
weightnorm
logical if angdev is set, this requests the normal of the closest points to be estimated by weighting the surrounding vertex normals. Otherwise, simply the hit face's normal is used (faster but slightly less accurate).
...
additional parameters, currently unused.