opensurgsim
Public Types | Public Member Functions | List of all members
MockGrid< T, N > Class Template Reference
Inheritance diagram for MockGrid< T, N >:
SurgSim::DataStructures::Grid< T, N >

Public Types

typedef SurgSim::DataStructures::Grid< T, N >::CellContent CellContent
 
typedef SurgSim::DataStructures::Grid< T, N >::NDId NDId
 
typedef SurgSim::DataStructures::Grid< T, N >::NDIdHash NDIdHash
 

Public Member Functions

 MockGrid (const Eigen::Matrix< double, N, 1 > &cellSize, const Eigen::AlignedBox< double, N > &bounds)
 
std::unordered_map< NDId, CellContent, NDIdHash > & getActiveCells ()
 
std::unordered_map< T, NDId > & getCellIds ()
 
std::vector< T > & getNonConstNeighbors (const T &element)
 
Eigen::Matrix< double, N, 1 > getSize () const
 
Eigen::AlignedBox< double, N > getAABB () const
 
- Public Member Functions inherited from SurgSim::DataStructures::Grid< T, N >
 Grid (const Eigen::Matrix< double, N, 1 > &cellSize, const Eigen::AlignedBox< double, N > &bounds)
 Constructor. More...
 
virtual ~Grid ()
 Destructor.
 
void reset ()
 Reset the grid content and the neighbors' mapping.
 
template<class Derived >
void addElement (const T element, const Eigen::MatrixBase< Derived > &position)
 Add an element in the grid. More...
 
const std::vector< T > & getNeighbors (const T &element)
 Retrieve an elements' neighbors. More...
 
template<class Derived >
const std::vector< T > & getNeighbors (const Eigen::MatrixBase< Derived > &position)
 Retrieve the neighbors of a location. More...
 

Additional Inherited Members

- Protected Types inherited from SurgSim::DataStructures::Grid< T, N >
typedef Eigen::Matrix< int, N, 1 > NDId
 The type of the n-dimensional cell Id.
 
- Protected Attributes inherited from SurgSim::DataStructures::Grid< T, N >
std::unordered_map< NDId, CellContent, NDIdHashm_activeCells
 Active cells (referenced by their ids (spatial hashing)) with their content.
 
std::unordered_map< T, NDIdm_cellIds
 Mapping from element to cell id containing the element.
 
Eigen::Matrix< double, N, 1 > m_size
 Size of each cell (same on all dimension)
 
Eigen::AlignedBox< double, N > m_aabb
 Grid min and max.
 
bool m_neighborsDirtyFlag
 Does the neighbors needs to be recomputed ?
 

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