|
| Field () noexcept |
| Construct point.
|
|
| Field (const IntVector3 &size) |
| Construct with initial size.
|
|
| Field (const IntVector3 &size, const T &value) |
| Construct with initial size and value.
|
|
void | Resize (unsigned width, unsigned height=0, unsigned depth=0) |
| Resize field to a minimum of a single value.
|
|
void | Resize (const IntVector3 &newSize) |
| Resize field and stretch if it containts data.
|
|
void | Resize (const IntVector3 &newSize, const T &value) |
| Resize field and fill with value.
|
|
void | Fill (const T &value) |
| Fill field with value.
|
|
void | DoResize (const IntVector3 &newSize) |
| Simple field resize.
|
|
T & | At (const IntVector3 &point) |
| Return value at point in field grid.
|
|
T & | At (const Vector3 &position) |
| Return nearest value at normalized position.
|
|
const T * | At (const IntVector3 &point) const |
| Return const value at point in field grid.
|
|
const T * | At (const Vector3 &position) const |
| Return const nearest value at normalized position.
|
|
T | LerpAt (float position) const |
| Return nearest value at normalized position, assuming 1D field.
|
|
T | LerpAt (const Vector2 &position) const |
| Return nearest value at normalized position, assuming 2D field.
|
|
T | LerpAt (const Vector3 &position, const IntVector3 &sampleSize=IntVector3::ONE) const |
| Return lerped value at normalized position.
|
|
Field< T > | SubField (const IntVector3 &size) const |
| Extract a sub field with overlapping origin.
|
|
Field< T > | SubField (const IntVector3 &min, const IntVector3 &max) const |
| Extract a sub field.
|
|
IntVector3 | ClampPoint (const IntVector3 &point) const |
| Return vector clamped to field grid.
|
|
IntVector3 | NormToPoint (const Vector3 &position) const |
| Convert normalized position to grid point.
|
|
IntVector3 | FloorNormToPoint (const Vector3 &position) const |
| Convert normalized position to grid point.
|
|
Vector3 | NormalizedPosition (const IntVector3 &point) const |
| Convert grid point to normalized position.
|
|
T | Averaged () const |
| Field average value.
|
|
T | Summed () const |
| The sum of all elements.
|
|
void | Normalize () |
| Normalize the field.
|
|
Field< T > | MapTo (const IntVector3 &resolution) const |
|
IntVector3 | Resolution () const |
| Return field resolution.
|
|
| HashMap () |
| Construct empty.
|
|
| HashMap (const HashMap< IntVector3, T > &map) |
| Construct from another hash map.
|
|
| HashMap (HashMap< IntVector3, T > &&map) noexcept |
| Move-construct from another hash map.
|
|
| HashMap (const std::initializer_list< Pair< IntVector3, T >> &list) |
| Aggregate initialization constructor.
|
|
| ~HashMap () |
| Destruct.
|
|
HashMap & | operator= (const HashMap< IntVector3, T > &rhs) |
| Assign a hash map.
|
|
HashMap & | operator= (HashMap< IntVector3, T > &&rhs) noexcept |
| Move-assign a hash map.
|
|
HashMap & | operator+= (const Pair< IntVector3, T > &rhs) |
| Add-assign a pair.
|
|
HashMap & | operator+= (const HashMap< IntVector3, T > &rhs) |
| Add-assign a hash map.
|
|
bool | operator== (const HashMap< IntVector3, T > &rhs) const |
| Test for equality with another hash map.
|
|
bool | operator!= (const HashMap< IntVector3, T > &rhs) const |
| Test for inequality with another hash map.
|
|
T & | operator[] (const IntVector3 &key) |
| Index the map. Create a new pair if key not found.
|
|
T * | operator[] (const IntVector3 &key) const |
| Index the map. Return null if key is not found, does not create a new pair.
|
|
HashMap & | Populate (const IntVector3 &key, const T &value) |
| Populate the map using variadic template. This handles the base case.
|
|
HashMap & | Populate (const IntVector3 &key, const T &value, const Args &... args) |
| Populate the map using variadic template.
|
|
Iterator | Insert (const Pair< IntVector3, T > &pair) |
| Insert a pair. Return an iterator to it.
|
|
Iterator | Insert (const Pair< IntVector3, T > &pair, bool &exists) |
| Insert a pair. Return iterator and set exists flag according to whether the key already existed.
|
|
void | Insert (const HashMap< IntVector3, T > &map) |
| Insert a map.
|
|
Iterator | Insert (const ConstIterator &it) |
| Insert a pair by iterator. Return iterator to the value.
|
|
void | Insert (const ConstIterator &start, const ConstIterator &end) |
| Insert a range by iterators.
|
|
bool | Erase (const IntVector3 &key) |
| Erase a pair by key. Return true if was found.
|
|
Iterator | Erase (const Iterator &it) |
| Erase a pair by iterator. Return iterator to the next pair.
|
|
void | Clear () |
| Clear the map.
|
|
void | Sort () |
| Sort pairs. After sorting the map can be iterated in order until new elements are inserted.
|
|
bool | Rehash (unsigned numBuckets) |
| Rehash to a specific bucket count, which must be a power of two. Return true if successful.
|
|
Iterator | Find (const IntVector3 &key) |
| Return iterator to the pair with key, or end iterator if not found.
|
|
ConstIterator | Find (const IntVector3 &key) const |
| Return const iterator to the pair with key, or end iterator if not found.
|
|
bool | Contains (const IntVector3 &key) const |
| Return whether contains a pair with key.
|
|
bool | TryGetValue (const IntVector3 &key, T &out) const |
| Try to copy value to output. Return true if was found.
|
|
Vector< IntVector3 > | Keys () const |
| Return all the keys.
|
|
Vector< T > | Values () const |
| Return all the values.
|
|
Iterator | Begin () |
| Return iterator to the beginning.
|
|
ConstIterator | Begin () const |
| Return iterator to the beginning.
|
|
Iterator | End () |
| Return iterator to the end.
|
|
ConstIterator | End () const |
| Return iterator to the end.
|
|
const KeyValue & | Front () const |
| Return first pair.
|
|
const KeyValue & | Back () const |
| Return last pair.
|
|
| HashBase () |
| Construct.
|
|
void | Swap (HashBase &rhs) |
| Swap with another hash set or map.
|
|
unsigned | Size () const |
| Return number of elements.
|
|
unsigned | NumBuckets () const |
| Return number of buckets.
|
|
bool | IsEmpty () const |
| Return whether has no elements.
|
|