Ray Tracer Common Project
Image rendering program based on the ray tracing technique.
imagetexture.hpp
1 
15 #pragma once
16 
17 #include <string>
18 
19 #include "texture.hpp"
20 
21 namespace rt{
22 
23 class image;
24 
31 class ImageTexture : public Texture{
32 public:
39 
45  rt::image *image() const;
46 
52  void setImage(rt::image *);
53 
59  virtual color value(const vector &) const;
60 
61 private:
62  rt::image *_img;
63 };
64 
65 }
rt::image * image() const
The image of the texture.
Definition: imagetexture.cpp:10
Material texture.
Definition: texture.hpp:28
ImageTexture(rt::image *)
Construct a texture from a pointer to a rt::image.
Definition: imagetexture.cpp:6
Definition: bitmap.cpp:4
RGBA color representation.
Definition: color.hpp:31
3D vector
Definition: vector.hpp:28
Image texture.
Definition: imagetexture.hpp:31
virtual color value(const vector &) const
Get the value/color of the texture.
Definition: imagetexture.cpp:18
Image surface.
Definition: image.hpp:31
void setImage(rt::image *)
Set the image of the texture.
Definition: imagetexture.cpp:14