KrisLibrary
1.0.0
|
A 3D array over an axis-aligned 3D volume, containing one or more channels. More...
#include <MultiVolumeGrid.h>
Public Member Functions | |
bool | IsEmpty () const |
void | AddChannel (const std::string &name) |
void | SetChannelName (int channel, const std::string &name) |
int | GetChannel (const std::string &name) const |
void | Resize (int m, int n, int p) |
void | ResizeByResolution (const Vector3 &res) |
void | MakeSimilar (const MultiVolumeGrid &grid) |
bool | IsSimilar (const MultiVolumeGrid &grid) const |
template<class T > | |
void | MakeSimilar (const Meshing::VolumeGridTemplate< T > &grid) |
template<class T > | |
bool | IsSimilar (const Meshing::VolumeGridTemplate< T > &grid) const |
void | GetCell (int i, int j, int k, AABB3D &cell) const |
void | GetCellCenter (int i, int j, int k, Vector3 ¢er) const |
Vector3 | GetCellSize () const |
void | GetIndex (const Vector3 &pt, int &i, int &j, int &k) const |
void | GetIndexAndParams (const Vector3 &pt, IntTriple &index, Vector3 ¶ms) const |
void | GetIndexRange (const AABB3D &range, IntTriple &imin, IntTriple &imax) const |
void | GetCell (const IntTriple &index, AABB3D &cell) const |
void | GetCenter (const IntTriple &index, Vector3 ¢er) const |
void | GetIndex (const Vector3 &pt, IntTriple &index) const |
void | GetValue (const IntTriple &index, Vector &values) const |
Gets all values at the given cell for all channels. More... | |
void | GetValue (const Vector3 &pt, Vector &values) const |
Gets all values at the given point for all channels. | |
void | SetValue (const IntTriple &index, const Vector &values) |
Gets all values at the given cell for all channels. | |
void | SetValue (const Vector3 &pt, const Vector &values) |
Gets all values at the given point for all channels. | |
void | TrilinearInterpolate (const Vector3 &pt, Vector &values) const |
Gets all values at the given point. More... | |
void | ResampleTrilinear (const MultiVolumeGrid &grid) |
Resamples the given volume grid onto the current grid, taking trilinear interpolation at cell centers. | |
void | ResampleAverage (const MultiVolumeGrid &grid) |
Resamples the given volume grid onto the current grid, taking averages over grid cells. | |
Public Attributes | |
std::vector< Meshing::VolumeGridTemplate< float > > | channels |
std::vector< std::string > | channelNames |
A 3D array over an axis-aligned 3D volume, containing one or more channels.
Basically, this contains a set of VolumeGrids all of which are similar (equal shape and size).
See the VolumeGrid class for more information about the basic subroutines.
Gets all values at the given cell for all channels.
TODO: make this a little faster by precomputing array offset?
Gets all values at the given point.
TODO: make this a little faster by precomputing interpolation parameters?