-
Notifications
You must be signed in to change notification settings - Fork 0
/
ImTexture.h
59 lines (39 loc) · 1.14 KB
/
ImTexture.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#pragma once
#include "Image.h"
#include "ColorRGB.h"
#include "SphereMap.h"
class ImTexture{
public:
ImTexture(void);
ImTexture(Image* _image_ptr);
ImTexture(const ImTexture& it);
ImTexture&
operator= (const ImTexture& rhs);
virtual ImTexture*
clone(void) const;
virtual
~ImTexture(void) ;
virtual ColorRGB
get_color(const Point3D& sr) const;
void
set_image(Image* _image_ptr);
void
set_SphereMap(SphereMap* map_ptr);
private:
int hres; // horizontal resolution of the image
int vres; // vertical resolution of the image
Image* image_ptr; // the image
SphereMap* SphereMap_ptr; // SphereMap technique used, if any
};
// ---------------------------------------------------------------- set_image
inline void
ImTexture::set_image(Image* _image_ptr) {
image_ptr = _image_ptr;
hres = image_ptr->get_hres();
vres = image_ptr->get_vres();
}
// ---------------------------------------------------------------- set_SphereMap
inline void
ImTexture::set_SphereMap(SphereMap* map_ptr) {
SphereMap_ptr = map_ptr;
}