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

#include <SidednessAgreement.h>

Public Member Functions

 SidednessAgreement ()
 
 SidednessAgreement (ESidednessPolicy policy)
 
bool isSidednessAgreed (const math::Vector3R &Ng, const math::Vector3R &Ns, const math::Vector3R &vec) const
 
bool isSidednessAgreed (const SurfaceHit &X, const math::Vector3R &vec) const
 
bool isFrontHemisphere (const SurfaceHit &X, const math::Vector3R &vec) const
 
bool isBackHemisphere (const SurfaceHit &X, const math::Vector3R &vec) const
 
bool isSameHemisphere (const SurfaceHit &X, const math::Vector3R &vecA, const math::Vector3R &vecB) const
 
bool isOppositeHemisphere (const SurfaceHit &X, const math::Vector3R &vecA, const math::Vector3R &vecB) const
 
void adjustForSidednessAgreement (SurfaceHit &X) const
 

Constructor & Destructor Documentation

◆ SidednessAgreement() [1/2]

ph::lta::SidednessAgreement::SidednessAgreement ( )
inline

◆ SidednessAgreement() [2/2]

ph::lta::SidednessAgreement::SidednessAgreement ( ESidednessPolicy policy)
inlineexplicit

Member Function Documentation

◆ adjustForSidednessAgreement()

void ph::lta::SidednessAgreement::adjustForSidednessAgreement ( SurfaceHit & X) const
inline

◆ isBackHemisphere()

bool ph::lta::SidednessAgreement::isBackHemisphere ( const SurfaceHit & X,
const math::Vector3R & vec ) const
inline
Returns
Whether vec is under the back facing hemisphere given current policy.
Note
isFrontHemisphere() == !isBackHemisphere() is not necessary true. Consider the case where one of the vectors is perpendicular to the normal, it could theoretically belong to both hemisphere; to eliminate the ambiguity, the test is exclusive and returns false in this case.

◆ isFrontHemisphere()

bool ph::lta::SidednessAgreement::isFrontHemisphere ( const SurfaceHit & X,
const math::Vector3R & vec ) const
inline
Returns
Whether vec is under the front facing hemisphere given current policy.
Note
isFrontHemisphere() == !isBackHemisphere() is not necessary true. Consider the case where one of the vectors is perpendicular to the normal, it could theoretically belong to both hemisphere; to eliminate the ambiguity, the test is exclusive and returns false in this case.

◆ isOppositeHemisphere()

bool ph::lta::SidednessAgreement::isOppositeHemisphere ( const SurfaceHit & X,
const math::Vector3R & vecA,
const math::Vector3R & vecB ) const
inline
Returns
Whether vecA and vecB are under the opposite hemisphere given current policy.
Note
isOppositeHemisphere() == !isSameHemisphere() is not necessary true. Consider the case where one of the vectors is perpendicular to the normal, it could theoretically belong to both hemisphere; to eliminate the ambiguity, the test is exclusive and returns false in this case.

◆ isSameHemisphere()

bool ph::lta::SidednessAgreement::isSameHemisphere ( const SurfaceHit & X,
const math::Vector3R & vecA,
const math::Vector3R & vecB ) const
inline
Returns
Whether vecA and vecB are under the same hemisphere given current policy.
Note
isSameHemisphere() == !isOppositeHemisphere() is not necessary true. Consider the case where one of the vectors is perpendicular to the normal, it could theoretically belong to both hemisphere; to eliminate the ambiguity, the test is exclusive and returns false in this case.

◆ isSidednessAgreed() [1/2]

bool ph::lta::SidednessAgreement::isSidednessAgreed ( const math::Vector3R & Ng,
const math::Vector3R & Ns,
const math::Vector3R & vec ) const
inline

◆ isSidednessAgreed() [2/2]

bool ph::lta::SidednessAgreement::isSidednessAgreed ( const SurfaceHit & X,
const math::Vector3R & vec ) const
inline

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