20 #if !defined(__MITSUBA_BIDIR_VERTEX_H_)
21 #define __MITSUBA_BIDIR_VERTEX_H_
73 EEmitterSupernode = 2,
79 ESurfaceInteraction = 16,
81 EMediumInteraction = 32,
83 ESupernode = ESensorSupernode | EEmitterSupernode,
85 ENormal = ESensorSample | EEmitterSample
86 | ESurfaceInteraction | EMediumInteraction
579 Point getPosition()
const;
583 return (type == ESurfaceInteraction) || ((type == EEmitterSample ||
584 type == ESensorSample) && static_cast<const AbstractEmitter *>(
585 getPositionSamplingRecord().object)->getType() & AbstractEmitter::EOnSurface);
596 return type == ESurfaceInteraction && componentType == BSDF::ENull;
604 return type == ESurfaceInteraction &&
605 (componentType == BSDF::EDiffuseReflection || componentType == BSDF::EDiffuseTransmission);
616 return (type == ESurfaceInteraction &&
617 (getIntersection().shape->getBSDF()->getType() & BSDF::EAll) == 0);
633 Normal getGeometricNormal()
const;
640 Normal getShadingNormal()
const;
643 Float getTime()
const;
718 return getPositionSamplingRecord().uv;
724 getPositionSamplingRecord().object);
752 bool updateSamplePosition(
const PathVertex *succ);
794 bool cast(
const Scene *scene, EVertexType desired);
878 static bool connect(
const Scene *scene,
884 static bool connect(
const Scene *scene,
894 std::string toString()
const;
897 bool operator==(
const PathVertex &vertex)
const;
901 return !operator==(vertex);
910 std::ostream &
operator<<(std::ostream &os, PathVertex::EVertexType type);
#define MAX(a, b)
Definition: common.h:36
Abstract participating medium.
Definition: medium.h:103
Three-dimensional normal data structure.
Definition: normal.h:39
Bidirectional path vertex data structure.
Definition: vertex.h:48
const MediumSamplingRecord & getMediumSamplingRecord() const
Return the medium sampling record associated with this node.
Definition: vertex.h:710
bool isMediumInteraction() const
Is this vertex a medium interaction?
Definition: vertex.h:658
unsigned int getComponentType() const
Return the component type associated with this vertex.
Definition: vertex.h:626
bool isDegenerate() const
Returns whether or not this vertex is degenerate, i.e. its distribution has measure zero...
Definition: vertex.h:731
Abstract radiance/importance emitter interface.
Definition: emitter.h:70
EVertexType
What kind of vertex is this (e.g. medium, surface, emitter)?
Definition: vertex.h:67
bool isEmitterSample() const
Is this vertex an emitter sample?
Definition: vertex.h:652
Generic sampling record for positions.
Definition: common.h:82
bool isEmitterSupernode() const
Is this vertex a emitter super-node?
Definition: vertex.h:650
Principal scene data structure.
Definition: scene.h:49
Discrete measure.
Definition: common.h:66
const EndpointRecord & getEndpointRecord() const
Return the endpoint record associated with this node (const)
Definition: vertex.h:668
Base class of all sample generators.
Definition: sampler.h:66
std::ostream & operator<<(std::ostream &out, const DScalar1< Scalar, VecType > &s)
Definition: autodiff.h:392
EndpointRecord & getEndpointRecord()
Return the endpoint record associated with this node.
Definition: vertex.h:661
MediumSamplingRecord & getMediumSamplingRecord()
Return the medium sampling record associated with this node.
Definition: vertex.h:703
PositionSamplingRecord & getPositionSamplingRecord()
Return the position sampling record associated with this node.
Definition: vertex.h:675
EMeasure
A list of measures that are associated with various sampling methods in Mitsuba.
Definition: common.h:56
Float rrWeight
Termination weight due to russian roulette (used by BDPT)
Definition: vertex.h:200
bool isSensorSupernode() const
Is this vertex a sensor super-node?
Definition: vertex.h:648
bool isDiffuseInteraction() const
Returns whether or not this vertex describes a diffuse surface scattering interaction.
Definition: vertex.h:603
Data record for sampling a point on the in-scattering integral of the RTE.
Definition: medium.h:34
bool isSensorSample() const
Is this vertex a lens sample?
Definition: vertex.h:654
Specifies the number of supported transport modes.
Definition: common.h:42
EVertexType getType() const
Return the type associated with this vertex.
Definition: vertex.h:572
Intersection & getIntersection()
Return the intersection record associated with this node.
Definition: vertex.h:689
Bidirectional path edge data structure.
Definition: edge.h:46
bool isOnSurface() const
Check if the vertex lies on a surface.
Definition: vertex.h:582
const Intersection & getIntersection() const
Return the intersection record associated with this node (const)
Definition: vertex.h:696
const Point2 & getSamplePosition() const
Return the fractional pixel position associated with a sensor sample.
Definition: vertex.h:717
bool isConnectable() const
Returns whether or not this vertex can be deterministically connected to other vertices.
Definition: vertex.h:740
bool isSurfaceInteraction() const
Is this vertex a surface interaction?
Definition: vertex.h:656
Container for all information related to a surface intersection.
Definition: shape.h:36
Data record associated with path endpoints (aka supernodes) in the path-space framework.
Definition: common.h:48
Discrete spectral power distribution based on a number of wavelength bins over the 360-830 nm range...
Definition: spectrum.h:663
bool isSupernode() const
Is this vertex a supernode?
Definition: vertex.h:646
Area measure.
Definition: common.h:64
bool operator!=(const PathVertex &vertex) const
Compare this vertex against another vertex.
Definition: vertex.h:900
bool isAbsorbing() const
Returns whether or not this vertex describes a 100% absorbing surface.
Definition: vertex.h:615
const PositionSamplingRecord & getPositionSamplingRecord() const
Return the position sampling record associated with this node (const)
Definition: vertex.h:682
ETransportMode
Specifies the transport mode when sampling or evaluating a scattering function.
Definition: common.h:33
const AbstractEmitter * getAbstractEmitter() const
Return the abstract emitter associated with a sensor/emitter sample.
Definition: vertex.h:722
uint16_t componentType
When the current vertex supports sampling from several components (this currently only applies to BSD...
Definition: vertex.h:142
bool isNullInteraction() const
Returns whether or not this vertex describes a "null" scattering interaction.
Definition: vertex.h:595