Single source approximate geodesic distance using the heat method.
More...
#include <GeodesicsInHeat.h>
|
using | FT = FT_t< Mesh > |
|
using | Vector_3 = Vector_3_t< Mesh > |
|
using | SpMat = Eigen::SparseMatrix< FT > |
|
|
void | build (const Mesh &mesh, float scale=1.0f, FT resolution=0, const SpMat *cot_mat=nullptr, const SpMat *mass_mat=nullptr) |
| Build up the necesssary computational components. More...
|
|
void | scale (float scale) |
| Reset the time scale. More...
|
|
template<typename T > |
void | compute (const typename boost::graph_traits< const Mesh >::vertex_descriptor &v, std::vector< T > &geodesics) |
| Compute geodesics distance from a vertex. More...
|
|
template<typename Mesh>
class Euclid::GeodesicsInHeat< Mesh >
Reference
Crane K, Weischedel C, Wardetzky M. Geodesics in heat: A new approach to computing distance based on heat flow. ACM Transactions on Graphics (TOG), 2013.
template<typename Mesh >
void Euclid::GeodesicsInHeat< Mesh >::build |
( |
const Mesh & |
mesh, |
|
|
float |
scale = 1.0f , |
|
|
FT |
resolution = 0 , |
|
|
const SpMat * |
cot_mat = nullptr , |
|
|
const SpMat * |
mass_mat = nullptr |
|
) |
| |
Compute the Laplacian matrix and pre-factor the linear system.
- Parameters
-
mesh | Target triangle mesh. |
scale | The time scale of the heat diffusion, relative to the average edge length of the mesh. |
resolution | The average edge length of the mesh, provide a value if you have already computed it, otherwise it'll be computed internally. |
cot_mat | The cotangent matrix of the mesh, provide a value if you have already computed it, otherwise it'll be computed internally. |
mass_mat | The mass matrix of the mesh, provide a value if you have already computed it, otherwise it'll be computed internally. |
template<typename Mesh >
template<typename T >
void Euclid::GeodesicsInHeat< Mesh >::compute |
( |
const typename boost::graph_traits< const Mesh >::vertex_descriptor & |
v, |
|
|
std::vector< T > & |
geodesics |
|
) |
| |
- Parameters
-
v | The vertex descriptor. |
geodesics | The output geodesics distances from all the mesh vertices to the target vertex v. |
- Parameters
-
scale | The time scale of the heat diffusion, relative to the average edge length of the mesh. |
If you directly set this member without calling the build, you need to update heat_solver and poisson_solver manually.
If you directly set this member without calling the build, you need to update heat_solver and poisson_solver manually.
The documentation for this class was generated from the following files: