Lagrange
Loading...
Searching...
No Matches
compute_uv_orientation.h
1/*
2 * Copyright 2026 Adobe. All rights reserved.
3 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License. You may obtain a copy
5 * of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under
8 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 * OF ANY KIND, either express or implied. See the License for the specific language
10 * governing permissions and limitations under the License.
11 */
12#pragma once
13
14#include <lagrange/SurfaceMesh.h>
15
16#include <cstddef>
17#include <string_view>
18
19namespace lagrange {
20
25
27{
30 std::string_view uv_attribute_name = "";
31
34 std::string_view output_attribute_name = "@uv_orientation";
35};
36
39{
40 size_t positive = 0;
41 size_t degenerate = 0;
42 size_t negative = 0;
43};
44
63template <typename Scalar, typename Index>
66 const UVOrientationOptions& options = {});
67
69
70} // namespace lagrange
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:73
UVOrientationCount compute_uv_orientation(SurfaceMesh< Scalar, Index > &mesh, const UVOrientationOptions &options={})
Compute a per-facet orientation attribute using Shewchuk's exact orient2D predicate.
Definition compute_uv_orientation.cpp:96
Main namespace for Lagrange.
Per-facet orientation counts returned by compute_uv_orientation.
Definition compute_uv_orientation.h:39
size_t degenerate
Number of degenerate (zero-area) facets.
Definition compute_uv_orientation.h:41
size_t positive
Number of CCW (positively oriented) facets.
Definition compute_uv_orientation.h:40
size_t negative
Number of CW (negatively oriented / flipped) facets.
Definition compute_uv_orientation.h:42
Definition compute_uv_orientation.h:27
std::string_view uv_attribute_name
Input UV attribute name.
Definition compute_uv_orientation.h:30
std::string_view output_attribute_name
Output per-facet attribute name.
Definition compute_uv_orientation.h:34