Commit c3b9561f authored by Lukas Werner's avatar Lukas Werner
Browse files

Fixed inlining

parent eec591b8
......@@ -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;
}
}
}
}
......@@ -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) {
}
}
}
}
}
}
Markdown is supported
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