5 #include <unordered_map>
16 using HashMap = std::unordered_map<Indices, Cell, std::hash<Indices>,
IndicesEqual>;
51 return !(*
this == other);
56 : cellSize(cellSize) {}
85 template <
typename TAdd>
Object representing a three-dimensional axis-aligned box.
uint32_t Size
Integral type used to index arrays (by default).
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
INLINE bool all(const Indices &i)
#define INLINE
Macros for conditional compilation based on selected compiler.
#define NAMESPACE_SPH_END
Object representing a three-dimensional sphere.
BasicVector< Float > Vector
Object providing safe access to continuous memory of data.
Generic dynamically allocated resizable storage.
Helper class used to allow calling a function only from within T.
Helper object defining three-dimensional interval (box).
Helper object for storing three (possibly four) int or bool values.
Identifies a point in the point cloud.
Indices coords() const
Grid coordinates.
bool operator==(const Handle &other) const
bool operator!=(const Handle &other) const
Size index() const
Index of the point within the cell.
Handle(const Indices &idxs, const Size index, Badge< PointCloud >)
Container of points with optimized search queries.
Size getClosePointsCount(const Vector ¢er, const Float radius) const
Returns the number of points within given distance from the center point.
Handle push(const Vector &p)
Adds a point into the cloud.
Size size() const
Returns the number of points in the cloud.
PointCloud(const Float cellSize)
Array< Vector > array() const
Returns all points in the cloud as array.
Vector point(const Handle &handle) const
Returns the point corresponding to given handle.
void findClosePoints(const Vector ¢er, const Float radius, Array< Handle > &handles) const
Returns point within given distance from the center point.
Object with deleted copy constructor and copy operator.