Jet  v1.3.3
Public Member Functions | List of all members
jet::ListQueryEngine2< T > Class Template Referencefinal

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

#include <jet/list_query_engine2.h>

Inheritance diagram for jet::ListQueryEngine2< T >:
jet::IntersectionQueryEngine2< T > jet::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 intersects (const BoundingBox2D &box, const BoxIntersectionTestFunc2< T > &testFunc) const override
 Returns true if given box intersects with any of the stored items. More...
 
bool intersects (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 > closestIntersection (const Ray2D &ray, const GetRayIntersectionFunc2< T > &testFunc) const override
 Returns the closest intersection for given ray. More...
 
NearestNeighborQueryResult2< T > nearest (const Vector2D &pt, const NearestNeighborDistanceFunc2< T > &distanceFunc) const override
 

Detailed Description

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

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

Member Function Documentation

◆ add() [1/2]

template<typename T >
void jet::ListQueryEngine2< T >::add ( const std::vector< T > &  items)

Adds items to the container.

◆ add() [2/2]

template<typename T >
void jet::ListQueryEngine2< T >::add ( const T &  item)

Adds an item to the container.

◆ closestIntersection()

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

Returns the closest intersection for given ray.

Implements jet::IntersectionQueryEngine2< T >.

◆ forEachIntersectingItem() [1/2]

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

Invokes visitorFunc for every intersecting items.

Implements jet::IntersectionQueryEngine2< T >.

◆ forEachIntersectingItem() [2/2]

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

Invokes visitorFunc for every intersecting items.

Implements jet::IntersectionQueryEngine2< T >.

◆ intersects() [1/2]

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

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

Implements jet::IntersectionQueryEngine2< T >.

◆ intersects() [2/2]

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

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

Implements jet::IntersectionQueryEngine2< T >.

◆ nearest()

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

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

Implements jet::NearestNeighborQueryEngine2< T >.


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