RenderMan API  23.0
RixDisplayFilter.h
Go to the documentation of this file.
1 /*
2 # ------------------------------------------------------------------------------
3 #
4 # Copyright (c) 1986-2019 Pixar. All rights reserved.
5 #
6 # The information in this file (the "Software") is provided for the exclusive
7 # use of the software licensees of Pixar ("Licensees"). Licensees have the
8 # right to incorporate the Software into other products for use by other
9 # authorized software licensees of Pixar, without fee. Except as expressly
10 # permitted herein, the Software may not be disclosed to third parties, copied
11 # or duplicated in any form, in whole or in part, without the prior written
12 # permission of Pixar.
13 #
14 # The copyright notices in the Software and this entire statement, including the
15 # above license grant, this restriction and the following disclaimer, must be
16 # included in all copies of the Software, in whole or in part, and all permitted
17 # derivative works of the Software, unless such copies or derivative works are
18 # solely in the form of machine-executable object code generated by a source
19 # language processor.
20 #
21 # PIXAR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
22 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL PIXAR BE
23 # LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
24 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
25 # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
26 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. IN NO CASE WILL
27 # PIXAR'S TOTAL LIABILITY FOR ALL DAMAGES ARISING OUT OF OR IN CONNECTION WITH
28 # THE USE OR PERFORMANCE OF THIS SOFTWARE EXCEED $50.
29 #
30 # Pixar
31 # 1200 Park Ave
32 # Emeryville CA 94608
33 #
34 # ------------------------------------------------------------------------------
35 */
36 
37 
38 #ifndef RixDisplayFilter_h
39 #define RixDisplayFilter_h
40 
41 #include "RixIntegrator.h" // for RixChannelId
42 #include "RixInterfaces.h" // for RixContext
43 #include "RixShading.h" // for RixShadingPlugin, etc
44 #include "prmanapi.h" // for PRMANEXPORT
45 #include "ri.h" // for RtConstPointer, RtColorRGB
46 
48 
54 
56 {
57 public:
58  virtual int GetInterface() const override { return k_RixDisplayFilter; }
59 
64 
65  virtual void Filter(
67  RtPointer instanceData) = 0;
68 
69 protected:
71  virtual ~RixDisplayFilter() {}
72 };
73 
74 // clang-format off
75 #define RIX_DISPLAYFILTERCREATE \
76  extern "C" PRMANEXPORT RixDisplayFilter* CreateRixDisplayFilter(RtConstString hint)
77 
78 #define RIX_DISPLAYFILTERDESTROY \
79  extern "C" PRMANEXPORT void DestroyRixDisplayFilter(RixDisplayFilter* filter)
80 // clang-format on
81 
83 {
84 public:
87 
88  int xmin;
89  int xmax;
90  int ymin;
91  int ymax;
92 
96 
97  virtual bool Read(RixChannelId id, int x, int y, RtColorRGB &value) const = 0;
98  virtual bool Read(RixChannelId id, int x, int y, float &value) const = 0;
99  virtual bool Read(RixChannelId id, int x, int y, int &value) const = 0;
100 
101  virtual bool Write(RixChannelId id, int x, int y, RtColorRGB value) = 0;
102  virtual bool Write(RixChannelId id, int x, int y, float value) = 0;
103  virtual bool Write(RixChannelId id, int x, int y, int value) = 0;
104 
111 
112  virtual bool ReadRegion(RixChannelId id,
113  int regionMinX, int regionMaxX,
114  int regionMinY, int regionMaxY,
115  RtColorRGB *values) const = 0;
116  virtual bool ReadRegion(RixChannelId id,
117  int regionMinX, int regionMaxX,
118  int regionMinY, int regionMaxY,
119  float *values) const = 0;
120 
123 
124  virtual bool IsEnabled(
125  RtConstPointer instance,
126  RtPointer* instanceData) const = 0;
127 
128 protected:
131 };
132 
133 #endif
pxrcore::ColorRGB RtColorRGB
void * RtPointer
Definition: ri.h:69
virtual int GetInterface() const override
virtual ~RixDisplayFilter()
#define k_RixShadingVersion
Definition: RixShading.h:97
void const * RtConstPointer
Definition: ri.h:86
virtual void Filter(RixDisplayFilterContext &fCtx, RtPointer instanceData)=0
unsigned int RixChannelId
Definition: RixIntegrator.h:55