Learn R Programming

Rvcg (version 0.24)

vcgSearchKDtree: search an existing KD-tree

Description

search an existing KD-tree

Usage

vcgSearchKDtree(kdtree, query, k, threads = 0)

Value

a list with

index

integer matrices with indeces of closest points

distances

corresponding distances

Arguments

kdtree

object of class vcgKDtree

query

atrix or triangular mesh containing coordinates

k

number of k-closest neighbours to query

threads

integer: number of threads to use

See Also

vcgCreateKDtree

Examples

Run this code
if (FALSE) {
data(humface);data(dummyhead)
mytree <- vcgCreateKDtree(humface)
## get indices and distances for 10 closest points.
closest <- vcgSearchKDtree(mytree,dummyhead.mesh,k=10,threads=1)
}

Run the code above in your browser using DataLab