sraaphorst / raytracer-cpp Goto Github PK
View Code? Open in Web Editor NEWRay tracer implementation in C++
Ray tracer implementation in C++
Note that there is some ghastliness in how the Intersection
s are created in Shape::localIntersection
, since they need a shared_ptr
to this
. We could inherit from std::enabled_shared_from_this
, and then use make_shared_from_this()
, but then we need to have a shared_ptr
to this
stored somewhere as a prerequisite to doing so.
Instead, we should be using a factory to create Shape
subclasses that manages the pointers.
See pg. 145.
See page 173 of book. Water, for example, should not cast a shadow.
See pg. 145.
See page 144: this allows proper checkering on spheres.
Right now, you have to do:
auto pattern = std::make_shared<PatternType>(params);
auto material = std::make_shared<Material>(pattern);
This could all be one much easier step as this is how it is always used:
auto material = PatternType::createPattern(params);
As per pg 184.
Right now, if World
is const
, we can still change its internal Shape
objects. This should not be allowed.
Lots of methods are missing noexcept. Add it.
See pg. 146.
See pg. 145.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.