|
float | triangle_area (const SurfaceMesh *mesh, SurfaceMesh::Face f) |
| Compute the area of a triangle face in a mesh.
|
|
float | surface_area (const SurfaceMesh *mesh) |
| Compute the surface area of the mesh.
|
|
float | volume (const SurfaceMesh *mesh) |
| Compute the volume of a mesh.
|
|
vec3 | centroid (const SurfaceMesh *mesh, SurfaceMesh::Face f) |
| Compute the barycenter/centroid of a face.
|
|
vec3 | centroid (const SurfaceMesh *mesh) |
| Compute the barycenter/centroid of the mesh.
|
|
void | dual (SurfaceMesh *mesh) |
| Compute the dual of a mesh.
|
|
double | cotan_weight (const SurfaceMesh *mesh, SurfaceMesh::Edge e) |
| Compute the cotangent weight for an edge.
|
|
double | voronoi_area (const SurfaceMesh *mesh, SurfaceMesh::Vertex v) |
| Compute the (mixed) Voronoi area of a vertex.
|
|
double | voronoi_area_barycentric (const SurfaceMesh *mesh, SurfaceMesh::Vertex v) |
| Compute the barycentric Voronoi area of a vertex.
|
|
vec3 | laplace (const SurfaceMesh *mesh, SurfaceMesh::Vertex v) |
| Compute the Laplace vector for a vertex.
|
|
double | angle_sum (const SurfaceMesh *mesh, SurfaceMesh::Vertex v) |
| Compute the sum of angles around a vertex.
|
|
VertexCurvature | vertex_curvature (const SurfaceMesh *mesh, SurfaceMesh::Vertex v) |
| Compute min, max, mean, and Gaussian curvature for a vertex.
|
|
template<int DIM, typename FT> |
GenericBox< DIM, FT > | box_union (GenericBox< DIM, FT > const &a, GenericBox< DIM, FT > const &b) |
| Compute the union of two boxes.
|
|
template<int DIM, typename FT> |
GenericBox< DIM, FT > | box_intersection (GenericBox< DIM, FT > const &a, GenericBox< DIM, FT > const &b) |
| Compute the intersection of two boxes.
|
|
template<typename FT> |
bool | intersect (const GenericPlane< FT > &plane1, const GenericPlane< FT > &plane2, const GenericPlane< FT > &plane3, typename GenericPlane< FT >::Point3 &point) |
|
vec3 | orthogonal (const vec3 &v) |
| Returns a vector orthogonal to v. Its norm() depends on v, but is zero only for a null v.
|
|
template<typename Box, typename Container> |
Box | bounding_box (const Container &points) |
| Computes the bounding box of a set of points.
|
|
template<typename Vec, typename Container> |
Vec | centroid (const Container &points) |
| Computes the centroid of a set of points.
|
|
template<typename Vec> |
Vec | barycenter (const Vec &p1, const Vec &p2) |
| Computes the barycenter of two points.
|
|
template<typename Vec> |
Vec | barycenter (const Vec &p1, const Vec &p2, const Vec &p3) |
| Computes the barycenter of three points.
|
|
template<typename Vec> |
Vec | barycenter (const Vec &p1, const Vec &p2, const Vec &p3, const Vec &p4) |
| Computes the barycenter of four points.
|
|
template<typename FT> |
Vec< 3, FT > | barycentric_coordinates (const Vec< 3, FT > &p, const Vec< 3, FT > &u, const Vec< 3, FT > &v, const Vec< 3, FT > &w) |
| Computes the barycentric coordinates of a point p with respect to three points u , v , and w .
|
|
bool | point_in_polygon (const vec2 &p, const std::vector< vec2 > &polygon) |
| Tests if a point p lies inside or outside of a polygon . This function is robust to handle general polygons (no matter convex or concave).
|
|
double | clamp_cot (const double v) |
| Clamps cotangent values as if angles are in [1, 179].
|
|
double | clamp_cos (const double v) |
| Clamps cosine values as if angles are in [1, 179].
|
|
template<typename Vec> |
double | cos_angle (const Vec &a, const Vec &b) |
| Computes cosine of angle between two (un-normalized) vectors.
|
|
template<typename Vec> |
double | sin_angle (const Vec &a, const Vec &b) |
| Computes sine of angle between two (un-normalized) vectors.
|
|
template<typename Vec> |
Vec::FT | cotan_angle (const Vec &a, const Vec &b) |
| Computes cotangent of angle between two (un-normalized) vectors.
|
|
template<typename Vec> |
double | angle (const Vec &a, const Vec &b) |
| Computes angle between two (un-normalized) vectors.
|
|
template<typename FT> |
FT | to_radians (FT degrees) |
| Converts an angle from degrees to radians.
|
|
template<typename FT> |
FT | to_degrees (FT radians) |
| Converts an angle from radians to degrees.
|
|
float | triangle_area (const vec3 &p1, const vec3 &p2, const vec3 &p3) |
| Computes area of a triangle given by three points.
|
|
float | triangle_signed_area (const vec2 &p1, const vec2 &p2, const vec2 &p3) |
| Computes signed area of a triangle given by three points.
|
|
vec3 | triangle_normal (const vec3 &p1, const vec3 &p2, const vec3 &p3) |
| Computes the normal vector of a triangle given by three points.
|
|
float | dist_point_line_segment (const vec3 &p, const vec3 &v0, const vec3 &v1, vec3 &nearest_point) |
| Computes the distance of a point p to a line segment given by vec3s (v0,v1).
|
|
float | dist_point_triangle (const vec3 &p, const vec3 &v0, const vec3 &v1, const vec3 &v2, vec3 &nearest_point) |
| Computes the distance of a point p to the triangle given by vec3s (v0, v1, v2).
|
|
vec3 | tetra_circum_center (const vec3 &p, const vec3 &q, const vec3 &r, const vec3 &s) |
| Computes the circum center of a tetrahedron.
|
|
Functions for basic geometric computations.