Skip to content

Commit eb5fceb

Browse files
committed
Refactor: rename constant_texture::color
Member variable renamed from `color` to `solid_color`.
1 parent 3d8d3eb commit eb5fceb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

books/RayTracingTheNextWeek.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -889,14 +889,14 @@
889889
class constant_texture : public texture {
890890
public:
891891
constant_texture() {}
892-
constant_texture(vec3 c) : color(c) {}
892+
constant_texture(vec3 c) : solid_color(c) {}
893893

894894
virtual vec3 value(double u, double v, const vec3& p) const {
895-
return color;
895+
return solid_color;
896896
}
897897

898898
public:
899-
vec3 color;
899+
vec3 solid_color;
900900
};
901901
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
902902
[Listing [texture]: <kbd>[texture.h]</kbd> A texture class]

src/common/texture.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ class texture {
2525
class constant_texture : public texture {
2626
public:
2727
constant_texture() {}
28-
constant_texture(vec3 c) : color(c) {}
28+
constant_texture(vec3 c) : solid_color(c) {}
2929

3030
virtual vec3 value(double u, double v, const vec3& p) const {
31-
return color;
31+
return solid_color;
3232
}
3333

3434
public:
35-
vec3 color;
35+
vec3 solid_color;
3636
};
3737

3838

0 commit comments

Comments
 (0)