SurfaceGeodesic Class Reference

Compute geodesic distance from a set of seed vertices. More...

`#include <pmp/algorithms/SurfaceGeodesic.h>`

## Public Member Functions | |

SurfaceGeodesic (SurfaceMesh &mesh, bool use_virtual_edges=true) | |

Construct with mesh. More... | |

unsigned int | compute (const std::vector< Vertex > &seed, Scalar maxdist=FLT_MAX, unsigned int maxnum=INT_MAX, std::vector< Vertex > *neighbors=nullptr) |

Compute geodesic distances from specified seed points up to the specified maximum distance and up to a maximum number of neighbors. More... | |

Scalar | operator() (Vertex v) const |

access computed geodesic distance | |

void | distance_to_texture_coordinates () |

use (normalized) distances as texture coordinates | |

Compute geodesic distance from a set of seed vertices.

The methods works by a Dykstra-like breadth first traversal from the seed vertices, implemented by a head structure. See [10] for details.

SurfaceGeodesic | ( | SurfaceMesh & | mesh, |

bool | use_virtual_edges = `true` |
||

) |

Construct with mesh.

Computes virtual edges only (if set to true). Call compute() to compute geodesic distances.

unsigned int compute | ( | const std::vector< Vertex > & | seed, |

Scalar | maxdist = `FLT_MAX` , |
||

unsigned int | maxnum = `INT_MAX` , |
||

std::vector< Vertex > * | neighbors = `nullptr` |
||

) |

Compute geodesic distances from specified seed points up to the specified maximum distance and up to a maximum number of neighbors.

returns how many neighbors have been found