#include <Flat3dTextureSet.h>
Inheritance diagram for OpenGL::Flat3dTextureSet:
Public Member Functions | |
Flat3dTextureSet (unsigned int computationWidth, unsigned int computationHeight, unsigned int computationDepth, GLenum target, GLint internalFormat) | |
void | fillTexture (unsigned int textureId, unsigned int numChannels, const std::vector< float > &values) |
void | fillTexture (unsigned int textureId, const Util::VoxelGrid< Util::Color > &values) |
Util::VoxelGrid< Util::Color > | getVoxelGrid (unsigned int textureId) |
unsigned int | getDomainLookup () const |
unsigned int | getNeighborLookup () const |
unsigned int | getOffsetLookup () const |
unsigned int | getSliceLookup () const |
unsigned int | getLayoutWidth () const |
unsigned int | getLayoutHeight () const |
unsigned int | getComputationWidth () const |
unsigned int | getComputationHeight () const |
unsigned int | getComputationDepth () const |
std::pair< unsigned int, unsigned int > | getGlobalCoordinates (int x, int y, int z) const |
|
Constructor.
|
|
Fills a flat 3d texture with Color values from a VoxelGrid representing the computation domain.
|
|
Fills a flat 3d texture with values from a float vector representing the computation domain. The vector layout should be on the following form: int offset = ((z * width + y) * height + x) * numChannels + channel
|
|
Returns the depth of the computation domain.
|
|
Returns the height of the computation domain.
|
|
Returns the width of the computation domain.
|
|
The domain lookup texture has the same dimension as the flat 3d textures, and contains for each 2d coordinate the global 3d coordinates of the corresponding voxel in the computation domain.
|
|
Returns the local texture coordinates given the global x, y and z coordinate.
|
|
Returns the number of layout tiles in the y-direction of the flat 3d textures.
|
|
Returns the number of layout tiles in the x-direction of the flat 3d textures.
|
|
The neighbor lookup texture has the same dimension as the flat 3d textures, and contains for each 2d coordinate the 2d coordinates of the two neighboring voxels in the depth direction (xy and zw).
|
|
The offset lookup texture has dimension depth x 1, and contains for each depth the offsets of the lower left corner of the corresponding tiles in the flat 3d textures.
|
|
The slice lookup texture has dimension 2*depth x 1, and contains offsets and directions for the various slices of the flat 3d textures.
|
|
Returns a VoxelGrid representation of a given flat 3d texture.
|