Quad class

A quad spanning from -m_size / 2 to m_size / 2 in the (x,y)-plane at z=0.

Base classes

class XformedSurfaceWithMaterial
A convenience subclass of Surface for simple surfaces with a Transform and a Material.

Public functions

auto intersect(const Ray3f& ray, HitInfo& hit) const -> bool override
Ray-Surface intersection test.
auto local_bounds() const -> Box3f override
Return the surface's local-space AABB.
auto sample(EmitterRecord& rec, const Vec2f& rv) const -> Color3f override
Sample a direction from rec.o towards this surface.
auto pdf(const Vec3f& o, const Vec3f& v) const -> float override
Return the probability density of the sample generated by sample.

Protected variables

Vec2f m_size
The extent of the quad in the (x,y) plane.