diff --git a/src/pe/raytracing/Raytracer.cpp b/src/pe/raytracing/Raytracer.cpp index 33b40ab8f781317ad5973b0818e0f9146a4d592e..146e8fa54dc1b2e843d10c3e183e3c7fa815865f 100644 --- a/src/pe/raytracing/Raytracer.cpp +++ b/src/pe/raytracing/Raytracer.cpp @@ -172,25 +172,6 @@ void Raytracer::writeTBufferToFile(const std::vector<real_t>& tBuffer, const std ofs.close(); } -/*!\brief Checks if a plane should get rendered. - * \param plane Plane to check for visibility. - * \param ray Ray which is intersected with plane. - * - * Checks if a plane should get rendered by comparing the planes normal and the ray direction. - * If the rays direction vectors projection on the planes normal is positive, the plane is considered invisible. - */ -inline bool Raytracer::isPlaneVisible(const PlaneID plane, const Ray& ray) const { - return plane->getNormal() * ray.getDirection() < 0; -} - -/*!\brief Converts a coordinate to an array index. - * \param x X component of the coordinate. - * \param y Y component of the coordinate. - * \return Array index. - */ -inline size_t Raytracer::coordinateToArrayIndex(size_t x, size_t y) const { - return y*pixelsHorizontal_ + x; -} } } } diff --git a/src/pe/raytracing/Raytracer.h b/src/pe/raytracing/Raytracer.h index 49b3c35215818086cd32c9bdc7892d59a7d77ab0..eb0b799ba247ecbfcc950e4c1ee08175aacf2ebf 100644 --- a/src/pe/raytracing/Raytracer.h +++ b/src/pe/raytracing/Raytracer.h @@ -218,6 +218,26 @@ inline void Raytracer::setTBufferOutputDirectory(const std::string& path) { tBufferOutputDirectory_ = path; } + +/*!\brief Checks if a plane should get rendered. + * \param plane Plane to check for visibility. + * \param ray Ray which is intersected with plane. + * + * Checks if a plane should get rendered by comparing the planes normal and the ray direction. + * If the rays direction vectors projection on the planes normal is positive, the plane is considered invisible. + */ +inline bool Raytracer::isPlaneVisible(const PlaneID plane, const Ray& ray) const { + return plane->getNormal() * ray.getDirection() < 0; +} + +/*!\brief Converts a coordinate to an array index. + * \param x X component of the coordinate. + * \param y Y component of the coordinate. + * \return Array index. + */ +inline size_t Raytracer::coordinateToArrayIndex(size_t x, size_t y) const { + return y*pixelsHorizontal_ + x; +} /*!\brief Does one raytracing step. * @@ -359,7 +379,7 @@ void Raytracer::rayTrace(const size_t timestep) { } } } - + } } }