aboutsummaryrefslogtreecommitdiff
path: root/raytracing/color.cc
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-03-09 21:49:43 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-03-09 21:49:43 +0800
commit99ac5b94e40b1b95be6ebc061f6dcee4d4dcfed5 (patch)
treea5752bac23c6c1cbfb23130e2e51c1e1155723ec /raytracing/color.cc
parent82be1151b5c9e49ccba238ec6e4b18a2cb8fb23d (diff)
downloadrcc-project-99ac5b94e40b1b95be6ebc061f6dcee4d4dcfed5.tar.gz
rcc-project-99ac5b94e40b1b95be6ebc061f6dcee4d4dcfed5.tar.xz
Establish a well-structured modern C++ project architecture
Focus on code quality: Treat strict warnings as errors, memory checks with Sanitizers, Clang formatting and static analysis Performance optimization: LTO, ccache
Diffstat (limited to 'raytracing/color.cc')
-rw-r--r--raytracing/color.cc15
1 files changed, 0 insertions, 15 deletions
diff --git a/raytracing/color.cc b/raytracing/color.cc
deleted file mode 100644
index c1eac72..0000000
--- a/raytracing/color.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "color.h"
-
-void write_color(std::ostream &out, const color &pixel_color){
- auto r = pixel_color.x();
- auto g = pixel_color.y();
- auto b = pixel_color.z();
-
- // Translate the [0,1] component values to the byte range [0,255].
- int rbyte = int(255.999 * r);
- int gbyte = int(255.999 * g);
- int bbyte = int(255.999 * b);
-
- // Write out the pixel color components.
- out << rbyte << ' ' << gbyte << ' ' << bbyte << '\n';
-} \ No newline at end of file