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 terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 
8 /// \file usdImagingGL/renderParams.h
9 
10 #ifndef PXR_USD_IMAGING_USD_IMAGING_GL_RENDER_PARAMS_H
11 #define PXR_USD_IMAGING_USD_IMAGING_GL_RENDER_PARAMS_H
12 
13 #include "pxr/pxr.h"
15 
16 #include "pxr/usd/usd/timeCode.h"
17 
18 #include "pxr/base/gf/bbox3d.h"
19 #include "pxr/base/gf/vec2i.h"
20 #include "pxr/base/gf/vec4d.h"
21 #include "pxr/base/gf/vec4f.h"
22 #include "pxr/base/tf/token.h"
23 
25 
27 {
36 };
37 
38 // Note: some assumptions are made about the order of these enums, so please
39 // be careful when updating them.
41 {
47 
49 };
50 
51 
52 /// \class UsdImagingGLRenderParams
53 ///
54 /// Used as an arguments class for various methods in UsdImagingGLEngine.
55 ///
57 {
58 public:
59 
60  using ClipPlanesVector = std::vector<GfVec4d>;
61  using BBoxVector = std::vector<GfBBox3d>;
62 
64  float complexity;
66  bool showGuides;
67  bool showProxy;
68  bool showRender;
76  bool highlight;
79  float alphaThreshold; // threshold < 0 implies automatic
83  // Respect USD's model:drawMode attribute...
87  // Optional OCIO color setings, only valid when colorCorrectionMode==HdxColorCorrectionTokens->openColorIO
93  // BBox settings
97 
98  inline UsdImagingGLRenderParams();
99 
100  inline bool operator==(const UsdImagingGLRenderParams &other) const;
101 
102  inline bool operator!=(const UsdImagingGLRenderParams &other) const {
103  return !(*this == other);
104  }
105 };
106 
107 
109  frame(UsdTimeCode::EarliestTime()),
110  complexity(1.0),
112  showGuides(false),
113  showProxy(true),
114  showRender(false),
115  forceRefresh(false),
116  flipFrontFacing(false),
118  enableLighting(true),
119  enableSampleAlphaToCoverage(false),
120  applyRenderState(true),
121  gammaCorrectColors(true),
122  highlight(false),
123  overrideColor(.0f, .0f, .0f, .0f),
124  wireframeColor(.0f, .0f, .0f, .0f),
125  alphaThreshold(-1),
126  clipPlanes(),
127  enableSceneMaterials(true),
128  enableSceneLights(true),
129  enableUsdDrawModes(true),
130  clearColor(0,0,0,1),
131  lut3dSizeOCIO(65),
132  bboxLineColor(1),
133  bboxLineDashSize(3)
134 {
135 }
136 
137 bool
139  const
140 {
141  return frame == other.frame
142  && complexity == other.complexity
143  && drawMode == other.drawMode
144  && showGuides == other.showGuides
145  && showProxy == other.showProxy
146  && showRender == other.showRender
147  && forceRefresh == other.forceRefresh
148  && flipFrontFacing == other.flipFrontFacing
149  && cullStyle == other.cullStyle
150  && enableLighting == other.enableLighting
154  && highlight == other.highlight
155  && overrideColor == other.overrideColor
156  && wireframeColor == other.wireframeColor
157  && alphaThreshold == other.alphaThreshold
158  && clipPlanes == other.clipPlanes
162  && clearColor == other.clearColor
164  && ocioDisplay == other.ocioDisplay
165  && ocioView == other.ocioView
166  && ocioColorSpace == other.ocioColorSpace
167  && ocioLook == other.ocioLook
168  && lut3dSizeOCIO == other.lut3dSizeOCIO
169  && bboxes == other.bboxes
170  && bboxLineColor == other.bboxLineColor
172 }
173 
175 
176 #endif // PXR_USD_IMAGING_USD_IMAGING_GL_RENDER_PARAMS_H
UsdImagingGLDrawMode drawMode
Definition: renderParams.h:65
bool operator==(const UsdImagingGLRenderParams &other) const
Definition: renderParams.h:138
GLfloat f
Definition: glcorearb.h:1926
Definition: token.h:70
UsdImagingGLCullStyle
Definition: renderParams.h:40
std::vector< GfVec4d > ClipPlanesVector
Definition: renderParams.h:60
UsdImagingGLDrawMode
Definition: renderParams.h:26
Definition: vec4f.h:45
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
std::vector< GfBBox3d > BBoxVector
Definition: renderParams.h:61
UsdImagingGLCullStyle cullStyle
Definition: renderParams.h:71
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
bool operator!=(const UsdImagingGLRenderParams &other) const
Definition: renderParams.h:102
ClipPlanesVector clipPlanes
Definition: renderParams.h:80