HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TIL_CompOptions.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: COP2_CompOptions.h
7  *
8  * COMMENTS:
9  * Holds the global options for the compositor.
10  */
11 #ifndef __TIL_CompOptions_h__
12 #define __TIL_CompOptions_h__
13 
14 #include "TIL_API.h"
15 #include <UT/UT_UniquePtr.h>
16 #include <SYS/SYS_Types.h>
17 
18 class TIL_TileManager;
19 class UT_FileLUT;
21 
23 {
24 public:
26 
27  // Cache
28  static void setCookCacheSize(int size);
29  static int getCookCacheSize();
30 
31  static void setCacheInactiveReduce(int reduce);
32  static int getCacheInactiveReduce();
33 
34  static void setCacheInactiveSize(int size);
35  static int getCacheInactiveSize();
36 
37  static void setPerformanceCaching(int on);
38  static int getPerformanceCaching();
39 
40  static void setResLimit(int x,int y);
41  static void getResLimit(int &x, int &y);
42 
43  // returns the recommended memory usage in kb.
44  static void getRecommendedMemoryUsage(int64 &cook, int64 &disp);
45  static int getRecommendedThreads();
46 
47  // Cooking
48  static void setMultithreadedCooking(int on);
49  static int getMultithreadedCooking();
50 
51  static void setNumCookThreads(int threads);
52  static int getNumCookThreads();
53 
54  static void setUseCollapsableOps(int enable);
55  static int getUseCollapsableOps();
56 
57  static void setUseGPUAssist(bool enable);
58  static bool getUseGPUAssist(bool check_for_hardware_support=true);
59  static bool isGPUAssistInitialized();
60 
61  static void setCookOnStart(int enable);
62  static int getCookOnStart();
63 
64  static void setIncrementalCook(int type);
65  static int getIncrementalCook();
66 
67  static void setIncrementalCookStyle(int type);
68  static int getIncrementalCookStyle();
69 
70  // Proxies.
71  static void setProxyGeneration(int on);
72  static int getProxyGeneration();
73 
74  static void setProxyLimit(int on);
75  static int getProxyLimit();
76 
77  static void setProxyDiskLimit(int size);
78  static int getProxyDiskLimit();
79 
80  static void setProxyDir(const char *dir);
81  static const char *getProxyDir();
82 
83  static void setTileSize(int x, int y);
84  static void getTileSize(int &x, int &y);
85 
86  // Plane names.
87  static void setColorName(const char *n);
88  static const char *getColorName();
89 
90  static void setAlphaName(const char *n);
91  static const char *getAlphaName();
92 
93  static void setMaskName(const char *n);
94  static const char *getMaskName();
95 
96  static void setDepthName(const char *n);
97  static const char *getDepthName();
98 
99  static void setLumName(const char *n);
100  static const char *getLumName();
101 
102  static void setBumpName(const char *n);
103  static const char *getBumpName();
104 
105  static void setPointName(const char *n);
106  static const char *getPointName();
107 
108  static void setNormalName(const char *n);
109  static const char *getNormalName();
110 
111  static void setVelocityName(const char *n);
112  static const char *getVelocityName();
113 
114  // Selectors.
115  static void setSelectorNoOptional(int noopt);
116  static int getSelectorNoOptional();
117 
118  static void setSelectorNoGenInputs(int nogen);
119  static int getSelectorNoGenInputs();
120 
121  static void setSelectorPlaceCurrent(int placecurrent);
122  static int getSelectorPlaceCurrent();
123 
124  static void setSelectorGenNewView(int newview);
125  static int getSelectorGenNewView();
126 
127  // COP2 Colors.
128  static void setUseCop2Coloring(int use);
129  static int getUseCop2Coloring();
130 
131  static void setGeneratorColorEnable(int use);
132  static int getGeneratorColorEnable();
133 
134  static void setGeneratorColor(float r, float g, float b);
135  static void getGeneratorColor(float &r, float &g, float &b);
136 
137  static void setPixelColorEnable(int use);
138  static int getPixelColorEnable();
139 
140  static void setPixelColor(float r, float g, float b);
141  static void getPixelColor(float &r, float &g, float &b);
142 
143  static void setTimingColorEnable(int use);
144  static int getTimingColorEnable();
145 
146  static void setTimingColor(float r, float g, float b);
147  static void getTimingColor(float &r, float &g, float &b);
148 
149  static void setVexColorEnable(int use);
150  static int getVexColorEnable();
151 
152  static void setVexColor(float r, float g, float b);
153  static void getVexColor(float &r, float &g, float &b);
154 
155  // Fast Interactive Cooking.
156  static void setFastInteractive(bool enable);
157  static bool getFastInteractive();
158 
159  static void setFastInteractiveOnSlow(bool enable);
160  static bool getFastInteractiveOnSlow();
161 
162  static void setFastInteractiveQuality(int resdownby);
163  static int getFastInteractiveQuality();
164 
165  static void setFastInteractiveMinSize(int x, int y);
166  static void getFastInteractiveMinSize(int &x, int &y);
167 
168  // Load's o cineon stuff.
169  static void initCineon();
170 
171  // This sets the defaults for building Cineon luts.
172  static void setCineonParms(bool convert, const char *lut,
173  int white, float gamma, int black);
174  static void getCineonParms(bool &convert, const char *&lut,
175  int &white, float &gamma, int &black);
176 
177  // Returns a new LUT based on the passed parms.
178  static UT_FileLUTPtr buildReadLUT(bool convert, const char *lut,
179  int white, float gamma, int black);
180  static UT_FileLUTPtr buildWriteLUT(bool convert, const char *lut,
181  int white, float gamma, int black);
182 
183  // Internal function for building default LUTs (based on the parms set by
184  // setCineonParms).
185  static void buildCineonLUTs(bool read,
186  bool write,
187  UT_FileLUTPtr &rlut,
188  UT_FileLUTPtr &wlut);
189 
190  // The workhorse function for creating luts.
191  static void createCineonLUT(bool convert, const char *lut,
192  int white, float gamma, int iwhite,
193  bool read, bool write,
194  UT_FileLUTPtr &rlut,
195  UT_FileLUTPtr &wlut);
196 
197  static UT_FileLUTPtr defaultLUTcreator(bool dowrite);
198 
199 
200  static TIL_TileManager *getTileManager();
201 
202  static const char *getPrefFileName();
203  static void loadPreferences();
204  static void savePreferences();
205 };
206 
207 #endif
GLboolean GLboolean g
Definition: glcorearb.h:1222
GLint y
Definition: glcorearb.h:103
Tto convert(const Tfrom &source)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
GLdouble n
Definition: glcorearb.h:2008
T reduce(RangeT range, const T &identity, const FuncT &func, const JoinT &join)
Definition: Reduce.h:42
long long int64
Definition: SYS_Types.h:116
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
GLint GLenum GLint x
Definition: glcorearb.h:409
GLsizeiptr size
Definition: glcorearb.h:664
UT_UniquePtr< UT_FileLUT > UT_FileLUTPtr
GLboolean r
Definition: glcorearb.h:1222
type
Definition: core.h:1059
#define TIL_API
Definition: TIL_API.h:10