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

Inlined isPlaneVisible and coordinateToArrayIndex

parent 491091af
......@@ -179,7 +179,7 @@ void Raytracer::writeTBufferToFile(const std::vector<real_t>& tBuffer, const std
* 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.
*/
bool Raytracer::isPlaneVisible(const PlaneID plane, const Ray& ray) const {
inline bool Raytracer::isPlaneVisible(const PlaneID plane, const Ray& ray) const {
return plane->getNormal() * ray.getDirection() < 0;
}
......@@ -188,7 +188,7 @@ bool Raytracer::isPlaneVisible(const PlaneID plane, const Ray& ray) const {
* \param y Y component of the coordinate.
* \return Array index.
*/
size_t Raytracer::coordinateToArrayIndex(size_t x, size_t y) const {
inline size_t Raytracer::coordinateToArrayIndex(size_t x, size_t y) const {
return y*pixelsHorizontal_ + x;
}
}
......
......@@ -124,8 +124,8 @@ public:
private:
void writeTBufferToFile(const std::vector<real_t>& tBuffer, size_t timestep, bool isGlobalImage = false) const;
void writeTBufferToFile(const std::vector<real_t>& tBuffer, const std::string& fileName) const;
bool isPlaneVisible(const PlaneID plane, const Ray& ray) const;
size_t coordinateToArrayIndex(size_t x, size_t y) const;
inline bool isPlaneVisible(const PlaneID plane, const Ray& ray) const;
inline size_t coordinateToArrayIndex(size_t x, size_t y) const;
//@}
};
......
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