Photon Engine 2.0.0-beta
A physically based renderer.
|
#include <BruteForceIntersector.h>
Public Member Functions | |
void | update (TSpanView< const Intersectable * > intersectables) override |
bool | isIntersecting (const Ray &ray, HitProbe &probe) const override |
Determine whether a given ray hits the object. | |
bool | isOccluding (const Ray &ray) const override |
Determines whether this object blocks the ray. | |
math::AABB3D | calcAABB () const override |
Calculates Axis-Aligned Bounding Box (AABB) of itself. | |
Public Member Functions inherited from ph::Intersector | |
bool | reintersect (const Ray &ray, HitProbe &probe, const Ray &srcRay, HitProbe &srcProbe) const override |
Intersect the intersected object again with a different ray. | |
void | calcHitDetail (const Ray &ray, HitProbe &probe, HitDetail *out_detail) const override |
Calculates properties of a hit, such as coordinates and normal. | |
Public Member Functions inherited from ph::Intersectable | |
virtual | ~Intersectable ()=default |
virtual bool | mayOverlapVolume (const math::AABB3D &volume) const |
Conservatively checks whether this object overlaps a volume. | |
|
overridevirtual |
Calculates Axis-Aligned Bounding Box (AABB) of itself.
Implements ph::Intersector.
|
overridevirtual |
Determine whether a given ray hits the object.
Checks whether the specified ray intersects this intersectable. If there is an intersection, true
is returned and a brief hit report is stored inside the probe. If there is no intersection, false
is returned and the state of the probe is undefined. ray
and probe
can be used for obtaining hit detail if an intersection is found.
ray
and probe
). Implements ph::Intersector.
|
overridevirtual |
Determines whether this object blocks the ray.
If greater performance is desired, you can override the default implementation which simply calls isIntersecting(const Ray&, HitProbe&) const to do the job. The test generally considers the underlying shape as hollow (for closed shape), e.g., a sphere is not occluding a line segment inside the sphere.
This method does not provide any means to retrieve HitDetail
. Focusing on testing occlusion can improve performance for some cases.
Reimplemented from ph::Intersectable.
|
overridevirtual |
Implements ph::Intersector.