|
Lagrange
|
Shared base struct for multi-ray and multi-point hits. More...
#include <lagrange/raycasting/RayCaster.h>
Public Member Functions | |
| bool | is_valid (size_t i) const |
Public Attributes | |
| uint32_t | valid_mask = 0 |
| Bitmask indicating which rays in the packet hit something (1 bit per ray). | |
| Eigen::Vector< uint32_t, N > | mesh_indices |
| Index of the mesh that was hit. | |
| Eigen::Vector< uint32_t, N > | instance_indices |
| Index of the instance that was hit (relative to the source mesh). | |
| Eigen::Vector< uint32_t, N > | facet_indices |
| Index of the facet that was hit. | |
| Eigen::Matrix< float, 2, N > | barycentric_coords = Eigen::Matrix<float, 2, N>::Zero() |
| Barycentric coordinates of the hit points within the hit facets. | |
| Eigen::Matrix< float, 3, N > | positions = Eigen::Matrix<float, 3, N>::Zero() |
| World-space position of the hit point. | |
Shared base struct for multi-ray and multi-point hits.
| N | Number of rays/points in the packet (e.g., 4, 8, or 16). |
| Eigen::Vector<uint32_t, N> mesh_indices |
Index of the mesh that was hit.
| Eigen::Vector<uint32_t, N> instance_indices |
Index of the instance that was hit (relative to the source mesh).
| Eigen::Vector<uint32_t, N> facet_indices |
Index of the facet that was hit.
| Eigen::Matrix<float, 2, N> barycentric_coords = Eigen::Matrix<float, 2, N>::Zero() |
Barycentric coordinates of the hit points within the hit facets.
Given a triangle (p1, p2, p3), the barycentric coordinates (u, v) are such that the surface point is represented by p = (1 - u - v) * p1 + u * p2 + v * p3.