CubbyFlow::ListQueryEngine2< T > Class Template Referencefinal

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

#include <Core/QueryEngine/ListQueryEngine2.h>

Inheritance diagram for CubbyFlow::ListQueryEngine2< T >:
CubbyFlow::IntersectionQueryEngine2< T > CubbyFlow::NearestNeighborQueryEngine2< T >

Public Member Functions

void Add (const T &item)
 Adds an item to the container. More...
 
void Add (const std::vector< T > &items)
 Adds items to the container. More...
 
bool IsIntersects (const BoundingBox2D &box, const BoxIntersectionTestFunc2< T > &testFunc) const override
 Returns true if given box intersects with any of the stored items. More...
 
bool IsIntersects (const Ray2D &ray, const RayIntersectionTestFunc2< T > &testFunc) const override
 Returns true if given ray intersects with any of the stored items. More...
 
void ForEachIntersectingItem (const BoundingBox2D &box, const BoxIntersectionTestFunc2< T > &testFunc, const IntersectionVisitorFunc2< T > &visitorFunc) const override
 Invokes visitorFunc for every intersecting items. More...
 
void ForEachIntersectingItem (const Ray2D &ray, const RayIntersectionTestFunc2< T > &testFunc, const IntersectionVisitorFunc2< T > &visitorFunc) const override
 Invokes visitorFunc for every intersecting items. More...
 
ClosestIntersectionQueryResult2< T > GetClosestIntersection (const Ray2D &ray, const GetRayIntersectionFunc2< T > &testFunc) const override
 Returns the closest intersection for given ray. More...
 
NearestNeighborQueryResult2< T > GetNearestNeighbor (const Vector2D &pt, const NearestNeighborDistanceFunc2< T > &distanceFunc) const override
 Returns the nearest neighbor for given point and distance measure function. More...
 

Detailed Description

template<typename T>
class CubbyFlow::ListQueryEngine2< T >

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

Member Function Documentation

◆ Add() [1/2]

template<typename T >
void CubbyFlow::ListQueryEngine2< T >::Add ( const T &  item)

Adds an item to the container.

◆ Add() [2/2]

template<typename T >
void CubbyFlow::ListQueryEngine2< T >::Add ( const std::vector< T > &  items)

Adds items to the container.

◆ ForEachIntersectingItem() [1/2]

template<typename T >
void CubbyFlow::ListQueryEngine2< T >::ForEachIntersectingItem ( const BoundingBox2D box,
const BoxIntersectionTestFunc2< T > &  testFunc,
const IntersectionVisitorFunc2< T > &  visitorFunc 
) const
overridevirtual

Invokes visitorFunc for every intersecting items.

Implements CubbyFlow::IntersectionQueryEngine2< T >.

◆ ForEachIntersectingItem() [2/2]

template<typename T >
void CubbyFlow::ListQueryEngine2< T >::ForEachIntersectingItem ( const Ray2D ray,
const RayIntersectionTestFunc2< T > &  testFunc,
const IntersectionVisitorFunc2< T > &  visitorFunc 
) const
overridevirtual

Invokes visitorFunc for every intersecting items.

Implements CubbyFlow::IntersectionQueryEngine2< T >.

◆ GetClosestIntersection()

template<typename T >
ClosestIntersectionQueryResult2< T > CubbyFlow::ListQueryEngine2< T >::GetClosestIntersection ( const Ray2D ray,
const GetRayIntersectionFunc2< T > &  testFunc 
) const
overridevirtual

Returns the closest intersection for given ray.

Implements CubbyFlow::IntersectionQueryEngine2< T >.

◆ GetNearestNeighbor()

template<typename T >
NearestNeighborQueryResult2< T > CubbyFlow::ListQueryEngine2< T >::GetNearestNeighbor ( const Vector2D pt,
const NearestNeighborDistanceFunc2< T > &  distanceFunc 
) const
overridevirtual

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

Implements CubbyFlow::NearestNeighborQueryEngine2< T >.

◆ IsIntersects() [1/2]

template<typename T >
bool CubbyFlow::ListQueryEngine2< T >::IsIntersects ( const BoundingBox2D box,
const BoxIntersectionTestFunc2< T > &  testFunc 
) const
overridevirtual

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

Implements CubbyFlow::IntersectionQueryEngine2< T >.

◆ IsIntersects() [2/2]

template<typename T >
bool CubbyFlow::ListQueryEngine2< T >::IsIntersects ( const Ray2D ray,
const RayIntersectionTestFunc2< T > &  testFunc 
) const
overridevirtual

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

Implements CubbyFlow::IntersectionQueryEngine2< T >.


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