RenderMan  26.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RixLighting2.h
Go to the documentation of this file.
1 /*
2 ** Copyright (c) Pixar. All rights reserved. This program or
3 ** documentation contains proprietary confidential information and trade
4 ** secrets of PIXAR. Reverse engineering of object code is prohibited.
5 ** Use of copyright notice is precautionary and does not imply
6 ** publication.
7 **
8 ** RESTRICTED RIGHTS NOTICE
9 **
10 ** Use, duplication, or disclosure by the Government is subject to the
11 ** following restrictions: For civilian agencies, subparagraphs (a) through
12 ** (d) of the Commercial Computer Software--Restricted Rights clause at
13 ** 52.227-19 of the FAR; and, for units of the Department of Defense, DoD
14 ** Supplement to the FAR, clause 52.227-7013 (c)(1)(ii), Rights in
15 ** Technical Data and Computer Software.
16 **
17 ** Pixar Animation Studios
18 ** 1200 Park Ave
19 ** Emeryville, CA 94608
20 */
21 
22 #ifndef RixLighting2_h
23 #define RixLighting2_h
24 
25 #include "RixLighting.h"
26 
27 class RixLightContext;
28 class RixLightFilter;
30 
31 /*
32  * RixLightingServices2 __NOT PUBLIC__
33  *
34  * This is a shim to allow a kludge that will be removed in the future.
35  *
36  * This shim is here to provide the studio a working entry-point for getting
37  * back the current active set of lights. This is a short time frame change
38  * that is to be removed once a more general API has been worked out for
39  * providing plug-ins for the lighting services. Use at your own peril,
40  * not for public consumption.
41  */
43 {
44 public:
46 
47  virtual void GetAllLights(const RixLight*** lights, int* numLights) = 0;
48 
49  virtual void GetActiveLights(const RixLight*** activeLights, int* numActiveLights) = 0;
50  virtual void GetActiveLights(int** activeLightNumbers, int* numActiveLights) = 0;
51  virtual void GetActiveLights(
52  const RixLight*** activeLights, int** activeLightNumbers, int* numActiveLights) = 0;
53 
54  virtual bool GetLightFilter(
55  int lightIndex, // into active lights
56  RixLightFilterContext const** lfCtx,
57  RixLightFilter** filter,
58  void const** instance) = 0;
59 
60  virtual bool HasAnyLightFilter(int lightIndex) = 0;
61 
62  virtual int GetLightNumber(RixLight* light) = 0;
63  virtual int GetLightNumber(int lightIndex) = 0;
64  virtual float GetLightAreaScale(int lightIndex) = 0;
65 
66  virtual RixLPEToken GetCurrentLpeToken(int lightIndex) = 0;
67 
68  virtual void BeginSampling(
69  int nSamples,
70  RixRNG* rng // random number generator the light should use
71  ) = 0;
72 
73  virtual void GetLightCtx(
74  int lightIndex, // into active lights
75  int pointIndex, // point in the shading context, for indexing into integrator ctx time array
76  int sampleIndex,
77  RixLightContext const** lCtx,
78  bool allLights = false) = 0;
79 
80 
81  // Bidir methods
82  virtual void BeginEmissionSampling(
83  int nPoints,
84  int nSamples,
85  int const* integratorCtxIds,
86  RixPhotonGuiding const* photonGuiding,
87  RixRNG* rng // random number generator the light should use
88  ) = 0;
89 
90  virtual void BeginPhoton(RixShadingContext const* shdCtx) = 0;
91 
92 protected:
93  virtual ~RixLightingServices2() {}
94 };
95 
96 
97 
98 #endif /* RixLighting2_h */