RobWorkProject
24.12.4-
|
calculates contact clusters More...
#include <ContactCluster.hpp>
Static Public Member Functions | |
static int | thresClustering (ContactPoint src[], int srcCnt, int *cIdxSrc, int *cIdxDst, ContactPoint dst[], double maxDist) |
Cluster together contacts using a simple distance threshold. More... | |
static int | normalThresClustering (ContactPoint src[], int srcCnt, int *cIdxSrc, int *cIdxDst, ContactPoint dst[], double maxDist) |
Cluster together contacts that have equal/close normals. More... | |
calculates contact clusters
|
static |
Cluster together contacts that have equal/close normals.
The method takes the point with the deepest penetration first, then takes the contacts with normals within the threshold and creates a cluster. Then the process is repeated for the remaining contacts until all contacts have been treated.
The resulting contacts in dst is one contact from each cluster, and it is that one contact within each cluster with the largest penetration.
The first elements in cIdxSrc gives the index of the deepest point in each cluster in the original src list.
src | [in] the list of input contact points. |
srcCnt | [in] the number of contacts in src. |
cIdxSrc | [out] a vector of indices where srcCnt elements must be reserved. |
cIdxDst | [out] a vector of indices where srcCnt elements must be reserved. |
dst | [out] the result of clustering. |
maxDist | [in] the norm-2 distance threshold for the contact normals. |
|
static |
Cluster together contacts using a simple distance threshold.
The method takes the point with the deepest penetration first, then takes the points within the distance threshold and creates a cluster. Then the process is repeated for the remaining contacts until all contacts have been treated.
The resulting contacts in dst is one contact from each cluster, and it is that one contact within each cluster with the largest penetration.
The first elements in cIdxSrc gives the index of the deepest point in each cluster in the original src list.
src | [in] the list of input contact points. |
srcCnt | [in] the number of contacts in src. |
cIdxSrc | [out] a vector of indices where srcCnt elements must be reserved. |
cIdxDst | [out] a vector of indices where srcCnt elements must be reserved. |
dst | [out] the result of clustering. |
maxDist | [in] the norm-2 distance threshold for the contact positions. |