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>
Component mapping operations matching uniform 2D parametric plane domains evaluated against 3D base mesh topologies.
Public Functions
-
glm::vec3 get_point_on_mesh()
Fetch initial source point component geometry to debug projection limits.
- Returns:
Extracted vertex coordinate parameter.
-
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)
Evaluates an arbitrary 3D position extracting associated parametric UV coordinate mappings evaluating closest surface offsets.
- Parameters:
xyz_point – Source 3D coordinates.
- Returns:
Mapped offset coordinate components in projected space.
-
SurfaceParamerterizer(std::string surface_mesh_path)
Constructs a parameterization space loaded against an input base mesh representation.
- Parameters:
surface_mesh_path – File location mapping initial boundary geometries.
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
-
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
-
glm::vec3 get_point_on_mesh()