Geometry — surface parameterization

SurfaceParamerterizer lives in its own page so Breathe does not emit duplicate CGAL typedef declarations that also appear in primitives.h.

class SurfaceParamerterizer
#include <surface_paramerterizer.h>

Public Functions

glm::vec3 get_point_on_mesh()
inline bool is_valid() const

Check if parameterization was successful.

glm::vec3 lift_point(glm::vec2 uv_point)

Lifts a point from normalized UV space [0,1]^2 to 3D space on the surface.

Parameters:

uv_point – The normalized UV point to lift (coordinates in [0,1])

Returns:

The lifted 3D point on the surface, or glm::vec3(0,0,0) if outside

glm::vec2 project_point(glm::vec3 xyz_point)
SurfaceParamerterizer(std::string surface_mesh_path)

Private Functions

bool barycentric_in_triangle(const SC_Point_2 &q, const SC_Point_2 &a, const SC_Point_2 &b, const SC_Point_2 &c, double &l0, double &l1, double &l2) const
SC_Point_3 closest_point_on_triangle(const SC_Point_3 &q, const SC_Point_3 &a, const SC_Point_3 &b, const SC_Point_3 &c, double &l0, double &l1, double &l2) const
void compute_uv_bbox_()
SC_Point_2 from_unit(const SC_Point_2 &p01) const
bool lift(const UvIndex &idx, SC_Point_3 &out_p) const
bool locate(const SC_Point_2 &q_uv, UvIndex &out_idx) const
SC_Point_2 to_unit(const SC_Point_2 &p) const

Private Members

double eps_
SC_SurfaceMesh sm_
UV_pmap uv_map_
SC_Point_2 uv_max_
SC_Point_2 uv_min_
bool valid_
struct UvIndex

Public Members

face_descriptor f
std::array<double, 3> w