00001 #pragma once 00002 00003 #include "Vis.hpp" 00004 00008 class Texture3D 00009 { 00010 public: 00011 00015 unsigned short* pixels; 00016 00020 V3i size; 00021 00025 GLuint texture_name; 00026 00030 GLuint gradient_name; 00031 00036 Texture3D( string filename); 00037 virtual ~Texture3D(); 00038 00042 unsigned short value(float x, float y, float z); 00043 00047 V3i get_size() { 00048 return size; 00049 } 00050 00054 GLuint get_texture_name() 00055 { 00056 return texture_name; 00057 }; 00058 00062 void bind(GLuint texUnit); 00063 00067 void bind(GLuint texUnit, GLuint texUnit2); 00068 00072 void computeGradientMap(FILE* loadF, string filename); 00073 };