|
|
constexpr AttributeId | invalid_attribute_id () |
| | Invalid attribute id.
|
| |
|
template<typename AttributeArray, typename Archive> |
| void | serialize (Attributes< AttributeArray > &attributes, Archive &ar) |
| |
| template<typename ValueType> |
| constexpr AttributeValueType | make_attribute_value_type () |
| | Creates an enum describing an attribute value type.
|
| |
| template<typename ToScalar, typename ToIndex, typename FromScalar, typename FromIndex> |
| SurfaceMesh< ToScalar, ToIndex > | cast (const SurfaceMesh< FromScalar, FromIndex > &source_mesh, const AttributeFilter &convertible_attributes={}, std::vector< std::string > *converted_attributes_names=nullptr) |
| | Cast a mesh to a mesh of different scalar and/or index type.
|
| |
| template<typename ToValueType, typename Scalar, typename Index> |
| AttributeId | cast_attribute (SurfaceMesh< Scalar, Index > &mesh, AttributeId source_id, std::string_view target_name) |
| | Cast an attribute in place to a different value type.
|
| |
| template<typename ToValueType, typename Scalar, typename Index> |
| AttributeId | cast_attribute (SurfaceMesh< Scalar, Index > &mesh, std::string_view source_name, std::string_view target_name) |
| | Cast an attribute in place to a different value type.
|
| |
| template<typename ToValueType, typename Scalar, typename Index> |
| AttributeId | cast_attribute_in_place (SurfaceMesh< Scalar, Index > &mesh, AttributeId attribute_id) |
| | Cast an attribute in place to a different value type.
|
| |
| template<typename ToValueType, typename Scalar, typename Index> |
| AttributeId | cast_attribute_in_place (SurfaceMesh< Scalar, Index > &mesh, std::string_view name) |
| | Cast an attribute in place to a different value type.
|
| |
| template<typename DerivedF, typename DerivedC, typename DerivedE, typename DerivedN> |
| void | chain_corners_around_edges (const Eigen::MatrixBase< DerivedF > &facets, const Eigen::MatrixBase< DerivedC > &corner_to_edge, Eigen::PlainObjectBase< DerivedE > &edge_to_corner, Eigen::PlainObjectBase< DerivedN > &next_corner_around_edge) |
| | Chains facet corners around edges of a mesh.
|
| |
| template<typename DerivedF, typename DerivedE, typename DerivedN> |
| void | chain_corners_around_vertices (typename DerivedF::Scalar num_vertices, const Eigen::MatrixBase< DerivedF > &facets, Eigen::PlainObjectBase< DerivedE > &vertex_to_corner, Eigen::PlainObjectBase< DerivedN > &next_corner_around_vertex) |
| | Chains facet corners around vertices of a mesh.
|
| |
| template<typename Scalar, typename Index> |
| SurfaceMesh< Scalar, Index > | combine_meshes (std::initializer_list< const SurfaceMesh< Scalar, Index > * > meshes, bool preserve_attributes=true) |
| | Combine multiple meshes into a single mesh.
|
| |
| template<typename Scalar, typename Index> |
| SurfaceMesh< Scalar, Index > | combine_meshes (span< const SurfaceMesh< Scalar, Index > > meshes, bool preserve_attributes=true) |
| | Combine multiple meshes into a single mesh.
|
| |
| template<typename Scalar, typename Index> |
| SurfaceMesh< Scalar, Index > | combine_meshes (size_t num_meshes, function_ref< const SurfaceMesh< Scalar, Index > &(size_t)> get_mesh, bool preserve_attributes=true) |
| | Combine multiple meshes into a single mesh.
|
| |
| template<typename Derived1, typename Derived2> |
| void | move_data (Eigen::DenseBase< Derived1 > &from, Eigen::DenseBase< Derived2 > &to) |
| | Move data from one Eigen obj to another.
|
| |
|
template<class T> |
| std::shared_ptr< T > | to_shared_ptr (std::unique_ptr< T > &&ptr) |
| | Helper for automatic type deduction for unique_ptr to shared_ptr conversion.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_facet_area (SurfaceMesh< Scalar, Index > &mesh, FacetAreaOptions options={}) |
| | Compute per-facet area.
|
| |
| template<typename Scalar, typename Index, int Dimension> |
| AttributeId | compute_facet_area (SurfaceMesh< Scalar, Index > &mesh, const Eigen::Transform< Scalar, Dimension, Eigen::Affine > &transformation, FacetAreaOptions options={}) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Also applies an affine transformation to the mesh geometry before computing areas.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_facet_vector_area (SurfaceMesh< Scalar, Index > &mesh, FacetVectorAreaOptions options={}) |
| | Compute per-facet vector area.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_facet_vector_area (SurfaceMesh< Scalar, Index > &mesh, const Eigen::Transform< Scalar, 3, Eigen::Affine > &transformation, FacetVectorAreaOptions options={}) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Also applies an affine transformation to the mesh geometry before computing vector areas.
|
| |
| template<typename Scalar, typename Index> |
| Scalar | compute_mesh_area (const SurfaceMesh< Scalar, Index > &mesh, MeshAreaOptions options={}) |
| | Compute mesh area.
|
| |
| template<typename Scalar, typename Index, int Dimension> |
| Scalar | compute_mesh_area (const SurfaceMesh< Scalar, Index > &mesh, const Eigen::Transform< Scalar, Dimension, Eigen::Affine > &transformation, MeshAreaOptions options={}) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Also applies an affine transformation to the mesh geometry before computing the total area.
|
| |
| template<typename Scalar, typename Index> |
| Scalar | compute_uv_area (const SurfaceMesh< Scalar, Index > &mesh, MeshAreaOptions options={}) |
| | Compute UV mesh area.
|
| |
| template<typename PointType> |
| auto | compute_barycentric_coordinates (const Eigen::MatrixBase< PointType > &v0, const Eigen::MatrixBase< PointType > &v1, const Eigen::MatrixBase< PointType > &v2, const Eigen::MatrixBase< PointType > &p) -> Eigen::Matrix< typename PointType::Scalar, 3, 1 > |
| | Compute the barycentric coordinates of point p with respect to triangle (v0, v1, v2).
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_facet_centroid (SurfaceMesh< Scalar, Index > &mesh, FacetCentroidOptions options={}) |
| | Compute per-facet centroid.
|
| |
| template<typename Scalar, typename Index> |
| void | compute_mesh_centroid (const SurfaceMesh< Scalar, Index > &mesh, span< Scalar > centroid, MeshCentroidOptions options={}) |
| | Compute mesh centroid, where mesh centroid is defined as the weighted sum of facet centroids.
|
| |
| template<typename Scalar, typename Index> |
| size_t | compute_components (SurfaceMesh< Scalar, Index > &mesh, ComponentOptions options={}) |
| | Compute connected components of an input mesh.
|
| |
| template<typename Scalar, typename Index> |
| size_t | compute_components (SurfaceMesh< Scalar, Index > &mesh, span< const Index > blocker_elements, ComponentOptions options={}) |
| | Compute connected components of an input mesh.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_dihedral_angles (SurfaceMesh< Scalar, Index > &mesh, const DihedralAngleOptions &options={}) |
| | Computes dihedral angles for each edge in the mesh.
|
| |
| template<typename Scalar, typename Index> |
| std::optional< std::vector< Index > > | compute_dijkstra_distance (SurfaceMesh< Scalar, Index > &mesh, const DijkstraDistanceOptions< Scalar, Index > &options={}) |
| | Computes dijkstra distance from a seed facet.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_edge_lengths (SurfaceMesh< Scalar, Index > &mesh, const EdgeLengthOptions &options={}) |
| | Computes edge lengths attribute.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_facet_circumcenter (SurfaceMesh< Scalar, Index > &mesh, FacetCircumcenterOptions options={}) |
| | Compute per-facet circumcenter.
|
| |
| template<typename Scalar, typename Index> |
| AdjacencyList< Index > | compute_facet_facet_adjacency (SurfaceMesh< Scalar, Index > &mesh, ConnectivityType connectivity_type=ConnectivityType::Edge) |
| | Compute facet-facet adjacency information.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_facet_normal (SurfaceMesh< Scalar, Index > &mesh, FacetNormalOptions options={}) |
| | Compute facet normals.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_greedy_coloring (SurfaceMesh< Scalar, Index > &mesh, const GreedyColoringOptions &options={}) |
| | Compute a greedy graph coloring of the mesh.
|
| |
| template<typename MeshType, typename Cloud, typename Indices> |
| auto | compute_lift_operator_from_sampling (const MeshType &mesh, const Cloud &closest_points, const Indices &element_indices) |
| | This compute the sparse bilinear map from mesh vertex attributes to point cloud attributes.
|
| |
| template<typename MeshType, typename ClosestPoints> |
| auto | compute_lift_operator_from_projections (const MeshType &mesh, const ClosestPoints &projections) |
| | This compute the sparse bilinear map from mesh vertex attributes to point cloud attributes.
|
| |
| template<typename Scalar, typename Index> |
| std::array< std::array< Scalar, 3 >, 3 > | compute_mesh_covariance (const SurfaceMesh< Scalar, Index > &mesh, const MeshCovarianceOptions &options={}) |
| | Compute the covariance matrix w.r.t.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_normal (SurfaceMesh< Scalar, Index > &mesh, function_ref< bool(Index)> is_edge_smooth, span< const Index > cone_vertices={}, NormalOptions options={}) |
| | Compute smooth normals based on specified sharp edges and cone vertices.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_normal (SurfaceMesh< Scalar, Index > &mesh, function_ref< bool(Index, Index)> is_edge_smooth, span< const Index > cone_vertices={}, NormalOptions options={}) |
| | Compute smooth normals based on specified sharp edges and cone vertices.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_normal (SurfaceMesh< Scalar, Index > &mesh, Scalar feature_angle_threshold, span< const Index > cone_vertices={}, NormalOptions options={}) |
| | Compute smooth normal based on specified dihedral angle threshold and cone vertices.
|
| |
| template<typename Scalar> |
| PointcloudPCAOutput< Scalar > | compute_pointcloud_pca (span< const Scalar > points, ComputePointcloudPCAOptions options={}) |
| | Finds the principal components for a pointcloud.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_seam_edges (SurfaceMesh< Scalar, Index > &mesh, AttributeId indexed_attribute_id, const SeamEdgesOptions &options={}) |
| | Computes the seam edges for a given indexed attribute.
|
| |
| template<typename Scalar, typename Index> |
| TangentBitangentResult | compute_tangent_bitangent (SurfaceMesh< Scalar, Index > &mesh, TangentBitangentOptions options={}) |
| | Compute mesh tangent and bitangent vectors orthogonal to the input mesh normals.
|
| |
| template<typename Scalar, typename Index> |
| size_t | compute_uv_charts (SurfaceMesh< Scalar, Index > &mesh, const UVChartOptions &options={}) |
| | Compute UV charts of an input mesh.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_uv_distortion (SurfaceMesh< Scalar, Index > &mesh, const UVDistortionOptions &options={}) |
| | Compute uv distortion using the selected distortion measure.
|
| |
| template<typename Scalar, typename Index> |
| UVOrientationCount | compute_uv_orientation (SurfaceMesh< Scalar, Index > &mesh, const UVOrientationOptions &options={}) |
| | Compute a per-facet orientation attribute using Shewchuk's exact orient2D predicate.
|
| |
| template<typename Scalar, typename Index> |
| std::vector< std::pair< int32_t, int32_t > > | compute_uv_tile_list (const SurfaceMesh< Scalar, Index > &mesh) |
| | Extract the list of all UV tiles that a mesh's parametrization spans.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_vertex_normal (SurfaceMesh< Scalar, Index > &mesh, VertexNormalOptions options={}) |
| | Compute per-vertex normals based on specified weighting type.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_vertex_valence (SurfaceMesh< Scalar, Index > &mesh, VertexValenceOptions options={}) |
| | Compute vertex valence.
|
| |
| template<typename Scalar, typename Index> |
| AdjacencyList< Index > | compute_vertex_vertex_adjacency (SurfaceMesh< Scalar, Index > &mesh, DualConnectivityType connectivity_type=DualConnectivityType::Edge) |
| | Compute vertex-vertex adjacency information.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_weighted_corner_normal (SurfaceMesh< Scalar, Index > &mesh, CornerNormalOptions option={}) |
| | Compute corner normals.
|
| |
|
template<typename GeometryType> |
| std::unique_ptr< Connectivity< GeometryType > > | compute_connectivity (const GeometryType &geometry) |
| |
| template<typename DerivedF, typename DerivedC> |
| Eigen::Index | corner_to_edge_mapping (const Eigen::MatrixBase< DerivedF > &F, Eigen::PlainObjectBase< DerivedC > &C2E) |
| | Computes a mapping from mesh corners (k*f+i) to unique edge ids.
|
| |
|
template<typename DerivedV, typename DerivedF> |
| std::unique_ptr< Mesh< DerivedV, DerivedF > > | create_empty_mesh () |
| |
| template<typename DerivedV, typename DerivedF> |
| auto | create_mesh (const Eigen::MatrixBase< DerivedV > &vertices, const Eigen::MatrixBase< DerivedF > &facets) |
| | This function create a new mesh given the vertex and facet arrays by copying data into the Mesh object.
|
| |
| template<typename DerivedV, typename DerivedF> |
| std::unique_ptr< Mesh< DerivedV, DerivedF > > | create_mesh (Eigen::PlainObjectBase< DerivedV > &&vertices, Eigen::PlainObjectBase< DerivedF > &&facets) |
| | This function create a new mesh given the vertex and facet arrays by moving data into the Mesh object.
|
| |
|
template<typename DerivedV, typename DerivedF> |
| std::unique_ptr< Mesh< DerivedV, DerivedF > > | create_mesh (const Eigen::MatrixBase< DerivedV > &vertices, Eigen::MatrixBase< DerivedF > &&facets) |
| |
|
template<typename DerivedV, typename DerivedF> |
| std::unique_ptr< Mesh< DerivedV, DerivedF > > | create_mesh (Eigen::MatrixBase< DerivedV > &&vertices, const Eigen::MatrixBase< DerivedF > &facets) |
| |
| template<typename VertexArray, typename FacetArray> |
| auto | wrap_with_mesh (const Eigen::MatrixBase< VertexArray > &vertices, const Eigen::MatrixBase< FacetArray > &facets) |
| | This method creates a Mesh object that wraps around vertices and facets.
|
| |
|
template<typename VertexArray, typename FacetArray> |
| void | wrap_with_mesh (const Eigen::MatrixBase< VertexArray > &&, const Eigen::MatrixBase< FacetArray > &&) |
| |
|
template<typename VertexArray, typename FacetArray> |
| void | wrap_with_mesh (const Eigen::MatrixBase< VertexArray > &, const Eigen::MatrixBase< FacetArray > &&) |
| |
|
template<typename VertexArray, typename FacetArray> |
| void | wrap_with_mesh (const Eigen::MatrixBase< VertexArray > &&, const Eigen::MatrixBase< FacetArray > &) |
| |
|
std::unique_ptr< TriangleMesh3D > LA_CORE_API | create_cube () |
| |
|
std::unique_ptr< TriangleMesh3D > LA_CORE_API | create_quad (bool with_center_vertex) |
| |
|
std::unique_ptr< TriangleMesh3D > LA_CORE_API | create_sphere (double refine_order=2) |
| |
| template<typename Scalar, typename Index> |
| size_t | disconnect_uv_charts (SurfaceMesh< Scalar, Index > &mesh, const DisconnectUVChartsOptions &options={}) |
| | Disconnect UV charts by duplicating UV vertices shared across different charts.
|
| |
|
template<typename MeshType> |
| EdgeFacetMap< MeshType > | compute_edge_facet_map_in_active_facets (const MeshType &mesh, const std::unordered_set< typename MeshType::Index > &active_facets) |
| |
|
template<typename MeshType> |
| EdgeFacetMap< MeshType > | compute_edge_facet_map_in_active_vertices (const MeshType &mesh, const std::unordered_set< typename MeshType::Index > &active_vertices) |
| |
| template<typename Scalar, typename Index, typename DerivedV, typename DerivedF> |
| SurfaceMesh< Scalar, Index > | eigen_to_surface_mesh (const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F) |
| | Create a SurfaceMesh from a igl-style pair of matrices (V, F).
|
| |
| template<typename Scalar, typename Index> |
| std::vector< std::vector< Index > > | extract_boundary_loops (const SurfaceMesh< Scalar, Index > &mesh) |
| | Extract boundary loops from a surface mesh.
|
| |
| template<typename Scalar, typename Index> |
| SurfaceMesh< Scalar, Index > | extract_submesh (const SurfaceMesh< Scalar, Index > &mesh, span< const Index > selected_facets, const SubmeshOptions &options={}) |
| | Extract a submesh that consists of a subset of the facets of the source mesh.
|
| |
| template<typename Scalar, typename Index> |
| std::vector< AttributeId > | filtered_attribute_ids (const SurfaceMesh< Scalar, Index > &mesh, const AttributeFilter &options) |
| | Create a list of attribute ids corresponding to the given filter.
|
| |
| template<typename Scalar, typename Index> |
| SurfaceMesh< Scalar, Index > | filter_attributes (SurfaceMesh< Scalar, Index > source_mesh, const AttributeFilter &options={}) |
| | Filters the attributes of mesh according to user specifications.
|
| |
| template<typename Scalar, typename Index> |
| std::optional< AttributeId > | find_matching_attribute (const SurfaceMesh< Scalar, Index > &mesh, const AttributeMatcher &options) |
| | Finds the first attribute with the specified usage/element type/number of channels.
|
| |
|
template<typename Scalar, typename Index> |
| std::optional< AttributeId > | find_matching_attribute (const SurfaceMesh< Scalar, Index > &mesh, AttributeUsage usage) |
| |
|
template<typename Scalar, typename Index> |
| std::optional< AttributeId > | find_matching_attribute (const SurfaceMesh< Scalar, Index > &mesh, BitField< AttributeElement > element_types) |
| |
| template<typename Scalar, typename Index> |
| std::vector< AttributeId > | find_matching_attributes (const SurfaceMesh< Scalar, Index > &mesh, const AttributeMatcher &options) |
| | Finds all attributes with the specified usage/element type/number of channels.
|
| |
| template<typename Scalar, typename Index> |
| std::vector< AttributeId > | find_matching_attributes (const SurfaceMesh< Scalar, Index > &mesh, AttributeUsage usage) |
| | Finds all attributes with the specified usage.
|
| |
| template<typename Scalar, typename Index> |
| std::vector< AttributeId > | find_matching_attributes (const SurfaceMesh< Scalar, Index > &mesh, BitField< AttributeElement > element_types) |
| | Finds all attributes with the specified element types.
|
| |
|
template<typename _VertexArray, typename _FacetArray, typename Archive> |
| void | serialize (std::shared_ptr< MeshGeometry< _VertexArray, _FacetArray > > &geometry, Archive &ar) |
| |
|
template<typename DerivedF> |
| EdgeType< typename DerivedF::Scalar > | get_opposite_edge (const Eigen::PlainObjectBase< DerivedF > &facets, typename DerivedF::Scalar fid, typename DerivedF::Scalar vid) |
| |
| template<typename Scalar, typename Index> |
| std::string | get_unique_attribute_name (const SurfaceMesh< Scalar, Index > &mesh, std::string_view name, const UniqueAttributeNameOptions &options={}) |
| | Returns a unique attribute name by appending a suffix if necessary.
|
| |
| template<typename Scalar, typename Index> |
| SurfaceMesh< Scalar, Index > | trim_by_isoline (const SurfaceMesh< Scalar, Index > &mesh, const IsolineOptions &options={}) |
| | Trim a mesh by the isoline of an implicit function defined on the mesh vertices/corners.
|
| |
| template<typename Scalar, typename Index> |
| SurfaceMesh< Scalar, Index > | extract_isoline (const SurfaceMesh< Scalar, Index > &mesh, const IsolineOptions &options={}) |
| | Extract the isoline of an implicit function defined on the mesh vertices/corners.
|
| |
| template<typename Scalar, typename Index> |
| SurfaceMesh< Scalar, Index > | insert_isoline (const SurfaceMesh< Scalar, Index > &mesh, const IsolineOptions &options={}) |
| | Insert the isoline of an implicit function into a mesh.
|
| |
| LA_CORE_API spdlog::logger & | logger () |
| | Retrieves the current logger.
|
| |
| LA_CORE_API void | set_logger (std::shared_ptr< spdlog::logger > logger) |
| | Setup a logger object to be used by Lagrange.
|
| |
|
template<typename _VertexArray, typename _FacetArray, typename Archive> |
| void | serialize (Mesh< _VertexArray, _FacetArray > &mesh, Archive &ar) |
| |
| template<size_t Dimension, typename Scalar, typename Index> |
| Eigen::AlignedBox< Scalar, static_cast< int >(Dimension)> | mesh_bbox (const SurfaceMesh< Scalar, Index > &mesh) |
| | Compute the axis-aligned bounding box of a mesh.
|
| |
| template<typename Scalar, typename Index> |
| void | close_small_holes (SurfaceMesh< Scalar, Index > &mesh, CloseSmallHolesOptions options={}) |
| | Close small topological holes.
|
| |
| template<typename Scalar, typename Index> |
| std::vector< Index > | detect_degenerate_facets (const SurfaceMesh< Scalar, Index > &mesh) |
| | Detects degenerate facets in a mesh.
|
| |
| template<typename Scalar, typename Index> |
| void | remove_degenerate_facets (SurfaceMesh< Scalar, Index > &mesh) |
| | Removes degenerate facets from a mesh.
|
| |
| template<typename Scalar, typename Index> |
| void | remove_duplicate_facets (SurfaceMesh< Scalar, Index > &mesh, const RemoveDuplicateFacetOptions &opts={}) |
| | Remove duplicate facets in the mesh.
|
| |
| template<typename Scalar, typename Index> |
| void | remove_duplicate_vertices (SurfaceMesh< Scalar, Index > &mesh, const RemoveDuplicateVerticesOptions &options={}) |
| | Removes duplicate vertices from a mesh.
|
| |
| template<typename Scalar, typename Index> |
| void | remove_isolated_vertices (SurfaceMesh< Scalar, Index > &mesh) |
| | Removes isolated vertices of a mesh.
|
| |
| template<typename Scalar, typename Index> |
| void | remove_null_area_facets (SurfaceMesh< Scalar, Index > &mesh, const RemoveNullAreaFacetsOptions &options={}) |
| | Removes all facets with unsigned area <= options.null_area_threshold.
|
| |
| template<typename Scalar, typename Index> |
| void | remove_short_edges (SurfaceMesh< Scalar, Index > &mesh, Scalar threshold=0) |
| | Collapse all edges shorter than a given tolerance.
|
| |
| template<typename Scalar, typename Index> |
| void | remove_short_edges (SurfaceMesh< Scalar, Index > &mesh, const RemoveShortEdgesOptions &options) |
| | Collapse all edges shorter than a given tolerance.
|
| |
| template<typename Scalar, typename Index> |
| void | remove_topologically_degenerate_facets (SurfaceMesh< Scalar, Index > &mesh) |
| | Remove topologically degenerate facets (i.e.
|
| |
| template<typename Scalar, typename Index> |
| void | rescale_uv_charts (SurfaceMesh< Scalar, Index > &mesh, const RescaleUVOptions &options={}) |
| | Rescale UV charts such that they are isotropic to their 3D images.
|
| |
| template<typename Scalar, typename Index> |
| void | resolve_nonmanifoldness (SurfaceMesh< Scalar, Index > &mesh) |
| | Resolve both non-manifold vertices and non-manifold edges in the input mesh.
|
| |
| template<typename Scalar, typename Index> |
| void | resolve_vertex_nonmanifoldness (SurfaceMesh< Scalar, Index > &mesh) |
| | Resolve nonmanifold vertices by pulling disconnected 1-ring neighborhood apart.
|
| |
| template<typename Scalar, typename Index> |
| void | split_long_edges (SurfaceMesh< Scalar, Index > &mesh, SplitLongEdgesOptions options={}) |
| | Split edges that are longer than options.max_edge_length.
|
| |
| template<typename Scalar, typename Index> |
| size_t | split_obtuse_triangles (SurfaceMesh< Scalar, Index > &mesh, SplitObtuseTrianglesOptions options={}) |
| | Iteratively split obtuse triangles by splitting their longest edge at the projection of the opposite (obtuse) vertex.
|
| |
| template<typename Scalar, typename Index> |
| void | unflip_uv_triangles (SurfaceMesh< Scalar, Index > &mesh, const UnflipUVOptions &options={}) |
| | Unflip flipped UV triangles.
|
| |
| template<typename Scalar, typename Index, typename MeshType> |
| SurfaceMesh< Scalar, Index > | to_surface_mesh_copy (const MeshType &mesh) |
| | Convert a legacy mesh object to a surface mesh object.
|
| |
| template<typename Scalar, typename Index, typename MeshType> |
| SurfaceMesh< Scalar, Index > | to_surface_mesh_wrap (MeshType &&mesh) |
| | Wrap a legacy mesh object as a surface mesh object.
|
| |
| template<typename MeshType, typename Scalar, typename Index> |
| std::unique_ptr< MeshType > | to_legacy_mesh (const SurfaceMesh< Scalar, Index > &mesh) |
| | Convert a surface mesh object to a legacy mesh object.
|
| |
|
template<typename _VertexArray, typename _FacetArray, typename Archive> |
| void | serialize (MeshGeometry< _VertexArray, _FacetArray > &geometry, Archive &ar) |
| |
| template<size_t Dimension = 3, typename Scalar, typename Index> |
| auto | normalize_mesh_with_transform (SurfaceMesh< Scalar, Index > &mesh, const TransformOptions &options={}) -> Eigen::Transform< Scalar, Dimension, Eigen::Affine > |
| | Normalize a mesh to fit in a unit box centered at the origin.
|
| |
| template<typename Scalar, typename Index> |
| void | normalize_mesh (SurfaceMesh< Scalar, Index > &mesh, const TransformOptions &options={}) |
| | Normalize a mesh to fit in a unit box centered at the origin.
|
| |
| template<size_t Dimension = 3, typename Scalar, typename Index> |
| auto | normalize_meshes_with_transform (span< SurfaceMesh< Scalar, Index > * > meshes, const TransformOptions &options={}) -> Eigen::Transform< Scalar, Dimension, Eigen::Affine > |
| | Normalize a list of meshes to fit in a unit box centered at the origin.
|
| |
| template<typename Scalar, typename Index> |
| void | normalize_meshes (span< SurfaceMesh< Scalar, Index > * > meshes, const TransformOptions &options={}) |
| | Normalize a list of meshes to fit in a unit box centered at the origin.
|
| |
| template<typename Scalar, typename Index> |
| void | orient_outward (lagrange::SurfaceMesh< Scalar, Index > &mesh, const OrientOptions &options={}) |
| | Orient the facets of a mesh so that the signed volume of each connected component is positive or negative.
|
| |
| template<typename Scalar, typename Index> |
| bool | is_oriented (const SurfaceMesh< Scalar, Index > &mesh) |
| | Check if a mesh is oriented.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_edge_is_oriented (SurfaceMesh< Scalar, Index > &mesh, const OrientationOptions &options={}) |
| | Compute a mesh attribute indicating whether an edge is oriented.
|
| |
| template<typename Scalar, typename Index> |
| void | permute_facets (SurfaceMesh< Scalar, Index > &mesh, span< const Index > new_to_old) |
| | Reorder facets of a mesh based on a given permutation.
|
| |
| template<typename Scalar, typename Index> |
| void | permute_vertices (SurfaceMesh< Scalar, Index > &mesh, span< const Index > new_to_old) |
| | Reorder vertices of a mesh based on a given permutation.
|
| |
| template<typename Scalar, typename Index> |
| void | remap_vertices (SurfaceMesh< Scalar, Index > &mesh, span< const Index > forward_mapping, RemapVerticesOptions options={}) |
| | Remap vertices of a mesh based on provided forward mapping.
|
| |
| template<typename Scalar, typename Index> |
| void | reorder_mesh (SurfaceMesh< Scalar, Index > &mesh, ReorderingMethod method) |
| | Mesh reordering to improve cache locality.
|
| |
|
template<typename MeshType> |
| SamplePointsOnSurfaceOutput< MeshType > | sample_points_on_surface (MeshType &mesh, const typename MeshType::Index approx_num_points, const typename MeshType::IndexList &active_facets) |
| |
|
template<typename MeshType> |
| SamplePointsOnSurfaceOutput< MeshType > | sample_points_on_surface (MeshType &mesh, const typename MeshType::Index approx_num_points, const std::vector< bool > &is_facet_active) |
| |
|
template<typename MeshType> |
| SamplePointsOnSurfaceOutput< MeshType > | sample_points_on_surface (MeshType &mesh, const typename MeshType::Index approx_num_points) |
| |
| template<typename PointType> |
| auto | segment_segment_squared_distance (const Eigen::MatrixBase< PointType > &U0, const Eigen::MatrixBase< PointType > &U1, const Eigen::MatrixBase< PointType > &V0, const Eigen::MatrixBase< PointType > &V1, Eigen::PlainObjectBase< PointType > &closest_pointU, Eigen::PlainObjectBase< PointType > &closest_pointV, ScalarOf< PointType > &lambdaU, ScalarOf< PointType > &lambdaV) -> ScalarOf< PointType > |
| | Computes the squared distance between two N-d line segments, and the closest pair of points whose separation is this distance.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | select_facets_by_normal_similarity (SurfaceMesh< Scalar, Index > &mesh, const Index seed_facet_id, const SelectFacetsByNormalSimilarityOptions &options={}) |
| | Given a seed facet, selects facets around it based on the change in triangle normals.
|
| |
| template<typename Scalar, typename Index> |
| bool | select_facets_in_frustum (SurfaceMesh< Scalar, Index > &mesh, const Frustum< Scalar > &frustum, const FrustumSelectionOptions &options={}) |
| | Select all facets that intersect the cone/frustrum bounded by 4 planes defined by (n_i, p_i), where n_i is the plane normal and p_i is a point on the plane.
|
| |
| template<typename Scalar, typename Index> |
| std::vector< SurfaceMesh< Scalar, Index > > | separate_by_components (const SurfaceMesh< Scalar, Index > &mesh, const SeparateByComponentsOptions &options={}) |
| | Separate a mesh by connected components.
|
| |
| template<typename Scalar, typename Index> |
| std::vector< SurfaceMesh< Scalar, Index > > | separate_by_facet_groups (const SurfaceMesh< Scalar, Index > &mesh, size_t num_groups, span< const Index > facet_group_indices, const SeparateByFacetGroupsOptions &options={}) |
| | Extract a set of submeshes based on facet groups.
|
| |
| template<typename Scalar, typename Index> |
| std::vector< SurfaceMesh< Scalar, Index > > | separate_by_facet_groups (const SurfaceMesh< Scalar, Index > &mesh, span< const Index > facet_group_indices, const SeparateByFacetGroupsOptions &options={}) |
| | Extract a set of submeshes based on facet groups.
|
| |
| template<typename Scalar, typename Index> |
| std::vector< SurfaceMesh< Scalar, Index > > | separate_by_facet_groups (const SurfaceMesh< Scalar, Index > &mesh, size_t num_groups, function_ref< Index(Index)> get_facet_group, const SeparateByFacetGroupsOptions &options={}) |
| | Extract a set of submeshes based on facet groups.
|
| |
| template<typename Scalar, typename Index> |
| void | split_facets_by_material (SurfaceMesh< Scalar, Index > &mesh, std::string_view material_attribute_name) |
| | Split mesh facets based on material labels.
|
| |
| template<typename Scalar, typename Index> |
| SurfaceMesh< Scalar, Index > | thicken_and_close_mesh (SurfaceMesh< Scalar, Index > input_mesh, const ThickenAndCloseOptions &options={}) |
| | Thicken a mesh by offsetting it, and close the shape into a thick 3D solid.
|
| |
| template<typename Scalar, typename Index> |
| int | compute_euler (const SurfaceMesh< Scalar, Index > &mesh) |
| | Compute Euler characteristic of a mesh.
|
| |
| template<typename Scalar, typename Index> |
| bool | is_closed (const SurfaceMesh< Scalar, Index > &mesh) |
| | Check if a mesh is closed.
|
| |
| template<typename Scalar, typename Index> |
| bool | is_vertex_manifold (const SurfaceMesh< Scalar, Index > &mesh) |
| | Check if a mesh is vertex-manifold.
|
| |
| template<typename Scalar, typename Index> |
| bool | is_edge_manifold (const SurfaceMesh< Scalar, Index > &mesh) |
| | Check if a mesh is edge-manifold.
|
| |
| template<typename Scalar, typename Index> |
| bool | is_manifold (const SurfaceMesh< Scalar, Index > &mesh) |
| | Check if a mesh is both vertex-manifold and edge-manifold.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_vertex_is_manifold (SurfaceMesh< Scalar, Index > &mesh, const VertexManifoldOptions &options={}) |
| | Compute a mesh attribute of value type uint8_t indicating vertex manifoldness.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | compute_edge_is_manifold (SurfaceMesh< Scalar, Index > &mesh, const EdgeManifoldOptions &options={}) |
| | Compute a mesh attribute of value type uint8_t indicating edge manifoldness.
|
| |
| template<typename Scalar, typename Index, int Dimension> |
| void | transform_mesh (SurfaceMesh< Scalar, Index > &mesh, const Eigen::Transform< Scalar, Dimension, Eigen::Affine > &transform, const TransformOptions &options={}) |
| | Apply an affine transform \( M \) to a mesh in-place.
|
| |
| template<typename Scalar, typename Index, int Dimension> |
| SurfaceMesh< Scalar, Index > | transformed_mesh (SurfaceMesh< Scalar, Index > mesh, const Eigen::Transform< Scalar, Dimension, Eigen::Affine > &transform, const TransformOptions &options={}) |
| | Apply an affine transform to a mesh and return the transformed mesh.
|
| |
| template<typename Scalar, typename Index> |
| void | triangulate_polygonal_facets (SurfaceMesh< Scalar, Index > &mesh, const TriangulationOptions &options={}) |
| | Triangulate polygonal facets of a mesh using a prescribed set of rules.
|
| |
| template<typename Scalar, typename Index> |
| size_t | unflip_uv_charts (SurfaceMesh< Scalar, Index > &mesh, const UnflipUVChartsOptions &options={}) |
| | Mirror the UV positions of every UV vertex in any chart that is "flipped".
|
| |
| LA_CORE_API void | set_breakpoint_enabled (bool enabled) |
| | Sets whether to trigger a debugger breakpoint on assert failure.
|
| |
| LA_CORE_API bool | is_breakpoint_enabled () |
| | Returns whether to trigger a debugger breakpoint on assert failure.
|
| |
|
LA_CORE_API void | trigger_breakpoint () |
| | Call to explicitly trigger a debugger breakpoint.
|
| |
| LA_CORE_API bool | assertion_failed (const char *function, const char *file, unsigned int line, const char *condition, std::string_view message) |
| |
| template<typename Index> |
| ChainEdgesResult< Index > | chain_directed_edges (const span< const Index > edges, const ChainEdgesOptions &options={}) |
| | Chain a set of directed edges into loops and chains.
|
| |
| template<typename Index> |
| ChainEdgesResult< Index > | chain_undirected_edges (const span< const Index > edges, const ChainEdgesOptions &options={}) |
| | Chain a set of undirected edges into loops and chains.
|
| |
| template<typename Scalar> |
| Eigen::Matrix3< Scalar > | compute_normal_cotransform (const Eigen::Transform< Scalar, 3, Eigen::Affine > &transform) |
| | Computes the normal (cotransform) matrix for a 3D affine transform.
|
| |
| template<typename Scalar> |
| Eigen::Matrix2< Scalar > | compute_normal_cotransform (const Eigen::Transform< Scalar, 2, Eigen::Affine > &transform) |
| | Computes the normal (cotransform) matrix for a 2D affine transform.
|
| |
| template<typename Range> |
| auto | join (const Range &r, std::string_view sep) |
| | Join all elements of r into a formattable view separated by sep.
|
| |
|
template<typename... Ts> |
| auto | join (const std::tuple< Ts... > &t, std::string_view sep) |
| | Overload for std::tuple (not a range; mirrors fmt::join tuple support).
|
| |
|
template<typename T, typename U> |
| auto | join (const std::pair< T, U > &p, std::string_view sep) |
| | Overload for std::pair (not a range; mirrors fmt::join pair support).
|
| |
|
template<typename... Args> |
| void | print (std::ostream &os, format_string< Args... > fmt_str, Args &&... args) |
| | Writes a formatted string to an output stream.
|
| |
|
LA_CORE_API void | enable_fpe () |
| | Enable floating-point exceptions (useful for debugging).
|
| |
|
LA_CORE_API void | disable_fpe () |
| | Disable previously-enabled fpe.
|
| |
|
template<typename R, typename... Args> |
| constexpr void | swap (function_ref< R(Args...)> &lhs, function_ref< R(Args...)> &rhs) noexcept |
| | Swaps the referred callables of lhs and rhs.
|
| |
|
template<typename R, typename... Args> |
| | function_ref (R(*)(Args...)) -> function_ref< R(Args...)> |
| | Deduce function_ref type from a function pointer.
|
| |
|
template<typename Scalar> |
| Scalar | sqr_minimum_distance (const Eigen::Vector2< Scalar > &a, const Eigen::Vector2< Scalar > &b, const Eigen::Vector2< Scalar > &p) |
| | Returns the squared minimum distance between 2d line segment ab and point p.
|
| |
|
template<typename Scalar> |
| std::array< Scalar, 2 > | triangle_circumcenter_2d (span< const Scalar, 2 > p1, span< const Scalar, 2 > p2, span< const Scalar, 2 > p3) |
| |
|
template<typename Scalar> |
| Eigen::Vector2< Scalar > | triangle_circumcenter_2d (const Eigen::Vector2< Scalar > &p1, const Eigen::Vector2< Scalar > &p2, const Eigen::Vector2< Scalar > &p3) |
| |
|
template<typename Scalar> |
| Eigen::Vector2< Scalar > | triangle_circumcenter (const Eigen::Vector2< Scalar > &p1, const Eigen::Vector2< Scalar > &p2, const Eigen::Vector2< Scalar > &p3) |
| |
| template<typename Scalar, int _Rows, int _Cols> |
| Scalar | cos_angle_between (const Eigen::Matrix< Scalar, _Rows, _Cols > &v1, const Eigen::Matrix< Scalar, _Rows, _Cols > &v2) |
| | Returns the cosine of the angle between two 3d vectors.
|
| |
|
template<typename Scalar, int _Rows, int _Cols> |
| Scalar | angle_between (const Eigen::Matrix< Scalar, _Rows, _Cols > &v1, const Eigen::Matrix< Scalar, _Rows, _Cols > &v2) |
| | Returns the angle between two 3d vectors.
|
| |
| template<typename Scalar, int _Rows, int _Cols> |
| Eigen::Matrix< Scalar, _Rows, _Cols > | project_on_line (const Eigen::Matrix< Scalar, _Rows, _Cols > &v1, const Eigen::Matrix< Scalar, _Rows, _Cols > &v2) |
| | Project the vector v1 on the line defined by its vector v2.
|
| |
| template<typename Scalar, int _Rows, int _Cols> |
| Eigen::Matrix< Scalar, _Rows, _Cols > | project_on_plane (const Eigen::Matrix< Scalar, _Rows, _Cols > &v, const Eigen::Matrix< Scalar, _Rows, _Cols > &n) |
| | Project the vector on the plane defined by its normal n.
|
| |
| template<typename Scalar, int _Rows, int _Cols> |
| Scalar | projected_cos_angle_between (const Eigen::Matrix< Scalar, _Rows, _Cols > &v1, const Eigen::Matrix< Scalar, _Rows, _Cols > &v2, const Eigen::Matrix< Scalar, _Rows, _Cols > &n) |
| | Returns the angle between the vectors v1 and v2 projected on the plane defined by its normal n.
|
| |
| template<typename Scalar, int _Rows, int _Cols> |
| Scalar | projected_angle_between (const Eigen::Matrix< Scalar, _Rows, _Cols > &v1, const Eigen::Matrix< Scalar, _Rows, _Cols > &v2, const Eigen::Matrix< Scalar, _Rows, _Cols > &n) |
| | Returns the angle between the vectors v1 and v2 projected on the plane defined by its normal n.
|
| |
| template<typename MeshType> |
| auto | vector_between (const MeshType &mesh, typename MeshType::Index v1, typename MeshType::Index v2) |
| | Returns the vector from v1 to v2.
|
| |
| template<typename Scalar> |
| void | orthogonal_frame (const Eigen::Matrix< Scalar, 3, 1 > &x, Eigen::Matrix< Scalar, 3, 1 > &y, Eigen::Matrix< Scalar, 3, 1 > &z) |
| | Build an orthogonal frame given a single vector.
|
| |
| template<typename Scalar> |
| Eigen::Vector3< Scalar > | triangle_circumcenter_3d (const Eigen::Vector3< Scalar > &p1, const Eigen::Vector3< Scalar > &p2, const Eigen::Vector3< Scalar > &p3) |
| | Returns the circumcenter of a 3D triangle.
|
| |
| template<class T> |
| void | hash_combine (size_t &seed, const T &v) |
| | Hash an object v and combine it with an existing hash value seed.
|
| |
| template<typename T> |
| constexpr T | invalid () |
| | You can use invalid<T>() to get a value that can represent "invalid" values, such as invalid indices or invalid float data.
|
| |
| template<typename PointType> |
| bool | point_on_segment (const Eigen::MatrixBase< PointType > &p, const Eigen::MatrixBase< PointType > &a, const Eigen::MatrixBase< PointType > &b) |
| | Test if a point lies exactly on a segment [a,b] using exact predicates.
|
| |
| template<typename PointType, typename PointType2> |
| auto | point_segment_squared_distance (const Eigen::MatrixBase< PointType > &point, const Eigen::MatrixBase< PointType2 > &V0, const Eigen::MatrixBase< PointType2 > &V1, Eigen::PlainObjectBase< PointType > &closest_point, ScalarOf< PointType > &lambda0, ScalarOf< PointType > &lambda1) -> ScalarOf< PointType > |
| | Computes the point closest to a given point in a nd segment.
|
| |
| template<typename PointType> |
| auto | point_segment_squared_distance (const Eigen::MatrixBase< PointType > &point, const Eigen::MatrixBase< PointType > &V0, const Eigen::MatrixBase< PointType > &V1) -> ScalarOf< PointType > |
| | Computes the point closest to a given point in a nd segment.
|
| |
| template<typename PointType, typename PointType2> |
| auto | point_triangle_squared_distance (const Eigen::MatrixBase< PointType > &point, const Eigen::MatrixBase< PointType2 > &V0, const Eigen::MatrixBase< PointType2 > &V1, const Eigen::MatrixBase< PointType2 > &V2, Eigen::PlainObjectBase< PointType > &closest_point, ScalarOf< PointType > &lambda0, ScalarOf< PointType > &lambda1, ScalarOf< PointType > &lambda2) -> ScalarOf< PointType > |
| | Computes the point closest to a given point in a nd triangle.
|
| |
| template<typename PointType> |
| auto | point_triangle_squared_distance (const Eigen::MatrixBase< PointType > &point, const Eigen::MatrixBase< PointType > &V0, const Eigen::MatrixBase< PointType > &V1, const Eigen::MatrixBase< PointType > &V2) -> ScalarOf< PointType > |
| | Computes the squared distance between a point and a nd triangle.
|
| |
| template<typename Scalar> |
| Scalar | quad_area_2d (span< const Scalar, 2 > a, span< const Scalar, 2 > b, span< const Scalar, 2 > c, span< const Scalar, 2 > d) |
| | Compute 2D quad signed area.
|
| |
| template<typename Scalar> |
| Scalar | quad_area_3d (span< const Scalar, 3 > a, span< const Scalar, 3 > b, span< const Scalar, 3 > c, span< const Scalar, 3 > d) |
| | Compute 3D quad area.
|
| |
| template<typename Index> |
| internal::Range< Index > | range (Index end) |
| | Returns an iterable object representing the range [0, end).
|
| |
| template<typename Index> |
| internal::Range< Index > | range (Index begin, Index end) |
| | Returns an iterable object representing the range [begin, end).
|
| |
| template<typename Index> |
| internal::SparseRange< Index > | range_sparse (Index max, const std::vector< Index > &active) |
| | Returns an iterable object representing a subset of the range [0, max).
|
| |
| template<typename TargetType, typename SourceType> |
| constexpr auto | safe_cast (SourceType value) -> std::enable_if_t<!std::is_same< SourceType, TargetType >::value, TargetType > |
| | Perform safe cast from SourceType to TargetType, where "safe" means:
|
| |
| template<typename T> |
| constexpr T | safe_cast (T value) |
| | Safe cast specialization for TargetType == SourceType.
|
| |
| template<typename TargetType> |
| constexpr TargetType | safe_cast (bool value) |
| | Safe cast specialization for bool.
|
| |
| template<typename T, typename U> |
| constexpr T | safe_cast_enum (const U u) |
| | Casting an enum to scalar and vice versa.
|
| |
| template<typename Callback> |
| sg_detail::scope_guard< Callback > | make_scope_guard (Callback &&callback) noexcept(std::is_nothrow_constructible< Callback, Callback && >::value) |
| | Creates a scope guard around a callable object.
|
| |
| template<typename T, typename Y> |
| SharedSpan< T > | make_shared_span (const std::shared_ptr< Y > &r, T *element_ptr, size_t size) |
| | Created a SharedSpan object around an internal buffer of a parent object.
|
| |
|
template<class T, size_t N> |
| bool | operator== (const StackSet< T, N > &lhs, const StackSet< T, N > &rhs) |
| |
|
template<class T, size_t N> |
| bool | operator== (const StackVector< T, N > &lhs, const StackVector< T, N > &rhs) |
| |
|
template<typename Scalar, size_t N, typename Derived> |
| void | vector_to_eigen (const std::vector< std::array< Scalar, N > > &from, Eigen::PlainObjectBase< Derived > &to) |
| |
|
template<typename Scalar, typename Derived> |
| void | vector_to_eigen (const std::vector< std::pair< Scalar, Scalar > > &from, Eigen::PlainObjectBase< Derived > &to) |
| |
|
template<typename Scalar, int N, typename Derived> |
| void | vector_to_eigen (const std::vector< Eigen::Matrix< Scalar, N, 1 > > &from, Eigen::PlainObjectBase< Derived > &to) |
| |
|
template<typename Scalar, int N, typename Derived> |
| void | vector_to_eigen (const std::vector< Eigen::Matrix< Scalar, 1, N > > &from, Eigen::PlainObjectBase< Derived > &to) |
| |
|
template<typename Scalar> |
| void | vector_to_eigen (const std::vector< Scalar > &from, Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > &to) |
| |
|
template<typename Scalar, typename Derived> |
| void | flat_vector_to_eigen (const std::vector< Scalar > &from, Eigen::PlainObjectBase< Derived > &to, size_t rows, size_t cols, int row_major_flag=Eigen::RowMajor) |
| |
|
template<typename Derived, typename Scalar, size_t N> |
| void | eigen_to_vector (const Eigen::MatrixBase< Derived > &from, std::vector< std::array< Scalar, N > > &to) |
| |
|
template<typename Derived, typename Scalar> |
| void | eigen_to_vector (const Eigen::MatrixBase< Derived > &from, std::vector< std::pair< Scalar, Scalar > > &to) |
| |
|
template<typename Derived, typename Scalar> |
| void | eigen_to_flat_vector (const Eigen::MatrixBase< Derived > &from, std::vector< Scalar > &to, int row_major_flag=Eigen::RowMajor) |
| |
| LA_CORE_API std::vector< std::string > | string_split (const std::string &str, char delimiter) |
| | Split a std::string using a prescribed delimiter.
|
| |
| LA_CORE_API bool | starts_with (std::string_view str, std::string_view prefix) |
| | Checks if the string begins with the given prefix.
|
| |
| LA_CORE_API bool | ends_with (std::string_view str, std::string_view suffix) |
| | Checks if the string ends with the given suffix.
|
| |
| LA_CORE_API std::string | to_lower (std::string str) |
| | Convert a string to lowercase.
|
| |
| LA_CORE_API std::string | to_upper (std::string str) |
| | Convert a string to uppercase.
|
| |
| template<typename... Args> |
| std::string | string_format (lagrange::format_string< Args... > format, Args &&... args) |
| | Format args according to the format string fmt, and return the result as a string.
|
| |
|
void | get_timestamp (timestamp_type *t) |
| |
|
timestamp_type | get_timestamp () |
| |
|
double | timestamp_diff_in_seconds (timestamp_type start, timestamp_type end) |
| |
|
double | timestamp_diff_in_seconds (timestamp_type start) |
| |
| template<typename Scalar> |
| Scalar | triangle_area_3d (span< const Scalar, 3 > a, span< const Scalar, 3 > b, span< const Scalar, 3 > c) |
| | Compute 3D triangle area.
|
| |
| template<typename Scalar> |
| Scalar | triangle_area_2d (span< const Scalar, 2 > a, span< const Scalar, 2 > b, span< const Scalar, 2 > c) |
| | Compute 2D triangle signed area.
|
| |
| template<typename Scalar> |
| Orientation | triangle_orientation (span< const Scalar, 2 > a, span< const Scalar, 2 > b, span< const Scalar, 2 > c) |
| | Compute orientation of a 2D triangle.
|
| |
| template<typename Scalar> |
| bool | triangle_triangle_intersection (span< const Scalar, 3 > t1_v0, span< const Scalar, 3 > t1_v1, span< const Scalar, 3 > t1_v2, span< const Scalar, 3 > t2_v0, span< const Scalar, 3 > t2_v1, span< const Scalar, 3 > t2_v2, IncludeBoundaryIntersection boundary=IncludeBoundaryIntersection::No) |
| | Check if two 3D triangles intersect using exact predicates for robustness.
|
| |
| template<DistortionMetric metric, typename Scalar> |
| Scalar | triangle_uv_distortion (span< const Scalar, 3 > V0, span< const Scalar, 3 > V1, span< const Scalar, 3 > V2, span< const Scalar, 2 > v0, span< const Scalar, 2 > v1, span< const Scalar, 2 > v2) |
| | Compute uv distortion of a single triangle.
|
| |
| template<typename Scalar> |
| Scalar | triangle_uv_distortion (span< const Scalar, 3 > V0, span< const Scalar, 3 > V1, span< const Scalar, 3 > V2, span< const Scalar, 2 > v0, span< const Scalar, 2 > v1, span< const Scalar, 2 > v2, DistortionMetric metric) |
| | Compute uv distortion of a single triangle.
|
| |
| template<typename Scalar> |
| Scalar | to_degrees (Scalar rad=1) |
| | Convert radians to degrees.
|
| |
| template<typename Scalar> |
| Scalar | to_radians (Scalar deg=1) |
| | Convert degrees to radians.
|
| |
|
template<typename T> |
| int | sign (T val) |
| | Get the sign of the value Returns either -1, 0, or 1.
|
| |
|
template<typename Scalar> |
| Scalar | gaussian (Scalar x, Scalar sigma, Scalar center=0) |
| | Simple evaluation of Gaussian function.
|
| |
| template<class T, class... Args> |
| value_ptr< T > | make_value_ptr (Args &&... args) |
| | Helper function to create a value_ptr for a given type.
|
| |
| template<typename Scalar, typename Index, typename UVScalar = Scalar> |
| SurfaceMesh< UVScalar, Index > | uv_mesh_ref (SurfaceMesh< Scalar, Index > &mesh, const UVMeshOptions &options={}) |
| | Extract a UV mesh reference from an input mesh.
|
| |
| template<typename Scalar, typename Index, typename UVScalar = Scalar> |
| SurfaceMesh< UVScalar, Index > | uv_mesh_view (const SurfaceMesh< Scalar, Index > &mesh, const UVMeshOptions &options={}) |
| | Extract a UV mesh view from an input mesh.
|
| |
| template<typename Scalar, typename Index, typename UVScalar = Scalar> |
| std::optional< AttributeId > | uv_attribute_id (const SurfaceMesh< Scalar, Index > &mesh, const UVMeshOptions &options={}) |
| | Check whether a UV attribute of a given scalar type exists on a mesh.
|
| |
| template<typename Scalar, typename Index> |
| void | weld_indexed_attribute (SurfaceMesh< Scalar, Index > &mesh, AttributeId attr_id, const WeldOptions &options={}) |
| | Weld an indexed attribute by combining all corners around a vertex with the same attribute value.
|
| |
|
template<typename TargetScalar, typename TargetIndex, typename SourceScalar, typename SourceIndex> |
| SurfaceMesh< TargetScalar, TargetIndex > | cast (const SurfaceMesh< SourceScalar, SourceIndex > &source_mesh, const AttributeFilter &convertible_attributes, std::vector< std::string > *converted_attributes_names) |
| |
|
template<typename Scalar, typename Index> |
| size_t | compute_vertex_based_components (SurfaceMesh< Scalar, Index > &mesh, AttributeId id, span< const Index > blocker_vertices) |
| |
|
template<typename Scalar, typename Index> |
| size_t | compute_edge_based_components (SurfaceMesh< Scalar, Index > &mesh, AttributeId id, span< const Index > blocker_edges) |
| |
|
void | exactinit () |
| |
|
double | orient2d (const double *pa, const double *pb, const double *pc) |
| |
|
double | orient3d (const double *pa, const double *pb, const double *pc, const double *pd) |
| |
|
double | incircle (const double *pa, const double *pb, const double *pc, const double *pd) |
| |
|
double | insphere (const double *pa, const double *pb, const double *pc, const double *pd, const double *pe) |
| |
|
int | grow_expansion (int elen, REAL *e, REAL b, REAL *h) |
| |
|
int | grow_expansion_zeroelim (int elen, REAL *e, REAL b, REAL *h) |
| |
|
int | expansion_sum (int elen, REAL *e, int flen, REAL *f, REAL *h) |
| |
|
int | expansion_sum_zeroelim1 (int elen, REAL *e, int flen, REAL *f, REAL *h) |
| |
|
int | expansion_sum_zeroelim2 (int elen, REAL *e, int flen, REAL *f, REAL *h) |
| |
|
int | fast_expansion_sum (int elen, REAL *e, int flen, REAL *f, REAL *h) |
| |
|
int | fast_expansion_sum_zeroelim (int elen, REAL *e, int flen, REAL *f, REAL *h) |
| |
|
int | linear_expansion_sum (int elen, REAL *e, int flen, REAL *f, REAL *h) |
| |
|
int | linear_expansion_sum_zeroelim (int elen, REAL *e, int flen, REAL *f, REAL *h) |
| |
|
int | scale_expansion (int elen, REAL *e, REAL b, REAL *h) |
| |
|
int | scale_expansion_zeroelim (int elen, REAL *e, REAL b, REAL *h) |
| |
|
int | compress (int elen, REAL *e, REAL *h) |
| |
|
REAL | estimate (int elen, REAL *e) |
| |
|
REAL | orient2dfast (REAL *pa, REAL *pb, REAL *pc) |
| |
|
REAL | orient2dexact (REAL *pa, REAL *pb, REAL *pc) |
| |
|
REAL | orient2dslow (REAL *pa, REAL *pb, REAL *pc) |
| |
|
REAL | orient2dadapt (const REAL *pa, const REAL *pb, const REAL *pc, REAL detsum) |
| |
|
REAL | orient2d (const REAL *pa, const REAL *pb, const REAL *pc) |
| |
|
REAL | orient3dfast (REAL *pa, REAL *pb, REAL *pc, REAL *pd) |
| |
|
REAL | orient3dexact (REAL *pa, REAL *pb, REAL *pc, REAL *pd) |
| |
|
REAL | orient3dslow (REAL *pa, REAL *pb, REAL *pc, REAL *pd) |
| |
|
REAL | orient3dadapt (const REAL *pa, const REAL *pb, const REAL *pc, const REAL *pd, REAL permanent) |
| |
|
REAL | orient3d (const REAL *pa, const REAL *pb, const REAL *pc, const REAL *pd) |
| |
|
REAL | incirclefast (REAL *pa, REAL *pb, REAL *pc, REAL *pd) |
| |
|
REAL | incircleexact (REAL *pa, REAL *pb, REAL *pc, REAL *pd) |
| |
|
REAL | incircleslow (REAL *pa, REAL *pb, REAL *pc, REAL *pd) |
| |
|
REAL | incircleadapt (const REAL *pa, const REAL *pb, const REAL *pc, const REAL *pd, REAL permanent) |
| |
|
REAL | incircle (const REAL *pa, const REAL *pb, const REAL *pc, const REAL *pd) |
| |
|
REAL | inspherefast (REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe) |
| |
|
REAL | insphereexact (const REAL *pa, const REAL *pb, const REAL *pc, const REAL *pd, const REAL *pe) |
| |
|
REAL | insphereslow (REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe) |
| |
|
REAL | insphereadapt (const REAL *pa, const REAL *pb, const REAL *pc, const REAL *pd, const REAL *pe, REAL permanent) |
| |
|
REAL | insphere (const REAL *pa, const REAL *pb, const REAL *pc, const REAL *pd, const REAL *pe) |
| |
|
template<typename Scalar, typename Index, int Dimension> |
| void | transform_mesh_internal (SurfaceMesh< Scalar, Index > &mesh, const Eigen::Transform< Scalar, Dimension, Eigen::Affine > &transform, const TransformOptions &options, const BitField< AttributeUsage > &included_usages) |
| |
|
template<typename Scalar, typename Index> |
| void | append_triangles_from_quad (const SurfaceMesh< Scalar, Index > &mesh, Index f, std::vector< Index > &new_to_old_corners, std::vector< Index > &new_to_old_facets) |
| |
|
template<typename Scalar, typename Index> |
| Eigen::Vector3< Scalar > | facet_normal (const SurfaceMesh< Scalar, Index > &mesh, Index f) |
| |
|
template<typename Scalar, typename Index> |
| auto | find_best_2d_axes (const SurfaceMesh< Scalar, Index > &mesh, Index f) |
| |
|
template<typename Scalar, typename Index> |
| void | append_triangles_from_polygon (SurfaceMesh< Scalar, Index > &mesh, Index f, std::vector< std::array< Scalar, 2 > > &polygon, mapbox::detail::Earcut< Index > &earcut, std::vector< Index > &new_to_old_corners, std::vector< Index > &new_to_old_facets) |
| |
|
template<typename Scalar, typename Index> |
| void | triangulate_polygonal_facets_earcut (SurfaceMesh< Scalar, Index > &mesh, bool preserve_edges, bool preserve_points) |
| |
|
template<typename Scalar, typename Index> |
| void | triangulate_polygonal_facets_centroid_fan (SurfaceMesh< Scalar, Index > &mesh, bool preserve_edges, bool preserve_points) |
| |
|
template LA_CORE_API bool | triangle_triangle_intersection< float > (span< const float, 3 >, span< const float, 3 >, span< const float, 3 >, span< const float, 3 >, span< const float, 3 >, span< const float, 3 >, IncludeBoundaryIntersection) |
| |
|
template LA_CORE_API bool | triangle_triangle_intersection< double > (span< const double, 3 >, span< const double, 3 >, span< const double, 3 >, span< const double, 3 >, span< const double, 3 >, span< const double, 3 >, IncludeBoundaryIntersection) |
| |
|
| LA_SURFACE_MESH_SCALAR_X (triangle_uv_distortion, 0) |
| |
| template<typename DerivedV, typename DerivedE> |
| void | save_graph_off (const fs::path &filename, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedE > &E) |
| | Saves a 2D undirected graph (V,E) using off format.
|
| |
| template<typename DerivedV, typename DerivedE> |
| void | save_graph (const fs::path &filename, const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedE > &E) |
| | Saves a 2D undirected graph (V,E) based on filename extension.
|
| |
|
| template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor, typename Scalar, typename Index> |
| void | seq_foreach_named_attribute_read (const SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
| | Applies a function to each attribute of a mesh.
|
| |
| template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor, typename Scalar, typename Index> |
| void | seq_foreach_attribute_read (const SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
| | Applies a function to each attribute of a mesh.
|
| |
|
| template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor, typename Scalar, typename Index> |
| void | seq_foreach_named_attribute_write (SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
| | Applies a function to each attribute of a mesh.
|
| |
| template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor, typename Scalar, typename Index> |
| void | seq_foreach_attribute_write (SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
| | Applies a function to each attribute of a mesh.
|
| |
|
| template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor, typename Scalar, typename Index> |
| void | par_foreach_named_attribute_read (const SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
| | Applies a function in parallel to each attribute of a mesh.
|
| |
| template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor, typename Scalar, typename Index> |
| void | par_foreach_attribute_read (const SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
| | Applies a function in parallel to each attribute of a mesh.
|
| |
|
| template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor, typename Scalar, typename Index> |
| void | par_foreach_named_attribute_write (SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
| | Applies a function in parallel to each attribute of a mesh.
|
| |
| template<std::underlying_type_t< AttributeElement > mask = BitField<AttributeElement>::all(), typename Visitor, typename Scalar, typename Index> |
| void | par_foreach_attribute_write (SurfaceMesh< Scalar, Index > &mesh, Visitor &&vis) |
| | Applies a function in parallel to each attribute of a mesh.
|
| |
|
Mapping attributes between different element types.
- When mapping indexed to value attributes, values are duplicated for each corner, since otherwise the mapping corner -> value would be lost.
- When mapping value to indexed attributes, the size of the value buffer must be equal to the number of corners. The values are not deduplicated in the new indexed attribute.
|
| template<typename Scalar, typename Index> |
| AttributeId | map_attribute (SurfaceMesh< Scalar, Index > &mesh, AttributeId id, std::string_view new_name, AttributeElement new_element) |
| | Map attribute values to a new attribute with a different element type.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | map_attribute (SurfaceMesh< Scalar, Index > &mesh, std::string_view old_name, std::string_view new_name, AttributeElement new_element) |
| | Map attribute values to a new attribute with a different element type.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | map_attribute_in_place (SurfaceMesh< Scalar, Index > &mesh, AttributeId id, AttributeElement new_element) |
| | Map attribute values to a different element type.
|
| |
| template<typename Scalar, typename Index> |
| AttributeId | map_attribute_in_place (SurfaceMesh< Scalar, Index > &mesh, std::string_view name, AttributeElement new_element) |
| | Map attribute values to a different element type.
|
| |
|
| template<typename Scalar, typename Index> |
| SurfaceMesh< Scalar, Index > | unify_index_buffer (const SurfaceMesh< Scalar, Index > &mesh, const std::vector< AttributeId > &attribute_ids={}) |
| | Unify index buffers of the input mesh for all attributes specified in attribute_ids.
|
| |
| template<typename Scalar, typename Index> |
| SurfaceMesh< Scalar, Index > | unify_named_index_buffer (const SurfaceMesh< Scalar, Index > &mesh, const std::vector< std::string_view > &attribute_names) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
|
| template<typename ValueType> |
| RowMatrixView< ValueType > | matrix_ref (Attribute< ValueType > &attribute) |
| | Returns a writable view of a given attribute in the form of an Eigen matrix.
|
| |
| template<typename ValueType> |
| ConstRowMatrixView< ValueType > | matrix_view (const Attribute< ValueType > &attribute) |
| | Returns a read-only view of a given attribute in the form of an Eigen matrix.
|
| |
| template<typename ValueType> |
| VectorView< ValueType > | vector_ref (Attribute< ValueType > &attribute) |
| | Returns a writable view of a scalar attribute in the form of an Eigen vector.
|
| |
| template<typename ValueType> |
| ConstVectorView< ValueType > | vector_view (const Attribute< ValueType > &attribute) |
| | Returns a read-only view of a scalar attribute in the form of an Eigen vector.
|
| |
| template<typename ValueType> |
| RowMatrixView< ValueType > | reshaped_ref (Attribute< ValueType > &attribute, size_t num_cols) |
| | Returns a writable view of a given single-channel attribute in the form of an Eigen matrix with a prescribed number of columns.
|
| |
| template<typename ValueType> |
| ConstRowMatrixView< ValueType > | reshaped_view (const Attribute< ValueType > &attribute, size_t num_cols) |
| | Returns a read-only view of a given single-channel attribute in the form of an Eigen matrix with a prescribed number of columns.
|
| |
|
| template<typename ValueType, typename Scalar, typename Index> |
| RowMatrixView< ValueType > | attribute_matrix_ref (SurfaceMesh< Scalar, Index > &mesh, std::string_view name) |
| | Returns a writable view of a mesh attribute in the form of an Eigen matrix.
|
| |
| template<typename ValueType, typename Scalar, typename Index> |
| RowMatrixView< ValueType > | attribute_matrix_ref (SurfaceMesh< Scalar, Index > &mesh, AttributeId id) |
| | Returns a writable view of a mesh attribute in the form of an Eigen matrix.
|
| |
| template<typename ValueType, typename Scalar, typename Index> |
| ConstRowMatrixView< ValueType > | attribute_matrix_view (const SurfaceMesh< Scalar, Index > &mesh, std::string_view name) |
| | Returns a read-only view of a mesh attribute in the form of an Eigen matrix.
|
| |
| template<typename ValueType, typename Scalar, typename Index> |
| ConstRowMatrixView< ValueType > | attribute_matrix_view (const SurfaceMesh< Scalar, Index > &mesh, AttributeId id) |
| | Returns a read-only view of a mesh attribute in the form of an Eigen matrix.
|
| |
| template<typename ValueType, typename Scalar, typename Index> |
| VectorView< ValueType > | attribute_vector_ref (SurfaceMesh< Scalar, Index > &mesh, std::string_view name) |
| | Returns a writable view of a mesh attribute in the form of an Eigen vector.
|
| |
| template<typename ValueType, typename Scalar, typename Index> |
| VectorView< ValueType > | attribute_vector_ref (SurfaceMesh< Scalar, Index > &mesh, AttributeId id) |
| | Returns a writable view of a mesh attribute in the form of an Eigen vector.
|
| |
| template<typename ValueType, typename Scalar, typename Index> |
| ConstVectorView< ValueType > | attribute_vector_view (const SurfaceMesh< Scalar, Index > &mesh, std::string_view name) |
| | Returns a read-only view of a mesh attribute in the form of an Eigen vector.
|
| |
| template<typename ValueType, typename Scalar, typename Index> |
| ConstVectorView< ValueType > | attribute_vector_view (const SurfaceMesh< Scalar, Index > &mesh, AttributeId id) |
| | Returns a read-only view of a mesh attribute in the form of an Eigen vector.
|
| |
|
| template<typename Scalar, typename Index> |
| RowMatrixView< Scalar > | vertex_ref (SurfaceMesh< Scalar, Index > &mesh) |
| | Returns a writable view of the mesh vertices in the form of an Eigen matrix.
|
| |
| template<typename Scalar, typename Index> |
| ConstRowMatrixView< Scalar > | vertex_view (const SurfaceMesh< Scalar, Index > &mesh) |
| | Returns a read-only view of the mesh vertices in the form of an Eigen matrix.
|
| |
| template<typename Scalar, typename Index> |
| RowMatrixView< Index > | facet_ref (SurfaceMesh< Scalar, Index > &mesh) |
| | Returns a writable view of a mesh facets in the form of an Eigen matrix.
|
| |
| template<typename Scalar, typename Index> |
| ConstRowMatrixView< Index > | facet_view (const SurfaceMesh< Scalar, Index > &mesh) |
| | Returns a read-only view of a mesh facets in the form of an Eigen matrix.
|
| |