|
|
template<typename T1 , typename T2 > |
| auto | dot (const T1 &a, const T2 &b) |
| | Vector dot product (inner product)
|
| |
|
template<typename T1 , typename T2 > |
| auto | cross (const T1 &a, const T2 &b) -> T1 |
| | Vector cross product.
|
| |
|
template<class Vector > |
| auto | norm (const Vector &v, Norm norm=Norm::L2) |
| | Compute vector norm.
|
| |
|
template<class Vector > |
| auto | normalize (Vector v) |
| | Normalize a vector (i.e. compute a unit vector)
|
| |
|
template<class Vector1 , class Vector2 > |
| auto | interior_angle (const Vector1 &a, const Vector2 &b) |
| | Compute the interior angle between two vectors.
|
| |
|
template<typename T = float, typename T2 , std::enable_if_t< std::is_floating_point_v< T >, bool > = true> |
| constexpr auto | to_radians (T2 deg) -> T |
| | Convert degrees to radians.
|
| |
|
template<typename T = float, typename T2 , std::enable_if_t< std::is_floating_point_v< T >, bool > = true> |
| constexpr auto | to_degrees (T2 rad) -> T |
| | Convert radians to degrees.
|
| |
| template<typename T , std::size_t Dims> |
| std::ostream & | operator<< (std::ostream &os, const Vec< T, Dims > &vec) |
| |
| template<class FacePtr > |
| void | ComputeFaceAngles (FacePtr &face) |
| | Compute the internal angles of a face.
|
| |
| template<class MeshPtr > |
| void | ComputeMeshAngles (MeshPtr &mesh) |
| | Compute the internal angles for all faces in a mesh.
|
| |
|
template<class MeshPtr > |
| auto | HasBoundary (const MeshPtr &mesh) -> bool |
| | Determines if mesh is open or closed.
|
| |
| template<class MeshPtr > |
| auto | HasUnreferencedVertices (const MeshPtr &mesh) -> bool |
| | Check if a mesh has unreferenced vertices.
|
| |
| template<class MeshPtr > |
| auto | UnreferencedVertices (const MeshPtr &mesh) -> std::vector< std::size_t > |
| | Get a list of unreferenced vertices.
|
| |
|
template<class MeshPtr > |
| auto | IsManifold (const MeshPtr &mesh) -> bool |
| | Check if mesh is manifold.
|
| |
| template<class MeshPtr > |
| auto | FindEdgePath (const MeshPtr &mesh, std::size_t from, std::size_t to) |
| | Find an edge path between two vertices.
|
| |
|
template<class MeshType > |
| auto | ReadMesh (const std::filesystem::path &path) |
| | Load a HalfEdgeMesh from a file.
|
| |
|
template<class MeshPtr > |
| void | WriteMesh (const std::filesystem::path &path, const MeshPtr &mesh) |
| | Write a HalfEdgeMesh to a file.
|
| |
OpenABF top-level namespace
| auto OpenABF::FindEdgePath |
( |
const MeshPtr & |
mesh, |
|
|
std::size_t |
from, |
|
|
std::size_t |
to |
|
) |
| |
|
private |
Find an edge path between two vertices.
Uses Dijkstra's algorithm to find the shortest path between two vertices. Distance is measured using the edge lengths of the mesh. The returned mesh is not guaranteed to be the only shortest path (there may be many which have the same length), but only the first discovered.
If the returned list is empty, the endpoints are the same or a path between the two endpoints does not exist (i.e. the mesh has multiple connected components).
- Returns
- std::vector<EdgePtr>