26 lines
696 B
C++
26 lines
696 B
C++
#ifndef RAYTRYCPP_INFINITEPLANE_H
|
|
#define RAYTRYCPP_INFINITEPLANE_H
|
|
|
|
#include "RenderObject.h"
|
|
#include <QVector3D>
|
|
|
|
namespace raytry {
|
|
class InfinitePlane : public raytry::RenderObject {
|
|
public:
|
|
InfinitePlane();
|
|
InfinitePlane(float zLevel, QVector3D normalVec);
|
|
~InfinitePlane() override = default;
|
|
|
|
[[nodiscard]] std::optional<float> intersects(const Ray& ray) const override;
|
|
[[nodiscard]] RenderMaterial material() const override;
|
|
[[nodiscard]] QVector3D calculateNormal(QVector3D hitpoint) const override;
|
|
|
|
private:
|
|
float zLevel;
|
|
QVector3D normalVec;
|
|
};
|
|
}// namespace raytry
|
|
|
|
|
|
#endif//RAYTRYCPP_INFINITEPLANE_H
|