Skip to content
Snippets Groups Projects
Commit 2e520437 authored by Lukas Werner's avatar Lukas Werner
Browse files

Some more documentation

parent 5ac1b38c
No related merge requests found
......@@ -88,7 +88,9 @@ Raytracer::Raytracer(const shared_ptr<BlockStorage> & forest, BlockDataID storag
setupView_();
}
/*!\brief Utility function for setting up the view plane and calculating required variables.
*/
void Raytracer::setupView_() {
// eye coordinate system setup
n = (cameraPosition_ - lookAtPoint_).getNormalized();
......
......@@ -32,26 +32,30 @@ namespace walberla {
namespace pe {
namespace raytracing {
/*!\brief Contains information about a ray-body intersection.
*/
struct BodyIntersectionInfo {
size_t imageX; // viewing plane pixel coordinates to ...
size_t imageY; // ... identify ray by pixel it intersected
walberla::id_t bodySystemID; // body which was hit
real_t t; // distance from camera to intersection point on body
size_t imageX; //!< viewing plane x pixel coordinate the ray belongs to.
size_t imageY; //!< viewing plane y pixel coordinate the ray belongs to.
walberla::id_t bodySystemID; //!< system ID of body which was hit.
real_t t; //!< distance from camera to intersection point on body.
};
/*!\brief Simple struct for coordinates.
*/
struct Coordinates {
size_t x;
size_t y;
};
/*!\brief Comparator for Coordinates struct with standard lexicographical ordering.
*/
struct CoordinatesComparator {
bool operator() (const Coordinates& lhs, const Coordinates& rhs) const {
// standard lexicographical ordering
return (lhs.x < rhs.x) || (lhs.x == rhs.x && lhs.y < rhs.y);
}
};
class Raytracer {
public:
/*!\name Constructors */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment