Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::SurfaceHit Class Referencefinal

General information about a ray-surface intersection event. More...

#include <SurfaceHit.h>

Public Member Functions

 SurfaceHit ()
 
 SurfaceHit (const Ray &ray, const HitProbe &probe, SurfaceHitReason reason)
 Construct from the ray and probe involved in a hit event. A full hit detail will be computed. If this is undesirable (e.g., full hit detail is not required), use the overload which let you set the hit detail directly.
 
 SurfaceHit (const Ray &ray, const HitProbe &probe, const HitDetail &detail, SurfaceHitReason reason)
 
SurfaceHit switchChannel (uint32 newChannel) const
 
bool reintersect (const Ray &ray, HitProbe &probe) const
 Intersect the intersected object again with a different ray.
 
bool hasSurfaceOptics () const
 
bool hasInteriorOptics () const
 
bool hasExteriorOptics () const
 
const HitDetailgetDetail () const
 
SurfaceHitReason getReason () const
 
const RaygetRay () const
 
const RaygetIncidentRay () const
 Convenient method for getRay() where getReason() contains ESurfaceHitReason::IncidentRay.
 
const TimegetTime () const
 
math::Vector3R getPos () const
 
math::Vector3R getShadingNormal () const
 
math::Vector3R getGeometryNormal () const
 
const EmittergetSurfaceEmitter () const
 
const SurfaceOpticsgetSurfaceOptics () const
 
const VolumeOpticsgetInteriorOptics () const
 
const VolumeOpticsgetExteriorOptics () const
 

Detailed Description

General information about a ray-surface intersection event.

Constructor & Destructor Documentation

◆ SurfaceHit() [1/3]

ph::SurfaceHit::SurfaceHit ( )
inline

◆ SurfaceHit() [2/3]

ph::SurfaceHit::SurfaceHit ( const Ray & ray,
const HitProbe & probe,
SurfaceHitReason reason )
inline

Construct from the ray and probe involved in a hit event. A full hit detail will be computed. If this is undesirable (e.g., full hit detail is not required), use the overload which let you set the hit detail directly.

◆ SurfaceHit() [3/3]

ph::SurfaceHit::SurfaceHit ( const Ray & ray,
const HitProbe & probe,
const HitDetail & detail,
SurfaceHitReason reason )
inline

Member Function Documentation

◆ getDetail()

const HitDetail & ph::SurfaceHit::getDetail ( ) const
inline

◆ getExteriorOptics()

const VolumeOptics * ph::SurfaceHit::getExteriorOptics ( ) const

◆ getGeometryNormal()

math::Vector3R ph::SurfaceHit::getGeometryNormal ( ) const
inline

◆ getIncidentRay()

const Ray & ph::SurfaceHit::getIncidentRay ( ) const
inline

Convenient method for getRay() where getReason() contains ESurfaceHitReason::IncidentRay.

◆ getInteriorOptics()

const VolumeOptics * ph::SurfaceHit::getInteriorOptics ( ) const

◆ getPos()

math::Vector3R ph::SurfaceHit::getPos ( ) const
inline

◆ getRay()

const Ray & ph::SurfaceHit::getRay ( ) const
inline
Returns
The ray of a hit event.

◆ getReason()

SurfaceHitReason ph::SurfaceHit::getReason ( ) const
inline

◆ getShadingNormal()

math::Vector3R ph::SurfaceHit::getShadingNormal ( ) const
inline

◆ getSurfaceEmitter()

const Emitter * ph::SurfaceHit::getSurfaceEmitter ( ) const

◆ getSurfaceOptics()

const SurfaceOptics * ph::SurfaceHit::getSurfaceOptics ( ) const

◆ getTime()

const Time & ph::SurfaceHit::getTime ( ) const
inline

◆ hasExteriorOptics()

bool ph::SurfaceHit::hasExteriorOptics ( ) const

◆ hasInteriorOptics()

bool ph::SurfaceHit::hasInteriorOptics ( ) const

◆ hasSurfaceOptics()

bool ph::SurfaceHit::hasSurfaceOptics ( ) const

◆ reintersect()

bool ph::SurfaceHit::reintersect ( const Ray & ray,
HitProbe & probe ) const
inline

Intersect the intersected object again with a different ray.

Parameters
rayThe different ray to use for intersection test.
probeThe probe to record the intersection.
Note
Generates hit event (with ray and probe).

◆ switchChannel()

SurfaceHit ph::SurfaceHit::switchChannel ( uint32 newChannel) const

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