#pragma once #include "Vector.hpp" #include "Intersectable.hpp" class Occluder : public Intersectable { public: Vector centre; float solidRadius; Intersectable* owner; Occluder(){} Occluder(const Vector& centre, const float hardRadius); ~Occluder(void); float cosAngle; Vector dirToCentre; float distance; bool intersect(const Ray& ray, float& depth, float rayMin, float rayMax) { lastTestedRayId = ray.id; register bool boo = (distance < rayMax) && (ray.dir * dirToCentre < cosAngle); lastTestedRayResult.isIntersect = boo; lastTestedRayResult.depth = distance; return boo; } bool intersectBackSide(const Ray& ray, float& depth, float rayMin, float rayMax) {return false;} void setupBBox(); };