CubbyFlow::ListQueryEngine< T, N > Class Template Referencefinal

Ad-hoc list-based N-D intersection/nearest-neighbor query engine. More...

#include <Core/QueryEngine/ListQueryEngine.hpp>

Inheritance diagram for CubbyFlow::ListQueryEngine< T, N >:
CubbyFlow::IntersectionQueryEngine< T, N > CubbyFlow::NearestNeighborQueryEngine< T, N >

Public Member Functions

void Add (const T &item)
 Adds an item to the container. More...
 
void Add (const ConstArrayView1< T > &items)
 Adds items to the container. More...
 
bool Intersects (const BoundingBox< double, N > &box, const BoxIntersectionTestFunc< T, N > &testFunc) const override
 Returns true if given box intersects with any of the stored items. More...
 
bool Intersects (const Ray< double, N > &ray, const RayIntersectionTestFunc< T, N > &testFunc) const override
 Returns true if given ray intersects with any of the stored items. More...
 
void ForEachIntersectingItem (const BoundingBox< double, N > &box, const BoxIntersectionTestFunc< T, N > &testFunc, const IntersectionVisitorFunc< T > &visitorFunc) const override
 Invokes visitorFunc for every intersecting items. More...
 
void ForEachIntersectingItem (const Ray< double, N > &ray, const RayIntersectionTestFunc< T, N > &testFunc, const IntersectionVisitorFunc< T > &visitorFunc) const override
 Invokes visitorFunc for every intersecting items. More...
 
ClosestIntersectionQueryResult< T, N > ClosestIntersection (const Ray< double, N > &ray, const GetRayIntersectionFunc< T, N > &testFunc) const override
 Returns the closest intersection for given ray. More...
 
NearestNeighborQueryResult< T, N > Nearest (const Vector< double, N > &pt, const NearestNeighborDistanceFunc< T, N > &distanceFunc) const override
 
- Public Member Functions inherited from CubbyFlow::IntersectionQueryEngine< T, N >
 IntersectionQueryEngine ()=default
 Default constructor. More...
 
virtual ~IntersectionQueryEngine ()=default
 Default virtual destructor. More...
 
 IntersectionQueryEngine (const IntersectionQueryEngine &other)=default
 Default copy constructor. More...
 
 IntersectionQueryEngine (IntersectionQueryEngine &&other) noexcept=default
 Default move constructor. More...
 
IntersectionQueryEngineoperator= (const IntersectionQueryEngine &other)=default
 Default copy assignment operator. More...
 
IntersectionQueryEngineoperator= (IntersectionQueryEngine &&other) noexcept=default
 Default move assignment operator. More...
 
- Public Member Functions inherited from CubbyFlow::NearestNeighborQueryEngine< T, N >
 NearestNeighborQueryEngine ()=default
 Default constructor. More...
 
virtual ~NearestNeighborQueryEngine ()=default
 Default virtual destructor. More...
 
 NearestNeighborQueryEngine (const NearestNeighborQueryEngine &other)=default
 Default copy constructor. More...
 
 NearestNeighborQueryEngine (NearestNeighborQueryEngine &&other) noexcept=default
 Default move constructor. More...
 
NearestNeighborQueryEngineoperator= (const NearestNeighborQueryEngine &other)=default
 Default copy assignment operator. More...
 
NearestNeighborQueryEngineoperator= (NearestNeighborQueryEngine &&other) noexcept=default
 Default move assignment operator. More...
 

Detailed Description

template<typename T, size_t N>
class CubbyFlow::ListQueryEngine< T, N >

Ad-hoc list-based N-D intersection/nearest-neighbor query engine.

Member Function Documentation

◆ Add() [1/2]

template<typename T , size_t N>
void CubbyFlow::ListQueryEngine< T, N >::Add ( const T &  item)

Adds an item to the container.

◆ Add() [2/2]

template<typename T , size_t N>
void CubbyFlow::ListQueryEngine< T, N >::Add ( const ConstArrayView1< T > &  items)

Adds items to the container.

◆ ClosestIntersection()

template<typename T , size_t N>
ClosestIntersectionQueryResult< T, N > CubbyFlow::ListQueryEngine< T, N >::ClosestIntersection ( const Ray< double, N > &  ray,
const GetRayIntersectionFunc< T, N > &  testFunc 
) const
overridevirtual

Returns the closest intersection for given ray.

Implements CubbyFlow::IntersectionQueryEngine< T, N >.

◆ ForEachIntersectingItem() [1/2]

template<typename T , size_t N>
void CubbyFlow::ListQueryEngine< T, N >::ForEachIntersectingItem ( const BoundingBox< double, N > &  box,
const BoxIntersectionTestFunc< T, N > &  testFunc,
const IntersectionVisitorFunc< T > &  visitorFunc 
) const
overridevirtual

Invokes visitorFunc for every intersecting items.

Implements CubbyFlow::IntersectionQueryEngine< T, N >.

◆ ForEachIntersectingItem() [2/2]

template<typename T , size_t N>
void CubbyFlow::ListQueryEngine< T, N >::ForEachIntersectingItem ( const Ray< double, N > &  ray,
const RayIntersectionTestFunc< T, N > &  testFunc,
const IntersectionVisitorFunc< T > &  visitorFunc 
) const
overridevirtual

Invokes visitorFunc for every intersecting items.

Implements CubbyFlow::IntersectionQueryEngine< T, N >.

◆ Intersects() [1/2]

template<typename T , size_t N>
bool CubbyFlow::ListQueryEngine< T, N >::Intersects ( const BoundingBox< double, N > &  box,
const BoxIntersectionTestFunc< T, N > &  testFunc 
) const
overridevirtual

Returns true if given box intersects with any of the stored items.

Implements CubbyFlow::IntersectionQueryEngine< T, N >.

◆ Intersects() [2/2]

template<typename T , size_t N>
bool CubbyFlow::ListQueryEngine< T, N >::Intersects ( const Ray< double, N > &  ray,
const RayIntersectionTestFunc< T, N > &  testFunc 
) const
overridevirtual

Returns true if given ray intersects with any of the stored items.

Implements CubbyFlow::IntersectionQueryEngine< T, N >.

◆ Nearest()

template<typename T , size_t N>
NearestNeighborQueryResult< T, N > CubbyFlow::ListQueryEngine< T, N >::Nearest ( const Vector< double, N > &  pt,
const NearestNeighborDistanceFunc< T, N > &  distanceFunc 
) const
overridevirtual

Returns the nearest neighbor for given point and distance measure function.

Implements CubbyFlow::NearestNeighborQueryEngine< T, N >.


The documentation for this class was generated from the following files: