Lagrange
Loading...
Searching...
No Matches
AttributeEvaluator.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#pragma once
13
14#include <lagrange/SurfaceMesh.h>
15#include <lagrange/poisson/CommonOptions.h>
16
17#include <array>
18#include <memory>
19#include <string_view>
20
21namespace lagrange::poisson {
22
27
32{
35};
36
42{
43public:
53 template <typename Scalar, typename Index>
55 const SurfaceMesh<Scalar, Index>& points,
56 const EvaluatorOptions& options = {});
57
62
72 template <typename Scalar, typename ValueType>
73 void eval(span<const Scalar> pos, span<ValueType> out) const;
74
75private:
76 struct Impl;
77
78 // Opaque implementation (non-copyable)
79 std::unique_ptr<Impl> m_impl;
80};
81
83
84} // namespace lagrange::poisson
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:73
void eval(span< const Scalar > pos, span< ValueType > out) const
Evaluate the extrapolated attribute at any point in 3D space.
Definition AttributeEvaluator.cpp:188
AttributeEvaluator(const SurfaceMesh< Scalar, Index > &points, const EvaluatorOptions &options={})
Constructs a new attribute evaluator for a point cloud.
Definition AttributeEvaluator.cpp:145
~AttributeEvaluator()
Destroys the object.
::nonstd::span< T, Extent > span
A bounds-safe view for sequences of objects.
Definition span.h:27
Definition AttributeEvaluator.cpp:115
Shared options for Poisson surface reconstruction.
Definition CommonOptions.h:24
Option struct for Poisson surface reconstruction.
Definition AttributeEvaluator.h:32
std::string_view interpolated_attribute_name
Attribute name of data to be interpolated at the vertices.
Definition AttributeEvaluator.h:34