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
Adds a Material to XformedSurface.

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.

Protected variables

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

Function documentation

bool Quad::intersect(const Ray3f& ray, HitInfo& hit) const override

Ray-Surface intersection test.

Parameters
ray in A 3-dimensional ray data structure with minimum/maximum extent information
hit out A detailed intersection record, which will be filled by the intersection query
Returns True if an intersection was found

Intersect a ray against this surface and return detailed intersection information.