Template Struct Voxel
Defined in File configuration.hpp
Struct Documentation
-
template<int D, typename FT = double>
struct Voxel Voxel (range) in a configuration space that is ~= R^D.
- Template Parameters:
D – C-Space dimension.
FT – Field type. Usually double.
Public Functions
-
Voxel() = default
-
inline Voxel(const Configuration<D, FT> &bl, const Configuration<D, FT> &tr)
-
inline Configuration<D, FT> midpoint() const
Gets the midpoint of the voxel (in each dimension).
- Returns:
Voxel’s midpoint.
-
inline bool contains(const Configuration<D, FT> &p) const
Tests whether the voxel contains a given configuration.
-
inline void expandSelf(const FT &delta)
Expands all coordinates of the topRight by +delta, and bottomLeft by -delta.
- Parameters:
delta –
-
inline FT diameter() const
Computes the diameter of the voxel.
- Returns:
(Euclidean) distance between bottomLeft and topRight.
-
inline void split(const Configuration<D, FT> &mid, std::vector<Voxel<D, FT>> &output) const
Splits a voxel into 2^D subvoxels, along a given point (for non-uniform splitting).
Appends the result into a list reference.
Note
Uses template trickery to unfold as much as possible in compile time.
- Parameters:
mid – A configuration representing the split value along each coordinate.
output – Output reference (De-facto return).
-
inline void split(std::vector<Voxel<D, FT>> &output) const
Splits a voxel into 2^D subvoxels into equal sub-voxels.
Appends the result into a list reference.
- Parameters:
output – Output reference (De-facto return).
-
inline std::string to_string() const