pub type Scalar = f64;
pub type Vec3 = [Scalar; 3];
#[cfg(feature = "exact")]
pub type ExactScalar = num_rational::Rational64;
pub mod boolean;
pub mod builtin_attrs;
pub mod bvh;
pub mod cache;
pub mod conformal;
pub mod connectivity;
pub mod decimate;
pub mod deformation;
#[doc(hidden)]
pub mod direction_field;
#[doc(hidden)]
pub mod export;
pub mod geodesics;
pub mod geometry;
pub mod ids;
#[doc(hidden)]
pub mod intrinsic;
pub mod io;
pub mod linalg;
pub mod orientation;
pub mod parameterization;
pub mod predicates;
pub mod primitives;
pub mod property;
#[doc(hidden)]
pub mod query;
pub mod remesh;
pub mod repair;
pub mod sdf;
pub mod storage;
pub mod subdiv;
#[doc(hidden)]
pub mod test_util;
pub mod topology_ops;
pub mod traversal;
#[doc(hidden)]
pub mod triangulation;
pub mod validate;
pub mod weld;
pub use boolean::{
BoolOp, boolean_difference, boolean_intersection, boolean_operation,
boolean_symmetric_difference, boolean_union,
};
pub use builtin_attrs::{
FaceColor, FaceNormal, FaceOpacity, FaceSelected, HalfEdgeColor, HalfEdgeSelected,
HalfEdgeThickness, VertexColor, VertexNormal, VertexSelected, VertexSize, VertexUv,
add_face_colors, add_face_normals, add_face_opacity, add_face_selection, add_halfedge_colors,
add_halfedge_selection, add_halfedge_thickness, add_vertex_colors, add_vertex_normals,
add_vertex_selection, add_vertex_sizes, add_vertex_uvs, clear_face_colors, clear_face_opacity,
clear_face_selection, clear_halfedge_selection, clear_halfedge_thickness,
clear_vertex_selection, clear_vertex_sizes, collect_vertex_colors, collect_vertex_normals,
collect_vertex_uvs, count_selected_faces, count_selected_vertices, deselect_edge,
deselect_face, deselect_halfedge, deselect_vertex, edge_color, edge_thickness, face_color,
face_opacity, format_obj_with_attrs, halfedge_thickness, install_vertex_attrs,
invert_vertex_selection, is_edge_selected, is_face_selected, is_halfedge_selected,
is_vertex_selected, parse_obj_with_attrs, populate_face_normals, populate_vertex_normals,
select_all_faces, select_all_vertices, select_edge, select_face, select_halfedge,
select_vertex, selected_edge_ids, selected_face_ids, selected_halfedge_ids,
selected_vertex_ids, set_edge_color, set_edge_thickness, set_face_color, set_face_opacity,
set_halfedge_thickness, set_uniform_edge_thickness, set_uniform_face_opacity,
set_uniform_vertex_size, set_vertex_size, toggle_edge_selection, toggle_face_selection,
toggle_halfedge_selection, toggle_vertex_selection, vertex_size,
};
pub use bvh::{Bvh, LEAF_MAX_FACES};
pub use conformal::{
apply_mobius_transform, compute_vertex_scale_factors, harmonic_map, mobius_to_center,
};
pub use connectivity::{
component_count, component_of_face, connected_components, extract_component, extract_faces,
merge_meshes, split_into_components, vertex_connected_components,
};
pub use decimate::{decimate_qem, decimate_to_vertices};
pub use deformation::{DeformationConstraint, arap_deformation, laplacian_deformation};
pub use direction_field::{
FaceLocalFrame, Singularity, build_face_local_frames, compute_transport_angles,
detect_singularities, smoothest_cross_field, smoothest_frame_field, smoothest_nrosy,
smoothest_vector_field,
};
pub use export::mesh_to_vertex_index_buffers;
pub use geodesics::{
dijkstra_geodesic, dijkstra_multi_source_geodesic, dijkstra_shortest_path,
dijkstra_with_parent, geodesic_distance_from_vertex, multi_source_geodesic, shortest_path,
};
pub use geometry::{
AABB, EdgeLengthStats, MeshQualityStats, RayHit, VertexCurvature, all_gaussian_curvatures_par,
all_mean_curvatures_par, bilateral_smooth_mesh, closest_point_on_triangle, cotan_laplacian,
dihedral_angle, edge_length, edge_length_stats, face_area, face_aspect_ratio, face_min_angle,
face_normal, face_radius_ratio, feature_edges, feature_edges_par, gaussian_curvature,
is_feature_edge, laplacian_smooth_mesh, laplacian_smooth_mesh_par, laplacian_smooth_vertex,
mean_curvature, mesh_aabb, mesh_centroid, mesh_quality, mesh_volume, mesh_volume_par,
point_triangle_distance, polygon_area, polygon_normal, principal_curvatures,
ray_mesh_intersection, ray_mesh_intersection_par, ray_mesh_intersects,
ray_triangle_intersection, surface_area, surface_area_par, taubin_smooth_mesh,
vertex_curvature, vertex_normal, vertex_normals_par,
};
pub use ids::{EdgeId, FaceId, HalfEdgeId, VertexId};
pub use intrinsic::{
IntrinsicDelaunayStats, compute_intrinsic_lengths, intrinsic_cotan_weight, intrinsic_delaunay,
is_intrinsic_delaunay_edge,
};
pub use io::{
MeshBuildError, MeshError, ObjError, PlyError, StlError, build_mesh_from_polygons,
build_mesh_from_vertices_and_faces, format_obj, format_ply, format_stl_ascii,
format_stl_binary, load_mesh, load_obj, load_ply, load_stl, parse_obj, parse_ply,
parse_stl_ascii, parse_stl_binary, parse_stl_bytes, save_mesh, save_obj, save_ply,
save_stl_ascii, save_stl_binary,
};
pub use linalg::{
SparseSystem, build_cotan_laplacian, build_vertex_index, conjugate_gradient,
regularize_diagonal,
};
pub use orientation::{are_normals_consistent, fix_orientations, is_orientable};
pub use parameterization::{
harmonic_parameterization, lscm, mvc_parameterization, tutte_embedding,
};
pub use predicates::{
incircle, insphere, is_ccw2d, is_collinear2d, is_convex_vertex2d, is_coplanar, orient2d,
orient3d, point_in_triangle_2d, signed_area2d, tet_signed_volume, triangle_area_2d,
};
pub use primitives::{
build_cone, build_cube, build_cylinder, build_grid, build_torus, build_uv_sphere,
};
pub use property::{MeshProperties, PropertyHandle, PropertyStore};
pub use remesh::{RemeshStats, isotropic_remesh, quick_remesh, remesh_to_length};
pub use repair::{
RepairStats, detect_nonmanifold_edges, detect_nonmanifold_vertices, fill_all_holes, fill_hole,
remove_degenerate_faces, remove_face, remove_isolated_vertices, repair_mesh,
};
pub use sdf::{
McParams, Sdf, SdfBox, SdfCapsule, SdfDifference, SdfIntersection, SdfSmoothUnion, SdfSphere,
SdfTorus, SdfTranslate, SdfUnion, march_field, march_sdf,
};
pub use storage::{Face, HalfEdge, MeshStorage, Vertex};
pub use subdiv::catmull_clark::catmull_clark_subdivide;
pub use subdiv::loop_subdivide;
pub use subdiv::sqrt3::sqrt3_subdivide;
pub use test_util::build_icosphere;
pub use topology_ops::{
TopologyError, add_triangle, collapse_edge, collapse_edge_at, extrude_face, extrude_faces,
extrude_region, flip_edge, split_edge, split_face, validate_mesh,
};
pub use traversal::{
BoundaryLoop, BoundaryLoopLazy, EdgeIter, VertexAdjacentEdges, boundary_loops,
is_boundary_edge, is_boundary_vertex, is_closed,
};
pub use triangulation::{ear_clipping, ear_clipping_3d, fan_triangulation, fan_triangulation_3d};
pub use validate::{ValidationError, check_topology, validate_first_error, validate_topology};
pub use weld::weld_vertices;