HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
renderParams.h
Go to the documentation of this file.
1 //
2 // Copyright 2018 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 
25 /// \file usdImagingGL/renderParams.h
26 
27 #ifndef PXR_USD_IMAGING_USD_IMAGING_GL_RENDER_PARAMS_H
28 #define PXR_USD_IMAGING_USD_IMAGING_GL_RENDER_PARAMS_H
29 
30 #include "pxr/pxr.h"
32 
33 #include "pxr/usd/usd/timeCode.h"
34 
35 #include "pxr/base/gf/bbox3d.h"
36 #include "pxr/base/gf/vec2i.h"
37 #include "pxr/base/gf/vec4d.h"
38 #include "pxr/base/gf/vec4f.h"
39 #include "pxr/base/tf/token.h"
40 
42 
44 {
53 };
54 
55 // Note: some assumptions are made about the order of these enums, so please
56 // be careful when updating them.
58 {
64 
66 };
67 
68 
69 /// \class UsdImagingGLRenderParams
70 ///
71 /// Used as an arguments class for various methods in UsdImagingGLEngine.
72 ///
74 {
75 public:
76 
77  using ClipPlanesVector = std::vector<GfVec4d>;
78  using BBoxVector = std::vector<GfBBox3d>;
79 
81  float complexity;
83  bool showGuides;
84  bool showProxy;
85  bool showRender;
94  bool highlight;
97  float alphaThreshold; // threshold < 0 implies automatic
101  // Respect USD's model:drawMode attribute...
105  // Optional OCIO color setings, only valid when colorCorrectionMode==HdxColorCorrectionTokens->openColorIO
111  // BBox settings
115 
116  inline UsdImagingGLRenderParams();
117 
118  inline bool operator==(const UsdImagingGLRenderParams &other) const;
119 
120  inline bool operator!=(const UsdImagingGLRenderParams &other) const {
121  return !(*this == other);
122  }
123 };
124 
125 
127  frame(UsdTimeCode::EarliestTime()),
128  complexity(1.0),
130  showGuides(false),
131  showProxy(true),
132  showRender(false),
133  forceRefresh(false),
134  flipFrontFacing(false),
136  enableIdRender(false),
137  enableLighting(true),
138  enableSampleAlphaToCoverage(false),
139  applyRenderState(true),
140  gammaCorrectColors(true),
141  highlight(false),
142  overrideColor(.0f, .0f, .0f, .0f),
143  wireframeColor(.0f, .0f, .0f, .0f),
144  alphaThreshold(-1),
145  clipPlanes(),
146  enableSceneMaterials(true),
147  enableSceneLights(true),
148  enableUsdDrawModes(true),
149  clearColor(0,0,0,1),
150  lut3dSizeOCIO(65),
151  bboxLineColor(1),
152  bboxLineDashSize(3)
153 {
154 }
155 
156 bool
158  const
159 {
160  return frame == other.frame
161  && complexity == other.complexity
162  && drawMode == other.drawMode
163  && showGuides == other.showGuides
164  && showProxy == other.showProxy
165  && showRender == other.showRender
166  && forceRefresh == other.forceRefresh
167  && flipFrontFacing == other.flipFrontFacing
168  && cullStyle == other.cullStyle
169  && enableIdRender == other.enableIdRender
170  && enableLighting == other.enableLighting
174  && highlight == other.highlight
175  && overrideColor == other.overrideColor
176  && wireframeColor == other.wireframeColor
177  && alphaThreshold == other.alphaThreshold
178  && clipPlanes == other.clipPlanes
182  && clearColor == other.clearColor
184  && ocioDisplay == other.ocioDisplay
185  && ocioView == other.ocioView
186  && ocioColorSpace == other.ocioColorSpace
187  && ocioLook == other.ocioLook
188  && lut3dSizeOCIO == other.lut3dSizeOCIO
189  && bboxes == other.bboxes
190  && bboxLineColor == other.bboxLineColor
192 }
193 
195 
196 #endif // PXR_USD_IMAGING_USD_IMAGING_GL_RENDER_PARAMS_H
UsdImagingGLDrawMode drawMode
Definition: renderParams.h:82
bool operator==(const UsdImagingGLRenderParams &other) const
Definition: renderParams.h:157
GLfloat f
Definition: glcorearb.h:1926
Definition: token.h:87
UsdImagingGLCullStyle
Definition: renderParams.h:57
std::vector< GfVec4d > ClipPlanesVector
Definition: renderParams.h:77
UsdImagingGLDrawMode
Definition: renderParams.h:43
Definition: vec4f.h:62
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1432
std::vector< GfBBox3d > BBoxVector
Definition: renderParams.h:78
UsdImagingGLCullStyle cullStyle
Definition: renderParams.h:88
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
bool operator!=(const UsdImagingGLRenderParams &other) const
Definition: renderParams.h:120
ClipPlanesVector clipPlanes
Definition: renderParams.h:98