texture.h 477 B

1234567891011121314151617181920212223
  1. #ifndef TEXTURE_H
  2. #define TEXTURE_H
  3. #include <string>
  4. #include "vector3D.h"
  5. class Texture{
  6. public:
  7. Texture(std::string path, std::string type);
  8. ~Texture();
  9. Vector3f getPixelVal(float u, float v);
  10. float getIntensityVal(float u, float v);
  11. private:
  12. int bilinearFiltering(float u, float v);
  13. void tileData();
  14. float *pixelData;
  15. int width, height, channels, tileW = 32, tileH = 32, widthInTiles;
  16. };
  17. #endif