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
16
#include <Eigen/Core>
17
18
#include <functional>
19
20
namespace
lagrange
{
21
namespace
raycasting
{
22
23
template
<
typename
Scalar>
24
struct
ClosestPointResult
25
{
26
// Point type
27
using
Point = Eigen::Matrix<Scalar, 3, 1>;
28
29
// Callback to populate triangle corner position given a (mesh_id, facet_id)
30
std::function<void(
unsigned
,
unsigned
, Point&, Point&, Point&)> populate_triangle;
31
32
// Current best result
33
unsigned
mesh_index =
invalid<unsigned>
();
34
unsigned
facet_index =
invalid<unsigned>
();
35
Point closest_point;
36
Point barycentric_coord;
37
};
38
39
}
// namespace raycasting
40
41
}
// 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:21
lagrange
Main namespace for Lagrange.
lagrange::raycasting::ClosestPointResult
Definition
ClosestPointResult.h:25
lagrange
raycasting
ClosestPointResult.h
Generated on Tue Nov 18 2025 for Lagrange by
1.13.2