TrinityCore
Loading...
Searching...
No Matches
RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc > Class Template Reference

#include <RegularGrid.h>

+ Inheritance diagram for RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >:

Classes

struct  Cell
 

Public Types

enum  { CELL_NUMBER = 64 }
 
typedef std::unordered_multimap< T const *, Node * > MemberTable
 

Public Member Functions

void insert (T const &value)
 
void remove (T const &value)
 
void balance ()
 
bool contains (T const &value) const
 
bool empty () const
 
Node & getGrid (int x, int y)
 
template<typename RayCallback >
void intersectRay (G3D::Ray const &ray, RayCallback &intersectCallback, float max_dist)
 
template<typename RayCallback >
void intersectRay (G3D::Ray const &ray, RayCallback &intersectCallback, float &max_dist, G3D::Vector3 const &end)
 
template<typename IsectCallback >
void intersectPoint (G3D::Vector3 const &point, IsectCallback &intersectCallback)
 
template<typename RayCallback >
void intersectZAllignedRay (G3D::Ray const &ray, RayCallback &intersectCallback, float &max_dist)
 
std::span< T const *const > getObjects (int x, int y) const
 

Public Attributes

MemberTable memberTable
 
std::unique_ptr< Node > nodes [CELL_NUMBER][CELL_NUMBER] = { }
 

Detailed Description

template<class T, class Node, class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
class RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >

Definition at line 39 of file RegularGrid.h.

Member Typedef Documentation

◆ MemberTable

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
typedef std::unordered_multimap<T const*, Node*> RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >::MemberTable

Definition at line 49 of file RegularGrid.h.

Member Enumeration Documentation

◆ anonymous enum

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
anonymous enum
Enumerator
CELL_NUMBER 

Definition at line 43 of file RegularGrid.h.

Member Function Documentation

◆ balance()

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
void RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >::balance ( )
inline

Definition at line 79 of file RegularGrid.h.

+ Here is the caller graph for this function:

◆ contains()

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
bool RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >::contains ( T const &  value) const
inline

Definition at line 87 of file RegularGrid.h.

◆ empty()

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
bool RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >::empty ( ) const
inline

Definition at line 88 of file RegularGrid.h.

+ Here is the caller graph for this function:

◆ getGrid()

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
Node & RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >::getGrid ( int  x,
int  y 
)
inline

Definition at line 104 of file RegularGrid.h.

◆ getObjects()

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
std::span< T const *const > RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >::getObjects ( int  x,
int  y 
) const
inline

Definition at line 215 of file RegularGrid.h.

◆ insert()

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
void RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >::insert ( T const &  value)
inline

Definition at line 54 of file RegularGrid.h.

+ Here is the caller graph for this function:

◆ intersectPoint()

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
template<typename IsectCallback >
void RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >::intersectPoint ( G3D::Vector3 const &  point,
IsectCallback &  intersectCallback 
)
inline

Definition at line 195 of file RegularGrid.h.

+ Here is the call graph for this function:

◆ intersectRay() [1/2]

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
template<typename RayCallback >
void RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >::intersectRay ( G3D::Ray const &  ray,
RayCallback &  intersectCallback,
float &  max_dist,
G3D::Vector3 const &  end 
)
inline

Definition at line 119 of file RegularGrid.h.

+ Here is the call graph for this function:

◆ intersectRay() [2/2]

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
template<typename RayCallback >
void RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >::intersectRay ( G3D::Ray const &  ray,
RayCallback &  intersectCallback,
float  max_dist 
)
inline

Definition at line 113 of file RegularGrid.h.

◆ intersectZAllignedRay()

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
template<typename RayCallback >
void RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >::intersectZAllignedRay ( G3D::Ray const &  ray,
RayCallback &  intersectCallback,
float &  max_dist 
)
inline

Definition at line 206 of file RegularGrid.h.

+ Here is the call graph for this function:

◆ remove()

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
void RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >::remove ( T const &  value)
inline

Definition at line 71 of file RegularGrid.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ memberTable

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
MemberTable RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >::memberTable

Definition at line 51 of file RegularGrid.h.

◆ nodes

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class BoundsFunc = BoundsTrait<T>>
std::unique_ptr<Node> RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc >::nodes[CELL_NUMBER][CELL_NUMBER] = { }

Definition at line 52 of file RegularGrid.h.


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