Output for PrimitivePosSampleQuery
.
More...
#include <PrimitivePosSampleQuery.h>
◆ getDir()
Get the sampled direction. Some implementation may suggest a sample direction if no observation position is given.
- Returns
- A vector representing the suggested sample direction.
- Note
- This is only available if
getPdfDir()
is non-empty.
◆ getObservationRay()
const Ray & ph::PrimitivePosSampleOutput::getObservationRay |
( |
| ) |
const |
|
inline |
Get the ray from observation position to sampled position. If there is no explicitly provided observation position, the sampled position will be the observation position. In this case, the length of the ray will be 0 and whether the direction of the ray may set to a meaningful value is depending on PrimitivePosSampleInput::suggestDir()
: true
: getObservationRay().getDir()
and getDir()
both contain the suggested direction if getPdfDir()
is non-empty. false
: No standard behavior is defined.
- Note
- If a hit event is associated with this ray, obtaining the sampled position by calculating its hit detail is more accurate but slower. Using
getObservationRay().getHead()
is faster but is generally less accurate (though it is useful if only a crude position is required).
◆ getPdfA()
real ph::PrimitivePosSampleOutput::getPdfA |
( |
| ) |
const |
|
inline |
◆ getPdfDir()
const lta::PDF & ph::PrimitivePosSampleOutput::getPdfDir |
( |
| ) |
const |
|
inline |
◆ getPdfPos()
const lta::PDF & ph::PrimitivePosSampleOutput::getPdfPos |
( |
| ) |
const |
|
inline |
◆ getPdfW()
real ph::PrimitivePosSampleOutput::getPdfW |
( |
| ) |
const |
|
inline |
◆ getPos()
Get the sampled position.
- Returns
- The coordinates of the sampled position. This is generally more accurate (and more performant) than using
getObservationRay().getHead()
.
- Note
- This is only available if
getPdfPos()
is non-empty.
◆ operator bool()
ph::PrimitivePosSampleOutput::operator bool |
( |
| ) |
const |
|
inline |
Checks the validity of the sample.
- Returns
true
if the sample is valid. false
if the sample failed. A failed sample cannot be used. A typical way to fail is that sampling is not even supported/possible.
◆ setObservationRay()
void ph::PrimitivePosSampleOutput::setObservationRay |
( |
const Ray & | observationRay | ) |
|
|
inline |
◆ setPdfDir()
void ph::PrimitivePosSampleOutput::setPdfDir |
( |
const lta::PDF & | pdfDir | ) |
|
|
inline |
◆ setPdfPos()
void ph::PrimitivePosSampleOutput::setPdfPos |
( |
const lta::PDF & | pdfPos | ) |
|
|
inline |
◆ setPos()
void ph::PrimitivePosSampleOutput::setPos |
( |
const math::Vector3R & | pos | ) |
|
|
inline |
The documentation for this class was generated from the following file: