geomc 1.0
A c++ linear algebra template library
Public Member Functions | List of all members
RayIntersectable< T, N, Derived > Class Template Reference

Base class describing N-dimensional shapes which can be intersection-tested with a Ray. More...

#include <geomc/shape/Shape.h>

Public Member Functions

Rect< T, 1 > intersect (const Ray< T, N > &r) const
 Ray/shape intersection. More...
 

Detailed Description

template<typename T, index_t N, typename Derived>
class geom::RayIntersectable< T, N, Derived >

Base class describing N-dimensional shapes which can be intersection-tested with a Ray.

Uses the curiously-recurring template pattern to perform static polymorphism.

Member Function Documentation

◆ intersect()

Rect< T, 1 > intersect ( const Ray< T, N > &  r) const
inline

Ray/shape intersection.

Return the possibly-empty range of ray parameters s such that the Ray overlaps the shape at r.origin + s * r.direction.

For non-convex objects with multiple regions of overlap, this method should return the interval containing the smallest positive value.


The documentation for this class was generated from the following file: