Container for all information related to a surface intersection. More...
#include <mitsuba/render/shape.h>
Public Member Functions | |
Intersection () | |
Vector | toWorld (const Vector &v) const |
Convert a local shading-space vector into world space. More... | |
Vector | toLocal (const Vector &v) const |
Convert a world-space vector into local shading coordinates. More... | |
bool | isValid () const |
Is the current intersection valid? More... | |
bool | isEmitter () const |
Is the intersected shape also a emitter? More... | |
bool | isSensor () const |
Is the intersected shape also a sensor? More... | |
bool | hasSubsurface () const |
Does the intersected shape have a subsurface integrator? More... | |
bool | isMediumTransition () const |
Does the surface mark a transition between two media? More... | |
const Medium * | getTargetMedium (const Vector &d) const |
Determine the target medium. More... | |
const Medium * | getTargetMedium (Float cosTheta) const |
Determine the target medium based on the cosine of the angle between the geometric normal and a direction. More... | |
const BSDF * | getBSDF (const RayDifferential &ray) |
Returns the BSDF of the intersected shape. More... | |
const BSDF * | getBSDF () const |
Returns the BSDF of the intersected shape. More... | |
Spectrum | Le (const Vector &d) const |
Returns radiance emitted into direction d. More... | |
Spectrum | LoSub (const Scene *scene, Sampler *sampler, const Vector &d, int depth=0) const |
Returns radiance from a subsurface integrator emitted into direction d. More... | |
void | computePartials (const RayDifferential &ray) |
Computes texture coordinate partials. More... | |
void | adjustTime (Float time) |
Move the intersection forward or backward through time. More... | |
void | getNormalDerivative (Vector &dndu, Vector &dndv, bool shadingFrame=true) const |
Calls the suitable implementation of Shape::getNormalDerivative() More... | |
std::string | toString () const |
Return a string representation. More... | |
Public Attributes | |
const Shape * | shape |
Pointer to the associated shape. More... | |
Float | t |
Distance traveled along the ray. More... | |
Point | p |
Frame | geoFrame |
Geometry frame. More... | |
Frame | shFrame |
Shading frame. More... | |
Point2 | uv |
UV surface coordinates. More... | |
Vector | dpdu |
Position partials wrt. the UV parameterization. More... | |
Vector | dpdv |
Float | dudx |
UV partials wrt. changes in screen-space. More... | |
Float | dudy |
Float | dvdx |
Float | dvdy |
Float | time |
Time value associated with the intersection. More... | |
Spectrum | color |
Interpolated vertex color. More... | |
Vector | wi |
Incident direction in the local shading frame. More... | |
bool | hasUVPartials: 1 |
Have texture coordinate partials been computed. More... | |
uint32_t | primIndex: 31 |
Primitive index, e.g. the triangle ID (if applicable) More... | |
const Shape * | instance |
Stores a pointer to the parent instance, if applicable. More... | |
Container for all information related to a surface intersection.
|
inline |
|
inline |
Move the intersection forward or backward through time.
void mitsuba::Intersection::computePartials | ( | const RayDifferential & | ray | ) |
Computes texture coordinate partials.
|
inline |
Returns the BSDF of the intersected shape.
The parameter ray must match the one used to create the intersection record. This function computes texture coordinate partials if this is required by the BSDF (e.g. for texture filtering).
|
inline |
Returns the BSDF of the intersected shape.
|
inline |
Calls the suitable implementation of Shape::getNormalDerivative()
Determine the target medium.
When isMediumTransition()
= true
, determine the medium that contains the ray (this->p
, d
)
Determine the target medium based on the cosine of the angle between the geometric normal and a direction.
Returns the exterior medium when cosTheta
> 0 and the interior medium when cosTheta
<= 0.
|
inline |
Does the intersected shape have a subsurface integrator?
|
inline |
Is the intersected shape also a emitter?
|
inline |
Does the surface mark a transition between two media?
|
inline |
Is the intersected shape also a sensor?
|
inline |
Is the current intersection valid?
Returns radiance emitted into direction d.
|
inline |
Returns radiance from a subsurface integrator emitted into direction d.
Convert a world-space vector into local shading coordinates.
std::string mitsuba::Intersection::toString | ( | ) | const |
Return a string representation.
Convert a local shading-space vector into world space.
Spectrum mitsuba::Intersection::color |
Interpolated vertex color.
Vector mitsuba::Intersection::dpdu |
Position partials wrt. the UV parameterization.
Vector mitsuba::Intersection::dpdv |
Float mitsuba::Intersection::dudx |
UV partials wrt. changes in screen-space.
Float mitsuba::Intersection::dudy |
Float mitsuba::Intersection::dvdx |
Float mitsuba::Intersection::dvdy |
Frame mitsuba::Intersection::geoFrame |
Geometry frame.
bool mitsuba::Intersection::hasUVPartials |
Have texture coordinate partials been computed.
const Shape* mitsuba::Intersection::instance |
Stores a pointer to the parent instance, if applicable.
Point mitsuba::Intersection::p |
uint32_t mitsuba::Intersection::primIndex |
Primitive index, e.g. the triangle ID (if applicable)
const Shape* mitsuba::Intersection::shape |
Pointer to the associated shape.
Frame mitsuba::Intersection::shFrame |
Shading frame.
Float mitsuba::Intersection::t |
Distance traveled along the ray.
Float mitsuba::Intersection::time |
Time value associated with the intersection.
Point2 mitsuba::Intersection::uv |
UV surface coordinates.
Vector mitsuba::Intersection::wi |
Incident direction in the local shading frame.