texture.h 416 B

123456789101112131415161718192021222324
  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. float *pixelData;
  14. int width, height, channels;
  15. };
  16. #endif