Lagrange
isoline.h
1/*
2 * Copyright 2024 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
13#pragma once
14
15#include <lagrange/SurfaceMesh.h>
16
17namespace lagrange {
18
26
31{
34
36 size_t channel_index = 0;
37
39 double isovalue = 0.0;
40
42 bool keep_below = true;
43};
44
58template <typename Scalar, typename Index>
61 const IsolineOptions& options = {});
62
76template <typename Scalar, typename Index>
79 const IsolineOptions& options = {});
80
82} // namespace lagrange
uint32_t AttributeId
Identified to be used to access an attribute.
Definition: AttributeFwd.h:73
constexpr AttributeId invalid_attribute_id()
Invalid attribute id.
Definition: AttributeFwd.h:76
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.
Definition: isoline.cpp:319
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.
Definition: isoline.cpp:327
Main namespace for Lagrange.
Definition: AABBIGL.h:30
Options for isoline extraction/trimming.
Definition: isoline.h:31
double isovalue
Isovalue to extract or trim with.
Definition: isoline.h:39
AttributeId attribute_id
Attribute ID of the scalar field to use. Can be a vertex or indexed attribute.
Definition: isoline.h:33
size_t channel_index
Channel index to use for the scalar field.
Definition: isoline.h:36
bool keep_below
Whether to keep the part below the isoline. Ignored for isoline extraction.
Definition: isoline.h:42