Skip to content
Snippets Groups Projects
Commit 070bcbca authored by Yoel's avatar Yoel
Browse files

Defined AABB for circle-planes, shape-interface-method bounds now implemented for circle-plane

parent dd14ae1d
No related branches found
No related tags found
No related merge requests found
......@@ -28,4 +28,8 @@ std::shared_ptr<cam::Hit> CirclePlane::intersect(const cam::Ray& r) const {
}
}
}
util::AxisAlignedBoundingBox CirclePlane::bounds() const {
return util::AxisAlignedBoundingBox(util::Vec3(-radius, 0, -radius),
util::Vec3(radius, 0, radius));
}
} // namespace shapes
......@@ -8,6 +8,7 @@ class CirclePlane : public Shape {
CirclePlane(float radius,
const std::shared_ptr<material::Material>& material);
std::shared_ptr<cam::Hit> intersect(const cam::Ray& r) const override;
util::AxisAlignedBoundingBox bounds() const override;
private:
std::shared_ptr<material::Material> material;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment