EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
EBGeometry::BVH::PointQuery< T > Struct Template Reference

A point tracked through a BVH: the key of a box is the squared distance from the point to it (0 inside it). More...

#include <EBGeometry_BVHQuery.hpp>

Public Types

using Scalar = T
 Floating-point precision.
 
using Key = T
 Key type: a squared distance.
 

Public Member Functions

template<size_t K>
Array< T, K > keys (const ChildBoxes< T, K > &a_row) const noexcept
 The squared distances from the point to the K child boxes of a node.
 
template<size_t K>
T key (const ChildBoxes< T, K > &a_row, size_t a_k) const noexcept
 The squared distance from the point to one child box, bit for bit what keys() gives it.
 
T key (const BoundingVolumes::AABBT< T > &a_box) const noexcept
 The squared distance from the point to a box (the root's).
 

Public Attributes

Vec3T< T > m_point
 The point.
 

Detailed Description

template<class T>
struct EBGeometry::BVH::PointQuery< T >

A point tracked through a BVH: the key of a box is the squared distance from the point to it (0 inside it).

The query of nearest-primitive searches: with a squared-distance bound and NearestFirst, the walk visits exactly the boxes nearer than the nearest primitive found so far.

The interface every query type has (the walk calls nothing else):

Member Function Documentation

◆ key() [1/2]

template<class T >
T EBGeometry::BVH::PointQuery< T >::key ( const BoundingVolumes::AABBT< T > &  a_box) const
inlinenoexcept

The squared distance from the point to a box (the root's).

Parameters
[in]a_boxBox.
Returns
The squared distance.

◆ key() [2/2]

template<class T >
template<size_t K>
T EBGeometry::BVH::PointQuery< T >::key ( const ChildBoxes< T, K > &  a_row,
size_t  a_k 
) const
inlinenoexcept

The squared distance from the point to one child box, bit for bit what keys() gives it.

Template Parameters
KBranching factor.
Parameters
[in]a_rowThe node's child boxes.
[in]a_kChild slot, below K.
Returns
The squared distance.

◆ keys()

template<class T >
template<size_t K>
Array< T, K > EBGeometry::BVH::PointQuery< T >::keys ( const ChildBoxes< T, K > &  a_row) const
inlinenoexcept

The squared distances from the point to the K child boxes of a node.

SSE4.1, AVX and AVX-512 paths on the host, a scalar loop on a device (the kernel that is QueryDetail::pointDistances2()).

Template Parameters
KBranching factor.
Parameters
[in]a_rowThe node's child boxes.
Returns
One squared distance per child.

The documentation for this struct was generated from the following file: