Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
emitter.h
Go to the documentation of this file.
1 /*
2  This file is part of Mitsuba, a physically based rendering system.
3 
4  Copyright (c) 2007-2014 by Wenzel Jakob and others.
5 
6  Mitsuba is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License Version 3
8  as published by the Free Software Foundation.
9 
10  Mitsuba is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #pragma once
20 #if !defined(__MITSUBA_RENDER_EMITTER_H_)
21 #define __MITSUBA_RENDER_EMITTER_H_
22 
23 #include <mitsuba/render/common.h>
24 #include <mitsuba/core/track.h>
26 #include <mitsuba/core/cobject.h>
27 #include <mitsuba/render/shader.h>
28 
30 
31 /**
32  * \brief Abstract radiance/importance emitter interface
33  *
34  * This class implements an abstract interface to all emitters in Mitsuba. The
35  * term emitter is interpreted in a loose bidirectional sense here, where
36  * luminaires and sensors are both considered to be emitters of radiance and
37  * importance, respectively.
38  *
39  * Subclasses must implement functions for evaluating and sampling the
40  * emission profile and furthermore support querying the probability density
41  * of the provided sampling technique.
42  *
43  * Subclasses must also provide a specialized \a direct sampling method
44  * (a generalization of direct illumination sampling to both emitters \a and
45  * sensors). A direct sampling is given an arbitrary input position in the
46  * scene and in turn returns a sampled emitter position and direction, which
47  * has a nonzero contribution towards the provided position. The main idea is
48  * that direct sampling reduces the underlying space from 4D to 2D, hence it
49  * is often possible to use smarter sampling techniques than in the fully
50  * general case.
51  *
52  * Since the emission profile is defined as function over both positions
53  * and directions, there are functions to sample and query \a each of the
54  * two components separately. Furthermore, there is a convenience function
55  * to sample both at the same time, which is mainly used by unidirectional
56  * rendering algorithms that do not need this level of flexibility.
57  *
58  * One underlying assumption of this interface is that position and
59  * direction sampling will happen <em>in sequence</em>. This means that
60  * the direction sampling step is allowed to statistically condition on
61  * properties of the preceding position sampling step.
62  *
63  * When rendering scenes involving participating media, it is important
64  * to know what medium surrounds the sensors and light sources. For
65  * this reason, every emitter instance keeps a reference to a medium
66  * (or \c NULL when it is surrounded by vacuum).
67  *
68  * \ingroup librender
69  */
71 public:
72  /**
73  * \brief Flags used to classify the emission profile of
74  * different types of emitters
75  */
76  enum EEmitterType {
77  /// Emission profile contains a Dirac delta term with respect to direction
78  EDeltaDirection = 0x01,
79 
80  /// Emission profile contains a Dirac delta term with respect to position
81  EDeltaPosition = 0x02,
82 
83  /// Is the emitter associated with a surface in the scene?
84  EOnSurface = 0x04
85  };
86 
87  // =============================================================
88  //! @{ \name Sampling interface
89  // =============================================================
90 
91  /**
92  * \brief Importance sample the spatial component of the
93  * emission profile.
94  *
95  * This function takes an uniformly distributed 2D vector
96  * and maps it to a position on the surface of the emitter.
97  *
98  * Some implementations may choose to implement extra functionality
99  * based on the value of \c extra: for instance, Sensors
100  * (which are a subclass of \ref AbstractEmitter) perform uniform
101  * sampling over the entire image plane if <tt>extra == NULL</tt>,
102  * but other values, they will restrict sampling to a pixel-sized
103  * rectangle with that offset.
104  *
105  * The default implementation throws an exception.
106  *
107  * \param pRec
108  * A position record to be populated with the sampled
109  * position and related information
110  *
111  * \param sample
112  * A uniformly distributed 2D vector (or any value,
113  * when \ref needsPositionSample() == \c false)
114  *
115  * \param extra
116  * An additional 2D vector provided to the sampling
117  * routine -- its use is implementation-dependent.
118  *
119  * \return
120  * An importance weight associated with the sampled position.
121  * This accounts for the difference between the spatial part of the
122  * emission profile and the density function.
123  */
124  virtual Spectrum samplePosition(PositionSamplingRecord &pRec,
125  const Point2 &sample, const Point2 *extra = NULL) const;
126 
127  /**
128  * \brief Conditioned on the spatial component, importance
129  * sample the directional part of the emission profile.
130  *
131  * Some implementations may choose to implement extra functionality
132  * based on the value of \c extra: for instance, Sensors
133  * (which are a subclass of \ref AbstractEmitter) perform uniform
134  * sampling over the entire image plane if <tt>extra == NULL</tt>,
135  * but other values, they will restrict sampling to a pixel-sized
136  * rectangle with that offset.
137  *
138  * The default implementation throws an exception.
139  *
140  * \param dRec
141  * A direction record to be populated with the sampled
142  * direction and related information
143  *
144  * \param pRec
145  * A position record generated by a preceding call
146  * to \ref samplePosition()
147  *
148  * \param sample
149  * A uniformly distributed 2D vector (or any value
150  * when \ref needsDirectionSample() == \c false)
151  *
152  * \return
153  * An importance weight associated with the sampled direction.
154  * This accounts for the difference between the directional part of the
155  * emission profile and the density function.
156  */
157  virtual Spectrum sampleDirection(
160  const Point2 &sample,
161  const Point2 *extra = NULL) const;
162 
163  /**
164  * \brief \a Direct sampling: given a reference point in the
165  * scene, sample an emitter position that contributes towards it.
166  *
167  * Given an arbitrary reference point in the scene, this method
168  * samples a position on the emitter that has a nonzero contribution
169  * towards that point.
170  * This can be seen as a generalization of direct illumination sampling
171  * so that it works on both luminaires and sensors.
172  *
173  * Ideally, the implementation should importance sample the product of
174  * the emission profile and the geometry term between the reference point
175  * and the position on the emitter.
176  *
177  * The default implementation throws an exception.
178  *
179  * \param dRec
180  * A direct sampling record that specifies the reference point and
181  * a time value. After the function terminates, it will be
182  * populated with the position sample and related information
183  *
184  * \param sample
185  * A uniformly distributed 2D vector (or any value
186  * when \ref needsDirectSample() == \c false)
187  *
188  * \return
189  * An importance weight associated with the sample. Includes
190  * any geometric terms between the emitter and the reference point.
191  */
192  virtual Spectrum sampleDirect(DirectSamplingRecord &dRec,
193  const Point2 &sample) const;
194 
195  //! @}
196  // =============================================================
197 
198  // =============================================================
199  //! @{ \name Query functions for the emission profile and
200  //! sampling density functions
201  // =============================================================
202 
203  /**
204  * \brief Evaluate the spatial component of the emission profile
205  *
206  * \param pRec
207  * A position sampling record, which specifies the query location
208  *
209  * \return The component of the emission profile that depends on
210  * the position (i.e. emitted power per unit area for luminaires and
211  * sensor response, or inverse power per unit area for sensors)
212  */
213  virtual Spectrum evalPosition(const PositionSamplingRecord &pRec) const;
214 
215  /**
216  * \brief Evaluate the directional component of the emission profile
217  *
218  * When querying a smooth (i.e. non-degenerate) component, it already
219  * multiplies the result by the cosine foreshortening factor with
220  * respect to the outgoing direction.
221  *
222  * \param dRec
223  * A direction sampling record, which specifies the query direction
224  *
225  * \param pRec
226  * A position sampling record, which specifies the query position
227  *
228  * \return The component of the emission profile that depends on
229  * the direction (having units of 1/steradian)
230  */
231 
232  virtual Spectrum evalDirection(const DirectionSamplingRecord &dRec,
233  const PositionSamplingRecord &pRec) const;
234 
235  /**
236  * \brief Evaluate the spatial component of the sampling density
237  * implemented by the \ref samplePosition() method
238  *
239  * \param pRec
240  * A position sampling record, which specifies the query location
241  *
242  * \return
243  * The area density at the supplied position
244  */
245  virtual Float pdfPosition(const PositionSamplingRecord &pRec) const;
246 
247  /**
248  * \brief Evaluate the directional component of the sampling density
249  * implemented by the \ref sampleDirection() method
250  *
251  * \param dRec
252  * A direction sampling record, which specifies the query direction
253  *
254  * \param pRec
255  * A position sampling record, which specifies the query position
256  *
257  * \return
258  * The directional density at the supplied position
259  */
260 
261  virtual Float pdfDirection(const DirectionSamplingRecord &dRec,
262  const PositionSamplingRecord &pRec) const;
263 
264  /**
265  * \brief Evaluate the probability density of the \a direct sampling
266  * method implemented by the \ref sampleDirect() method.
267  *
268  * \param dRec
269  * A direct sampling record, which specifies the query
270  * location. Note that this record need not be completely
271  * filled out. The important fields are \c p, \c n, \c ref,
272  * \c dist, \c d, \c measure, and \c uv.
273  *
274  * \return
275  * The density expressed with respect to the requested measure
276  * (usually \ref ESolidAngle)
277  */
278  virtual Float pdfDirect(const DirectSamplingRecord &dRec) const;
279 
280  //! @}
281  // =============================================================
282 
283  // =============================================================
284  //! @{ \name Other query functions
285  // =============================================================
286 
287  /**
288  * \brief Return a listing of classification flags combined
289  * using binary OR.
290  *
291  * \sa EEmitterType
292  */
293  inline uint32_t getType() const { return m_type; }
294 
295  /// Return the local space to world space transformation
296  inline const AnimatedTransform *getWorldTransform() const
297  { return m_worldTransform.get(); }
298 
299  /// Set the local space to world space transformation
301  { m_worldTransform = trafo; }
302 
303  /**
304  * \brief Does the method \ref samplePosition() require a uniformly
305  * distributed sample for the spatial component?
306  */
307  inline bool needsPositionSample() const { return !(m_type & EDeltaPosition); }
308 
309  /**
310  * \brief Does the method \ref sampleDirection() require a uniformly
311  * distributed sample for the direction component?
312  */
313  inline bool needsDirectionSample() const { return !(m_type & EDeltaDirection); }
314 
315  /**
316  * \brief Does the emitter lie on some kind of surface?
317  */
318  inline bool isOnSurface() const { return m_type & EOnSurface; }
319 
320  /**
321  * \brief Does the sensor have a degenerate directional or spatial
322  * distribution?
323  */
324  inline bool isDegenerate() const { return m_type & (EDeltaPosition | EDeltaDirection); }
325 
326  /**
327  * \brief Does the method \ref sampleDirect() require a uniformly
328  * distributed sample?
329  *
330  * Since sampleDirect() essentially causes a 2D reduction of the
331  * sampling domain, this is the case exactly when the original
332  * domain was four-dimensionsional.
333  */
334  inline bool needsDirectSample() const {
335  return needsPositionSample() && needsDirectionSample();
336  }
337 
338  /**
339  * \brief Return the measure associated with the \ref sampleDirect()
340  * operation
341  */
342  inline EMeasure getDirectMeasure() const {
343  return needsDirectSample() ? ESolidAngle : EDiscrete;
344  }
345 
346  //! @}
347  // =============================================================
348 
349  // =============================================================
350  //! @{ \name Miscellaneous
351  // =============================================================
352 
353  /// Return a pointer to the medium that surrounds the emitter
354  inline Medium *getMedium() { return m_medium; }
355 
356  /// Return a pointer to the medium that surrounds the emitter (const version)
357  inline const Medium *getMedium() const { return m_medium.get(); }
358 
359  /// Return the shape, to which the emitter is currently attached
360  inline Shape *getShape() { return m_shape; }
361 
362  /// Return the shape, to which the emitter is currently attached (const version)
363  inline const Shape *getShape() const { return m_shape; }
364 
365  /**
366  * \brief Create a special shape that represents the emitter
367  *
368  * Some types of emitters are inherently associated with a surface, yet
369  * this surface is not explicitly needed for many kinds of rendering
370  * algorithms.
371  *
372  * An example would be an environment map, where the associated shape
373  * is a sphere surrounding the scene. Another example would be a
374  * perspective camera with depth of field, where the associated shape
375  * is a disk representing the aperture (remember that this class
376  * represents emitters in a generalized bidirectional sense, which
377  * includes sensors).
378  *
379  * When this shape is in fact needed by the underlying rendering algorithm,
380  * this function can be called to create it. The default implementation
381  * simply returns \c NULL.
382  *
383  * \param scene
384  * A pointer to the associated scene (the created shape is
385  * allowed to depend on it)
386  */
387  virtual ref<Shape> createShape(const Scene *scene);
388 
389  /**
390  * \brief Return an axis-aligned box bounding the spatial
391  * extents of the emitter
392  */
393  virtual AABB getAABB() const = 0;
394 
395  /// Set the medium that surrounds the emitter
396  inline void setMedium(Medium *medium) { m_medium = medium; }
397 
398  /// Serialize this emitter to a binary data stream
399  virtual void serialize(Stream *stream, InstanceManager *manager) const;
400 
401  //! @}
402  // =============================================================
403 
404  // =============================================================
405  //! @{ \name ConfigurableObject interface
406  // =============================================================
407 
408  /// Add a child ConfigurableObject
409  virtual void addChild(const std::string &name, ConfigurableObject *child);
410 
411  /// Add an unnamed child
412  inline void addChild(ConfigurableObject *child) { addChild("", child); }
413 
414  //! @}
415  // =============================================================
416 
418 protected:
419  /// Construct a new emitter instance
420  AbstractEmitter(const Properties &props);
421 
422  /// Unserialize a emitter instance from a binary data stream
423  AbstractEmitter(Stream *stream, InstanceManager *manager);
424 
425  /// Virtual destructor
426  virtual ~AbstractEmitter();
427 protected:
428  ref<const AnimatedTransform> m_worldTransform;
429  ref<Medium> m_medium;
430  Shape *m_shape;
431  uint32_t m_type;
432 };
433 
434 /**
435  * \brief Abstract radiance emitter interface
436  *
437  * This class provides an abstract interface to all emitter plugins in Mitsuba.
438  * It exposes functions for evaluating and sampling the emission profile, and
439  * it allows querying the probability density of the sampling method.
440  *
441  * \ingroup librender
442  */
443 class MTS_EXPORT_RENDER Emitter : public AbstractEmitter, public HWResource {
444 public:
445  /**
446  * \brief This list of flags is used to additionally characterize
447  * and classify the response functions of different types of sensors
448  *
449  * \sa AbstractEmitter::EEmitterType
450  */
452  /// Is this an environment emitter, such as a HDRI map?
453  EEnvironmentEmitter = 0x010
454  };
455 
456  // =================================================================
457  //! @{ \name Additional emitter-related sampling and query functions
458  // =================================================================
459 
460  /**
461  * \brief Return the radiant emittance for the given surface intersection
462  *
463  * This is function is used when an area light source has been hit by a
464  * ray in a path tracing-style integrator, and it subsequently needs to
465  * be queried for the emitted radiance along the negative ray direction.
466  *
467  * It efficiently computes the product of \ref evalPosition()
468  * and \ref evalDirection() \a divided by the absolute cosine of the
469  * angle between \c d and \c its.shFrame.n.
470  *
471  * This function is provided here as a fast convenience function for
472  * unidirectional rendering techniques. The default implementation
473  * throws an exception, which states that the method is not implemented.
474  *
475  * \param its
476  * An intersect record that specfies the query position
477  * \param d
478  * A unit vector, which specifies the query direction
479  * \return
480  * The radiant emittance
481  */
482  virtual Spectrum eval(const Intersection &its, const Vector &d) const;
483 
484  /**
485  * \brief Importance sample a ray according to the emission profile
486  *
487  * This function combines both steps of choosing a ray origin and
488  * direction value. It does not return any auxiliary sampling
489  * information and is mainly meant to be used by unidirectional
490  * rendering techniques.
491  *
492  *
493  * Note that this function potentially uses a different sampling
494  * strategy compared to the sequence of running \ref sampleArea()
495  * and \ref sampleDirection(). The reason for this is that it may
496  * be possible to switch to a better technique when sampling both
497  * position and direction at the same time.
498  *
499  * \param ray
500  * A ray data structure to be populated with a position
501  * and direction value
502  *
503  * \param spatialSample
504  * Denotes the sample that is used to choose the spatial component
505  *
506  * \param directionalSample
507  * Denotes the sample that is used to choose the directional component
508  *
509  * \param time
510  * Scene time value to be associated with the sample
511  *
512  * \return
513  * An importance weight associated with the sampled ray.
514  * This accounts for the difference between the emission profile
515  * and the sampling density function.
516  */
517  virtual Spectrum sampleRay(Ray &ray,
518  const Point2 &spatialSample,
519  const Point2 &directionalSample,
520  Float time) const;
521 
522  //! @}
523  // =============================================================
524 
525  // =============================================================
526  //! @{ \name Miscellaneous
527  // =============================================================
528 
529  /**
530  * \brief Return the luminaire's sampling weight
531  *
532  * This is used by the luminaire importance sampling
533  * routines in \ref Scene.
534  */
535  inline Float getSamplingWeight() const { return m_samplingWeight; }
536 
537  /**
538  * \brief Return a bitmap representation of the emitter
539  *
540  * Some types of light sources (projection lights, environment maps)
541  * are closely tied to an underlying bitmap data structure. This function
542  * can be used to return this information for various purposes.
543  *
544  * When the class implementing this interface is a bitmap-backed texture,
545  * this function directly returns the underlying bitmap. When it is procedural,
546  * a bitmap version must first be generated. In this case, the parameter
547  * \ref sizeHint is used to control the target size. The default
548  * value <tt>-1, -1</tt> allows the implementation to choose a suitable
549  * size by itself.
550  *
551  * \remark The default implementation throws an exception
552  */
553  virtual ref<Bitmap> getBitmap(const Vector2i &sizeHint = Vector2i(-1, -1)) const;
554 
555  /// Serialize this emitter to a binary data stream
556  virtual void serialize(Stream *stream, InstanceManager *manager) const;
557 
558  //! @}
559  // =============================================================
560 
561  // =============================================================
562  //! @{ \name Functionality related to environment emitters
563  // =============================================================
564 
565  /// Is this an environment emitter? (e.g. an HDRI environment map?)
566  inline bool isEnvironmentEmitter() const { return m_type & EEnvironmentEmitter; }
567 
568  /**
569  * \brief Return the radiant emittance from an environment emitter
570  *
571  * This is function is called by unidirectional rendering techniques
572  * (e.g. a path tracer) when no scene object has been intersected, and
573  * the scene has been determined to contain an environment emitter.
574  *
575  * The default implementation throws an exception.
576  *
577  * \param ray
578  * Specifies the ray direction that should be queried
579  */
580  virtual Spectrum evalEnvironment(const RayDifferential &ray) const;
581 
582  /**
583  * \brief Fill out a data record that can be used to query the direct
584  * illumination sampling density of an environment emitter.
585  *
586  * This is function is mainly called by unidirectional rendering
587  * techniques (e.g. a path tracer) when no scene object has been
588  * intersected, and the (hypothetical) sampling density of the
589  * environment emitter needs to be known by a multiple importance
590  * sampling technique.
591  *
592  * The default implementation throws an exception.
593  *
594  * \param dRec
595  * The direct illumination sampling record to be filled
596  *
597  * \param ray
598  * Specifies the ray direction that should be queried
599  *
600  * \return \c true upon success
601  */
602  virtual bool fillDirectSamplingRecord(
603  DirectSamplingRecord &dRec, const Ray &ray) const;
604 
605  //! @}
606  // =============================================================
607 
608  // =============================================================
609  //! @{ \name Miscellaneous
610  // =============================================================
611 
612  /// Is this a compound emitter consisting of several sub-objects?
613  virtual bool isCompound() const;
614 
615  /**
616  * \brief Return a sub-element of a compound emitter.
617  *
618  * When expanding emitters, the scene will repeatedly call this
619  * function with increasing indices. Returning \a NULL indicates
620  * that no more are available.
621  */
622  virtual Emitter *getElement(size_t index);
623 
624  //! @}
625  // =============================================================
626 
628 protected:
629  /// Construct a new emitter instance
630  Emitter(const Properties &props);
631 
632  /// Unserialize a emitter instance from a binary data stream
633  Emitter(Stream *stream, InstanceManager *manager);
634 
635  /// Virtual destructor
636  virtual ~Emitter();
637 protected:
638  Float m_samplingWeight;
639 };
640 
642 
643 #endif /* __MITSUBA_RENDER_EMITTER_H_ */
TVector2< int > Vector2i
Definition: fwd.h:108
Record for solid-angle based area sampling techniques.
Definition: common.h:238
Shape * getShape()
Return the shape, to which the emitter is currently attached.
Definition: emitter.h:360
Abstract participating medium.
Definition: medium.h:103
Abstract radiance emitter interface.
Definition: emitter.h:443
void setWorldTransform(AnimatedTransform *trafo)
Set the local space to world space transformation.
Definition: emitter.h:300
Generic serializable object, which supports construction from a Properties instance.
Definition: cobject.h:40
Generic sampling record for directions.
Definition: common.h:168
Abstract radiance/importance emitter interface.
Definition: emitter.h:70
Generic sampling record for positions.
Definition: common.h:82
void setMedium(Medium *medium)
Set the medium that surrounds the emitter.
Definition: emitter.h:396
void addChild(ConfigurableObject *child)
Add an unnamed child.
Definition: emitter.h:412
Principal scene data structure.
Definition: scene.h:49
Discrete measure.
Definition: common.h:66
EMeasure getDirectMeasure() const
Return the measure associated with the sampleDirect() operation.
Definition: emitter.h:342
Abstract hardware resource.
Definition: shader.h:39
#define MTS_NAMESPACE_BEGIN
Definition: platform.h:137
Medium * getMedium()
Return a pointer to the medium that surrounds the emitter.
Definition: emitter.h:354
const AnimatedTransform * getWorldTransform() const
Return the local space to world space transformation.
Definition: emitter.h:296
Abstract base class of all shapes.
Definition: shape.h:178
virtual void serialize(Stream *stream, InstanceManager *manager) const
Serialize this object to a binary data stream.
EMeasure
A list of measures that are associated with various sampling methods in Mitsuba.
Definition: common.h:56
bool isEnvironmentEmitter() const
Is this an environment emitter? (e.g. an HDRI environment map?)
Definition: emitter.h:566
Ray differential – enhances the basic ray class with information about the rays of adjacent pixels on...
Definition: ray.h:140
Axis-aligned bounding box data structure in three dimensions.
Definition: aabb.h:437
uint32_t getType() const
Return a listing of classification flags combined using binary OR.
Definition: emitter.h:293
const Medium * getMedium() const
Return a pointer to the medium that surrounds the emitter (const version)
Definition: emitter.h:357
virtual void addChild(const std::string &name, ConfigurableObject *child)
Add a child (default implementation throws an error)
bool needsDirectSample() const
Does the method sampleDirect() require a uniformly distributed sample?
Definition: emitter.h:334
Solid angle measure.
Definition: common.h:60
Abstract seekable stream class.
Definition: stream.h:58
#define MTS_DECLARE_CLASS()
This macro must be used in the initial definition in classes that derive from Object.
Definition: class.h:158
bool isDegenerate() const
Does the sensor have a degenerate directional or spatial distribution?
Definition: emitter.h:324
Definition: fwd.h:99
Reference counting helper.
Definition: ref.h:40
const Shape * getShape() const
Return the shape, to which the emitter is currently attached (const version)
Definition: emitter.h:363
EEmitterFlags
This list of flags is used to additionally characterize and classify the response functions of differ...
Definition: emitter.h:451
Definition: fwd.h:65
Definition: fwd.h:96
EEmitterType
Flags used to classify the emission profile of different types of emitters.
Definition: emitter.h:76
Animated transformation with an underlying keyframe representation.
Definition: track.h:335
Associative parameter map for constructing subclasses of ConfigurableObject.
Definition: properties.h:46
Container for all information related to a surface intersection.
Definition: shape.h:36
Coordinates the serialization and unserialization of object graphs.
Definition: serialization.h:65
#define MTS_EXPORT_RENDER
Definition: platform.h:109
Discrete spectral power distribution based on a number of wavelength bins over the 360-830 nm range...
Definition: spectrum.h:663
bool needsDirectionSample() const
Does the method sampleDirection() require a uniformly distributed sample for the direction component...
Definition: emitter.h:313
Definition: fwd.h:95
bool isOnSurface() const
Does the emitter lie on some kind of surface?
Definition: emitter.h:318
#define MTS_NAMESPACE_END
Definition: platform.h:138
bool needsPositionSample() const
Does the method samplePosition() require a uniformly distributed sample for the spatial component...
Definition: emitter.h:307
Float getSamplingWeight() const
Return the luminaire&#39;s sampling weight.
Definition: emitter.h:535