summaryrefslogtreecommitdiff
path: root/material.h
diff options
context:
space:
mode:
authorKeuin <[email protected]>2022-04-15 14:06:27 +0800
committerKeuin <[email protected]>2022-04-15 14:06:27 +0800
commit2d4671d5469116b05709bb1acb614d784d339964 (patch)
treeafa839deea5e01ab3cd062968eae30ca56310370 /material.h
parent50cd8dd3dd029ce432f8e517b4c054e75b5cfe8e (diff)
Make ray3::decay_ distinguishable between different color channels.
Diffstat (limited to 'material.h')
-rw-r--r--material.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/material.h b/material.h
index a1d03db..b839cc9 100644
--- a/material.h
+++ b/material.h
@@ -22,24 +22,27 @@ public:
};
class material_diffuse_lambertian : public material {
- double albedo;
+ vec3d albedo;
public:
+ explicit material_diffuse_lambertian(vec3d albedo);
explicit material_diffuse_lambertian(double albedo);
bool scatter(ray3d &r, const object &hit_obj, double hit_t, random_uv_gen_3d &ruvg) const override;
};
class material_diffuse_simple : public material {
- double albedo;
+ vec3d albedo;
public:
+ explicit material_diffuse_simple(vec3d albedo);
explicit material_diffuse_simple(double albedo);
bool scatter(ray3d &r, const object &hit_obj, double hit_t, random_uv_gen_3d &ruvg) const override;
};
class material_diffuse_hemispherical : public material {
- double albedo;
+ vec3d albedo;
public:
+ explicit material_diffuse_hemispherical(vec3d albedo);
explicit material_diffuse_hemispherical(double albedo);
bool scatter(ray3d &r, const object &hit_obj, double hit_t, random_uv_gen_3d &ruvg) const override;