Lagrange
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
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{
30};
31
37{
38public:
48 template <typename Scalar, typename Index>
50 const SurfaceMesh<Scalar, Index>& points,
51 const EvaluatorOptions& options = {});
52
57
67 template <typename Scalar, typename ValueType>
68 void eval(span<const Scalar> pos, span<ValueType> out) const;
69
70private:
71 struct Impl;
72
73 // Opaque implementation (non-copyable)
74 std::unique_ptr<Impl> m_impl;
75};
76
78
79} // namespace lagrange::poisson
Attribute evaluator class.
Definition: AttributeEvaluator.h:37
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:27
std::string_view interpolated_attribute_name
Attribute name of data to be interpolated at the vertices.
Definition: AttributeEvaluator.h:29