raytracer.hpp | Simple compile-time raytracer using C++17
kandi X-RAY | raytracer.hpp Summary
kandi X-RAY | raytracer.hpp Summary
raytracer.hpp is a C library. raytracer.hpp has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.
The rt::ray_tracer class takes a Scene and renders it onto a Canvas, where both Scene and Canvas are template parameters given to the ray_tracer::render() method. A Scene is made up of a number of "things", a number of lights, and a camera. In the language of the Concepts TS, the expected interface might be something like this:. A Canvas is simpler, and basically just requires a set_pixel(x, y, rt::color) method. The file compile_time.cpp contains a scene (and canvas) using std::arrays, while run_time.cpp is the same but uses std::vectors instead (to deliberately prevent compile-time evaluation). A Thing is an object in the world. The header provides two types of Thing, namely a sphere and a plane. To avoid virtual functions, these are used polymorphically via an any_thing class, which is a wrapper around a std::variant. If you wish to define your own kind of Thing in a scene (for example a box), you'll need add it to the any_thing variant, and implement three member functions: intersect(), which tests whether a given ray interects with the Thing, get_normal() which returns the normal vector to the object at the given point, and get_surface() which returns the surface the object is made from. (Unfortunately, the interface for intersect() is slightly complicated by the need to return a pointer to an any_thing along with the intersection information, but it's fairly straightforward -- take a look at the code for the sphere and plane classes.).
The rt::ray_tracer class takes a Scene and renders it onto a Canvas, where both Scene and Canvas are template parameters given to the ray_tracer::render() method. A Scene is made up of a number of "things", a number of lights, and a camera. In the language of the Concepts TS, the expected interface might be something like this:. A Canvas is simpler, and basically just requires a set_pixel(x, y, rt::color) method. The file compile_time.cpp contains a scene (and canvas) using std::arrays, while run_time.cpp is the same but uses std::vectors instead (to deliberately prevent compile-time evaluation). A Thing is an object in the world. The header provides two types of Thing, namely a sphere and a plane. To avoid virtual functions, these are used polymorphically via an any_thing class, which is a wrapper around a std::variant. If you wish to define your own kind of Thing in a scene (for example a box), you'll need add it to the any_thing variant, and implement three member functions: intersect(), which tests whether a given ray interects with the Thing, get_normal() which returns the normal vector to the object at the given point, and get_surface() which returns the surface the object is made from. (Unfortunately, the interface for intersect() is slightly complicated by the need to return a pointer to an any_thing along with the intersection information, but it's fairly straightforward -- take a look at the code for the sphere and plane classes.).
Support
Quality
Security
License
Reuse
Support
raytracer.hpp has a low active ecosystem.
It has 635 star(s) with 25 fork(s). There are 21 watchers for this library.
It had no major release in the last 6 months.
There are 2 open issues and 4 have been closed. On average issues are closed in 0 days. There are no pull requests.
It has a neutral sentiment in the developer community.
The latest version of raytracer.hpp is current.
Quality
raytracer.hpp has 0 bugs and 0 code smells.
Security
raytracer.hpp has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
raytracer.hpp code analysis shows 0 unresolved vulnerabilities.
There are 0 security hotspots that need review.
License
raytracer.hpp does not have a standard license declared.
Check the repository for any license declaration and review the terms closely.
Without a license, all rights are reserved, and you cannot use the library in your applications.
Reuse
raytracer.hpp releases are not available. You will need to build from source code and install.
Installation instructions are not available. Examples and code snippets are available.
Top functions reviewed by kandi - BETA
kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of raytracer.hpp
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of raytracer.hpp
raytracer.hpp Key Features
No Key Features are available at this moment for raytracer.hpp.
raytracer.hpp Examples and Code Snippets
No Code Snippets are available at this moment for raytracer.hpp.
Community Discussions
No Community Discussions are available at this moment for raytracer.hpp.Refer to stack overflow page for discussions.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install raytracer.hpp
You can download it from GitHub.
Support
For any new features, suggestions and bugs create an issue on GitHub.
If you have any questions check and ask questions on community page Stack Overflow .
Find more information at:
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page