Lagrange
Loading...
Searching...
No Matches
ClosestPointResult.h
1
/*
2
* Copyright 2020 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/common.h>
15
#include <lagrange/legacy/inline.h>
16
17
#include <Eigen/Core>
18
19
#include <functional>
20
21
namespace
lagrange
{
22
namespace
raycasting
{
23
LAGRANGE_LEGACY_INLINE
24
namespace
legacy {
25
26
template
<
typename
Scalar>
27
struct
ClosestPointResult
28
{
29
// Point type
30
using
Point = Eigen::Matrix<Scalar, 3, 1>;
31
32
// Callback to populate triangle corner position given a (mesh_id, facet_id)
33
std::function<void(
unsigned
,
unsigned
, Point&, Point&, Point&)> populate_triangle;
34
35
// Current best result
36
unsigned
mesh_index =
invalid<unsigned>
();
37
unsigned
facet_index =
invalid<unsigned>
();
38
Point closest_point;
39
Point barycentric_coord;
40
};
41
42
}
// namespace legacy
43
}
// namespace raycasting
44
}
// namespace lagrange
lagrange::invalid
constexpr T invalid()
You can use invalid<T>() to get a value that can represent "invalid" values, such as invalid indices ...
Definition
invalid.h:40
lagrange::raycasting
Raycasting operations.
Definition
ClosestPointResult.h:22
lagrange
Main namespace for Lagrange.
lagrange::raycasting::legacy::ClosestPointResult
Definition
ClosestPointResult.h:28
lagrange
raycasting
legacy
ClosestPointResult.h
Generated on Wed Mar 11 2026 for Lagrange by
1.13.2