CFx SDK Documentation  2023 SP0
TrRndRenderSettings.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 // GLES2 device local rendition render settings interface
24 
25 #ifndef ODTRRNDRENDERSETTINGS
26 #define ODTRRNDRENDERSETTINGS
27 
28 #include "TD_PackPush.h"
29 
31 #include "../TrVisDefs.h"
32 #include "../TrVisMetafileStream.h"
33 
34 // Forward declarations
35 class OdGsFiler;
36 struct OdTrVisViewportDef;
37 
42 
47 
52 
57 {
58  public:
59  virtual void renderSettingsChanged(OdTrRndRenderSettings *pRSets) = 0;
60 };
61 
63 {
66  kRSCallReactor = 1
67 };
68 
73 {
74  protected:
75  template <OdUInt32 nElems>
76  class BitSet {
77  protected:
78  OdUInt8 m_flags[nElems];
79  public:
81  { clear(); }
82  void clear() { for (OdUInt32 n = 0; n < nElems; n++) m_flags[n] = 0; }
83  OdUInt8 *getPtr() { return m_flags; } const OdUInt8 *getPtr() const { return m_flags; }
84  void set(OdUInt32 nFlag) { SETBIT_1(m_flags[nFlag >> 3], 1 << (nFlag & 7)); }
85  void reset(OdUInt32 nFlag) { SETBIT_0(m_flags[nFlag >> 3], 1 << (nFlag & 7)); }
86  void set(OdUInt32 nFlag, bool bSet) { SETBIT(m_flags[nFlag >> 3], 1 << (nFlag & 7), bSet); }
87  bool get(OdUInt32 nFlag) const { return GETBIT(m_flags[nFlag >> 3], 1 << (nFlag & 7)); }
88  };
89  public:
90  enum DrawFlags
91  {
92  kNullFlag = 0,
93  // Elements rendering
94  kDraw3dFacets, // Draw shaded facets
95  kDraw2dFacets, // Draw non-shaded facets
96  kDrawRasterImages, // Draw raster images
97  kDraw3dFacetEdges, // Draw shaded facets wireframe
98  kDraw2dFacetEdges, // Draw non-shaded facets wireframe
99  kDrawIsolines, // Draw isolines
100  kDrawIntersections, // Draw intersection edges
101  kDrawSilhouettes, // Draw silhouettes
102  kDrawDefaultDisable, // Disable rendering of default elements
103  // Display quality settings
104  kDrawOrder, // Draw order enabled
105  kDrawBackground, // Draw backgrounds enabled
106  kDrawLineweights, // Draw lineweights
107  kDrawLighting, // Draw lighting
108  // Face quality settings
109  kDrawMaterials, // Draw materials
110  kDrawTextures, // Draw textures
111  kFillFacesColor, // Use color to fill faces
112  kFillFacesOpacity, // Override faces opacity
113  kFaceNormals, // Use face normals instead vertex normals
114  kPerVertexLighting, // Use per-vertex lighting instead of per-pixel lighting
115  kGoochLighting, // Enable Gooch faces lighting instead of Phong
116  kSpecularHighlighting, // Enable specular highlighting
117  kShadingMaterial, // Use shading material intead of realistic material
118  // Edge quality settings
119  kOverrideEdgesColor, // Use edges color override
120  kOverrideEdgesWidth, // Use edges width override
121  kOverrideEdgesLinetype, // Use edges linetype override
122  kEdgesOpacity, // Use edges opacity
123  kEdgesCreaseFilter, // Use edges crease angle filtration
124  kEdgesCreaseFilter3d, // Use separate crease angle filtration for 3d object (active only if kEdgesCreaseFilter enabled)
125  kEdgesOverhang, // Use edges extension
126  kEdgesMultipass, // Draw edges multiple times
127  kEdgesJitter, // Use edges jitter effect
128  // FX-related
129  kDrawFX, // True in case if render settings represent effect rendering
130  kDisableColorOutput, // Disable color output for FX rendering
131  kStencilTest, // Modifies stencil buffer processing behavior
132  kStencil3dTest, // Use separate stencil buffer setting for 3d objects (active only if kStencilTest enabled)
133  kDepthTest, // Modifies depth buffer processing behavior
134  kDepth3dTest, // Use separate depth buffer setting for 3d objects (active only if kDepthTest enabled)
135  // Last flag (do not modify manually)
137  kNumFlagRegs = (kNumFlags >> 3) + 1
138  };
139  // Settings for render modes
140 #define OdTrRndRS_SetFor2dWireframe { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, kDraw2dFacetEdges, kDrawIsolines, \
141  kDrawOrder, kDrawBackground, kDrawLineweights, \
142  kNullFlag }
143 #define OdTrRndRS_SetFor3dWireframe { kDraw2dFacets, kDraw2dFacetEdges, kDrawRasterImages, kDrawIsolines, \
144  kDrawBackground, kDrawLineweights, \
145  kNullFlag }
146 #define OdTrRndRS_SetForHiddenLine { kDraw3dFacets, kDrawRasterImages, kDraw3dFacetEdges, kDraw2dFacetEdges, \
147  kDrawBackground, kDrawLineweights, \
148  kFillFacesColor, \
149  kNullFlag }
150 #define OdTrRndRS_SetForFlatShaded { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, \
151  kDrawBackground, kDrawLineweights, kDrawLighting, \
152  kDrawMaterials, kDrawTextures, kFaceNormals, kPerVertexLighting, kSpecularHighlighting, \
153  kNullFlag }
154 #define OdTrRndRS_SetForGouraudShaded { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, \
155  kDrawBackground, kDrawLineweights, kDrawLighting, \
156  kDrawMaterials, kDrawTextures, kPerVertexLighting, kSpecularHighlighting, \
157  kNullFlag }
158 #define OdTrRndRS_SetForFlatShadedWithWireframe { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, kDraw3dFacetEdges, kDraw2dFacetEdges, \
159  kDrawBackground, kDrawLineweights, kDrawLighting, \
160  kDrawMaterials, kDrawTextures, kFaceNormals, kPerVertexLighting, kSpecularHighlighting, \
161  kNullFlag }
162 #define OdTrRndRS_SetForGouraudShadedWithWireframe { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, kDraw3dFacetEdges, kDraw2dFacetEdges, \
163  kDrawBackground, kDrawLineweights, kDrawLighting, \
164  kDrawMaterials, kDrawTextures, kPerVertexLighting, kSpecularHighlighting, \
165  kNullFlag }
166 #define OdTrRndRS_FX { kDrawFX, kNullFlag }
168  {
174  };
175  struct Color
176  {
179  Color(ColorType colorType = kColorBackground, ODCOLORREF colorVal = ODRGBA(0, 0, 0, 255))
180  : m_colorType(colorType), m_colorVal(colorVal) { }
181  };
182  // Draw properties
184  {
185  // Viewport (global)
186  kPropBackgroundColor = 0, // Background viewport color
187  kPropForegroundColor, // Foreground viewport color
188  // Faces
189  kPropFacesFillColor, // Faces fill color override
190  // Edges
191  kPropEdgesColor, // Edges color override
192  // FX-related
193  // . . .
194  // Number of color properties
196  };
198  {
199  // Faces
200  kPropFacesSpecularPower = 0, // Material specilar power coefficient
201  kPropFacesOpacity, // Faces opacity override
202  // Edges
203  kPropEdgesCreaseAngle, // Edge crease filtration angle
205  // FX-related
206  // . . .
207  // Number of floating point properties
209  };
211  {
212  // Viewport (global)
213  kPropDrawFilter = 0, // Inclusive metafiles rendering filter
214  // Faces
215  // . . .
216  // Edges
217  kPropEdgesWidth, // Edges lineweight override (in pixels)
218  kPropEdgesLinetype, // Edges linetype override (using OdPs::LineType enum)
219  kPropEdgesCreaseFilter, // Edges crease filter (using CreaseFlags enum)
220  kPropEdgesCreaseFilter3d, // Separate edges crease filter for 3d objects (using CreaseFlags enum)
221  kPropEdgesOverhang, // Edges extension length (in pixels)
222  kPropEdgesRepetition, // Number of repetitions per edges rendering (applicable for jitter effect only)
223  kPropEdgesJitterAmount, // Jitter effect amount (in pixels)
224  // FX-related
225  kPropStencilFlags, // Stencil buffer flags (using StencilFlags enum)
226  kPropStencil3dFlags, // Separate stencil buffer flags for 3d objects (using StencilFlags enum)
227  kPropDepthFlags, // Depth buffer flags (using DepthFlags enum)
228  kPropDepth3dFlags, // Separate depth buffer flags for 3d objects (using DepthFlags enum)
229  // Number of integer properties
231  };
232  // Type of multi-pass effect
234  {
239 
241  };
242  // kPropStencilFlags property settings
244  {
245  kStencilWriteBit1 = (1 << 0), kStencilWriteBit2 = (1 << 1), kStencilWriteBit3 = (1 << 2), kStencilWriteBit4 = (1 << 3),
247  kStencilTestBit1 = (1 << 4), kStencilTestBit2 = (1 << 5), kStencilTestBit3 = (1 << 6), kStencilTestBit4 = (1 << 7),
249  kStencilReadBit1 = (1 << 8), kStencilReadBit2 = (1 << 9), kStencilReadBit3 = (1 << 10), kStencilReadBit4 = (1 << 11),
251  };
252  // kPropDepthFlags property settings
254  {
257  kDepthReadOnly = (1 << 4)
258  };
259  // kPropEdgesCreaseFilter property settings
261  {
262  // Most reasonable states:
263  kCreaseFrontEdges = -2, // Completely front edge
264  kCreaseFrontCorners = -1, // Corner edge at front
265  kCreaseBreakEdges = 0, // Break edge (partially at front, partially at back)
266  kCreaseBackCorners = 1, // Corner edge at back
267  kCreaseBackEdges = 2 // Completely back edge
268  };
270  {
271  kCreaseDrawAllEdges = 0x32, // -2, 2 - Draw everything (default)
272  kCreaseDrawFrontEdgesOnly = 0x35, // -2,-1 - Draw front edges only
273  kCreaseDrawFrontEdgesWithCorners = 0x30, // -2, 0 - Draw front edges and front corner edges
274  kCreaseDrawBreakEdgesWithCorners = 0x29, // -1, 1 - Draw break edges and corner edges
275  kCreaseDrawBreakEdgesOnly = 0x00, // 0, 0 - Draw break edges only
276  kCreaseDrawBackEdgesWithCorners = 0x02, // 0, 2 - Draw back edges and back corner edges
277  kCreaseDrawBackEdgesOnly = 0x0A // 1, 2 - Draw back edges only
278  };
279  inline static OdUInt32 creaseFlagEncode(CreaseFlags flags)
280  { return (flags < kCreaseBreakEdges) ? OdUInt32(-flags | 4) : OdUInt32(flags); }
281  inline static CreaseFlags creaseFlagDecode(OdUInt32 flags)
282  { return (CreaseFlags)((GETBIT(flags, 4)) ? -OdInt32(flags & 3) : OdInt32(flags & 3)); }
283  inline static OdUInt32 make_creaseFilter(CreaseFlags frontLimit, CreaseFlags backLimit)
284  { return (creaseFlagEncode(frontLimit) << 3) | creaseFlagEncode(backLimit); }
285  inline static OdUInt32 make_creaseFilter(CreaseFilterDefault defFilter) { return (OdUInt32)defFilter; }
286  inline static CreaseFlags get_creaseFilterFront(OdUInt32 creaseFilter) { return creaseFlagDecode((creaseFilter >> 3) & 7); }
287  inline static CreaseFlags get_creaseFilterBack(OdUInt32 creaseFilter) { return creaseFlagDecode(creaseFilter & 7); }
288  // UI properties grouping
289  enum PropType
290  {
297  };
298  union UIDefVal
299  {
301  struct ColorProp
302  {
307  float m_floatProp;
311  UIDefVal(bool bDrawFlag) { m_colorProp.reset(); m_drawFlag = bDrawFlag; }
312  UIDefVal(ColorType colorType, ODCOLORREF colorVal = ODRGBA(0, 0, 0, 255)) { m_colorProp.m_colorType = colorType; m_colorProp.m_colorVal = colorVal; }
313  UIDefVal(float floatProp) { m_colorProp.reset(); m_floatProp = floatProp; }
314  UIDefVal(OdInt32 intProp) { m_colorProp.reset(); m_intProp = intProp; }
315  UIDefVal(OdUInt32 uintProp) { m_colorProp.reset(); m_uintProp = uintProp; }
316  };
318  {
319  float m_limFlt;
322  UIPropRange() { m_limFlt = 0.0f; }
323  };
325  {
329  UIPropRanges(float fltMin, float fltMax) { m_min.m_limFlt = fltMin; m_max.m_limFlt = fltMax; }
330  UIPropRanges(OdInt32 intMin, OdInt32 intMax) { m_min.m_limInt = intMin; m_max.m_limInt = intMax; }
331  UIPropRanges(OdUInt32 uintMin, OdUInt32 uintMax) { m_min.m_limUInt = uintMin; m_max.m_limUInt = uintMax; }
332  };
333  struct UIPropEntry
334  {
339  const OdChar *m_pName;
342  };
343  protected:
344  enum RSFlags
345  {
346  kRenderModeOverride = (1 << 0), // If set to true render mode settings will be got directly from viewport.
347  kSuppressReactor = (1 << 1), // If set then reactor willn't be called by default for this render settings object.
348  kRSFlagsCopyMask = kRenderModeOverride // Flags which can be copied between render settings.
349  };
350  protected:
351  OdUInt16 m_rsFlags; // Render settings specific flags
352  OdGsView::RenderMode m_renderMode; // Used to set basic parameters.
353  BitSet<kNumFlagRegs> m_nDrawFlags; // Set of bit (draw) flags
354  Color m_colorProps[kNumColorProps]; // Set of color data properties
355  float m_floatProps[kNumFloatProps]; // Set of floating point data properties
356  OdInt32 m_intProps[kNumIntegerProps]; // Set of integer properties
357  // Pointer to next pass for multipass render settings
359  // Differential transition from previous pass
361  // Attached render setting reactors
363  public:
366  , m_renderMode(initialRenderMode)
367  , m_nDrawFlags()
368  {
369  setReactorDefault(rsDefault);
370  setForRenderMode(initialRenderMode, kRSIgnoreReactor);
373  }
375  {
376  *this = rs;
377  }
379  {
380  }
381 
383 
384  // Control rendering settings overriding
385  bool isRenderModeOverride() const
386  {
388  }
390  {
392  react(rsReact);
393  }
394 
395  // Basic rendering mode
397  {
398  return m_renderMode;
399  }
401  {
402  m_renderMode = rMode;
403  react(rsReact);
404  }
405 
406  // Draw flags accessors
407  bool drawFlag(OdUInt32 nFlag) const
408  {
409  return m_nDrawFlags.get(nFlag);
410  }
412  {
413  m_nDrawFlags.set(nFlag);
414  react(rsReact);
415  }
417  {
418  m_nDrawFlags.reset(nFlag);
419  react(rsReact);
420  }
422  {
423  m_nDrawFlags.set(nFlag, bSet);
424  react(rsReact);
425  }
426 
427  // Draw flags array accessors
429  {
430  while (nFlags && *pFlags)
431  setDrawFlag(*pFlags++, kRSIgnoreReactor), nFlags--;
432  react(rsReact);
433  }
435  {
436  while (nFlags && *pFlags)
437  resetDrawFlag(*pFlags++, kRSIgnoreReactor), nFlags--;
438  react(rsReact);
439  }
440 
441  // Clear flags
443  {
445  react(rsReact);
446  }
447 
448  // Draw flags serialization support
450  {
451  return m_nDrawFlags.getPtr();
452  }
454  {
455  return m_nDrawFlags.getPtr();
456  }
457 
458  // Access color properties
459  const Color &color(ColorProps nProp, bool bResolved = true) const
460  {
461  return (!bResolved) ? m_colorProps[nProp] : resolveColor(m_colorProps[nProp]);
462  }
464  {
465  m_colorProps[nProp] = clr;
466  react(rsReact);
467  }
468 
469  // Access floating point properties
470  float value(FloatProps nProp) const
471  {
472  return m_floatProps[nProp];
473  }
474  void setValue(FloatProps nProp, float fVal, OdTrRndRSUpdateReactor rsReact = kRSReactorDefault)
475  {
476  m_floatProps[nProp] = fVal;
477  react(rsReact);
478  }
479 
480  // Access integer properties
482  {
483  return m_intProps[nProp];
484  }
486  {
487  return (OdUInt32)m_intProps[nProp];
488  }
490  {
491  m_intProps[nProp] = nVal;
492  react(rsReact);
493  }
495  {
496  m_intProps[nProp] = (OdInt32)nVal;
497  react(rsReact);
498  }
499 
500  // Multipass render settings
502  {
503  m_pNextPass[passType] = pNextPass;
504  react(rsReact);
505  }
507  {
508  if (!pNextPass)
509  m_pNextPass[passType] = NULL;
510  else
511  m_pNextPass[passType] = new OdTrRndRenderSettings(*pNextPass);
512  react(rsReact);
513  }
516  bool hasNextPass(MultiPassType passType) const
517  {
518  return !m_pNextPass[passType].isNull();
519  }
521  {
522  return m_pNextPass[passType].get();
523  }
525  {
526  return m_pNextPass[passType].get();
527  }
529  {
530  return m_pNextPass[passType];
531  }
533  {
534  return m_pNextPass[passType];
535  }
536 
538  {
539  m_pDifTrans[passType] = pDifTrans;
540  }
542  {
543  return m_pDifTrans[passType];
544  }
546  {
547  m_pDifTrans[passType] = NULL;
548  }
549 
550  // Render settings reactors
554 
555  // Reactor default behavior
559  {
560  react(rsReact);
561  }
562 
563  // Extended functions
567  bool isGeomTypeVisible(OdTrVisGeomType geomType) const;
569 
570  // Some basic properties access
571  // !RenderMode::depthBufferEnabled
572  bool is2dModeEnabled() const
573  {
574  return drawFlag(kDrawOrder);
575  }
576  // RenderMode::stencilBufferEnabled
578  {
579  return drawFlag(kFillFacesColor);
580  }
581  // RenderMode::polygonOffsetEnabled
583  {
585  }
586  // RenderMode::lightingEnabled
587  bool isLightingEnabled_() const
588  {
590  }
591  bool isLightingEnabled() const
592  {
593  return drawFlag(kDrawLighting);
594  }
595  // RenderMode::faceNormalsEnabled
596  bool isFaceNormalsEnabled() const
597  {
598  return drawFlag(kFaceNormals);
599  }
600  // RenderConfig::isForceDefaultLighting
601  bool isDefaultLighting() const
602  {
603  return drawFlag(kGoochLighting);
604  }
605 
606  // Loading/saving ability
607  bool save(OdGsFiler *pFiler) const;
608  bool load(OdGsFiler *pFiler);
609 
610  // Extended properties information
611  static OdUInt32 extendedPropsInfo(const UIPropEntry **ppEntries = NULL);
612  protected:
613  bool loadNextPass(MultiPassType passType, OdGsFiler *pFiler);
614  const Color &resolveColor(const Color &clr) const;
615  void reactImpl();
617  {
618  if ((rsReact == kRSCallReactor) || ((rsReact == kRSReactorDefault) && !GETBIT(m_rsFlags, kSuppressReactor)))
619  reactImpl();
620  }
621 };
622 
623 // Null render settings (applicable as stub for initial render settings switch)
625 
626 inline
628 {
629  switch (geomType)
630  {
647  default: return false;
648  }
649 }
650 
651 inline
653 {
654  switch (clr.m_colorType)
655  {
656  case kColorBackground: return color(kPropBackgroundColor, false);
657  case kColorForeground: return color(kPropForegroundColor, false);
658  default: break;
659  }
660  return clr;
661 }
662 
667 {
668  public:
670  {
671  kRSViewportVisible = (1 << 0),
672  kRSViewportPS = (1 << 1),
673  kRSViewportOverall = (1 << 2),
674  kRSViewportHelper = (1 << 3)
675  };
676  public:
679 
680  virtual OdUInt32 rsNumViewports() const = 0;
681 
682  virtual OdTrVisViewportId rsViewportId(OdUInt32 numViewport) const = 0;
683  virtual OdUInt32 rsViewportFlags(OdUInt32 numViewport) const = 0;
684 
685  virtual void rsViewportSettings(OdUInt32 numViewport, OdTrRndRenderSettingsPtr &rs) const = 0;
687 
688  virtual bool rsIsViewportRenderModeOverride(OdUInt32 numViewport) const = 0;
689  virtual void rsSetViewportRenderModeOverride(OdUInt32 numViewport, bool bOverride) = 0;
690  virtual void rsApplyViewportRenderModeOverride(OdUInt32 numViewport) = 0;
691 };
692 
693 #include "TD_PackPop.h"
694 
695 #endif // ODTRRNDRENDERSETTINGS
#define NULL
Definition: GsProperties.h:177
#define ODCOLORREF
Definition: OdPlatform.h:883
#define ODRGBA(r, g, b, a)
Definition: OdPlatform.h:885
unsigned int OdUInt32
unsigned short OdUInt16
int OdInt32
unsigned char OdUInt8
wchar_t OdChar
#define SETBIT(flags, bit, value)
Definition: OdaDefs.h:499
#define SETBIT_0(flags, bit)
Definition: OdaDefs.h:502
#define GETBIT(flags, bit)
Definition: OdaDefs.h:500
#define SETBIT_1(flags, bit)
Definition: OdaDefs.h:503
OdStaticDefSharedPtr< OdTrRndRenderSettings > OdTrRndRenderSettingsStaticPtr
OdSharedPtr< OdTrRndRenderSettings > OdTrRndRenderSettingsPtr
OdTrRndRenderSettingsStaticPtr kTrRndNullRenderSettings
OdTrRndRSUpdateReactor
@ kRSCallReactor
@ kRSReactorDefault
@ kRSIgnoreReactor
OdTrVisGeomType
@ OdTrVisGeomType_3dFacetsNoFill
@ OdTrVisGeomType_HatchIsolineEdges
@ OdTrVisGeomType_Silhouettes
@ OdTrVisGeomType_2dFacetEdges
@ OdTrVisGeomType_Isolines
@ OdTrVisGeomType_3dFacetEdges
@ OdTrVisGeomType_2dFacets
@ OdTrVisGeomType_FillPatternEdges
@ OdTrVisGeomType_Default
@ OdTrVisGeomType_RasterImageFacets
@ OdTrVisGeomType_2dFacetsNoFill
@ OdTrVisGeomType_EdgesWithIsolines
@ OdTrVisGeomType_3dFacets
@ OdTrVisGeomType_IntersectionEdges
RenderMode
Definition: Gs.h:138
@ k2DOptimized
Definition: Gs.h:140
bool isNull() const
Definition: SharedPtr.h:163
T * get()
Definition: SharedPtr.h:134
void set(OdUInt32 nFlag, bool bSet)
bool get(OdUInt32 nFlag) const
void addReactor(OdTrRndRenderSettingsReactor *pReactor)
void setNextPass(MultiPassType passType, OdTrRndRenderSettings *pNextPass, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
OdTrRndRenderSettings(const OdTrRndRenderSettings &rs)
bool isFaceColorOverrideEnabled() const
OdUInt32 valueU(IntegerProps nProp) const
OdGsView::RenderMode renderMode() const
OdTrRndRenderSettings * nextPass(MultiPassType passType)
OdUInt32 makeGeomMarkerVisibilities() const
OdArray< OdTrRndRenderSettingsReactor *, OdMemoryAllocator< OdTrRndRenderSettingsReactor * > > m_reactors
bool loadNextPass(MultiPassType passType, OdGsFiler *pFiler)
void resetDrawFlag(OdUInt32 nFlag, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool hasNextPass(MultiPassType passType) const
void resetDrawFlags(const OdUInt32 *pFlags, OdUInt32 nFlags=kNumFlags, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setValue(IntegerProps nProp, OdInt32 nVal, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
static CreaseFlags creaseFlagDecode(OdUInt32 flags)
Color m_colorProps[kNumColorProps]
void setReactorDefault(OdTrRndRSUpdateReactor rsDefault)
void setRenderMode(OdGsView::RenderMode rMode, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setRenderModeOverride(bool bSet, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
OdTrRndRenderSettingsPtr m_pNextPass[kNumMultiPassTypes]
OdGsView::RenderMode m_renderMode
bool save(OdGsFiler *pFiler) const
void setLastPass(MultiPassType passType, OdTrRndRenderSettings *pNextPass, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
const OdTrRndDifferentialTransitionPtr & differentialTransition(MultiPassType passType) const
bool drawFlag(OdUInt32 nFlag) const
const Color & resolveColor(const Color &clr) const
const OdUInt8 * serializationFlagsPtr() const
float m_floatProps[kNumFloatProps]
void forceReactorUpdate(OdTrRndRSUpdateReactor rsReact=kRSCallReactor)
OdTrRndRSUpdateReactor reactorDefault() const
bool isGeomTypeVisible(OdTrVisGeomType geomType) const
OdInt32 m_intProps[kNumIntegerProps]
OdTrRndRenderSettings & operator=(const OdTrRndRenderSettings &rs)
void removeReactor(OdTrRndRenderSettingsReactor *pReactor)
void setDrawFlag(OdUInt32 nFlag, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setNextPassCopy(MultiPassType passType, const OdTrRndRenderSettings *pNextPass, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setDrawFlags(const OdUInt32 *pFlags, OdUInt32 nFlags=kNumFlags, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setLastPassCopy(MultiPassType passType, const OdTrRndRenderSettings *pNextPass, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void resolveByViewportDef(const OdTrVisViewportDef &vpDef)
void setForRenderMode(OdGsView::RenderMode rm, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool hasReactor(OdTrRndRenderSettingsReactor *pReactor) const
static OdUInt32 extendedPropsInfo(const UIPropEntry **ppEntries=NULL)
OdTrRndRenderSettings(OdGsView::RenderMode initialRenderMode=OdGsView::k2DOptimized, OdTrRndRSUpdateReactor rsDefault=kRSCallReactor)
void clearDrawFlags(OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void react(OdTrRndRSUpdateReactor rsReact)
void setDrawFlag(OdUInt32 nFlag, bool bSet, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
static CreaseFlags get_creaseFilterBack(OdUInt32 creaseFilter)
void setValueU(IntegerProps nProp, OdUInt32 nVal, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setColor(ColorProps nProp, const Color &clr, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
const Color & color(ColorProps nProp, bool bResolved=true) const
void setValue(FloatProps nProp, float fVal, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
OdTrRndRenderSettingsPtr & nextPassPtr(MultiPassType passType)
const OdTrRndRenderSettingsPtr & nextPassPtr(MultiPassType passType) const
static OdUInt32 make_creaseFilter(CreaseFilterDefault defFilter)
static CreaseFlags get_creaseFilterFront(OdUInt32 creaseFilter)
BitSet< kNumFlagRegs > m_nDrawFlags
OdInt32 value(IntegerProps nProp) const
OdTrRndDifferentialTransitionPtr m_pDifTrans[kNumMultiPassTypes]
const OdTrRndRenderSettings * nextPass(MultiPassType passType) const
void setPropsDefault(OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool is3dFacesWithLinesEnabled() const
static OdUInt32 make_creaseFilter(CreaseFlags frontLimit, CreaseFlags backLimit)
bool load(OdGsFiler *pFiler)
static OdUInt32 creaseFlagEncode(CreaseFlags flags)
float value(FloatProps nProp) const
void resetDifferentialTransition(MultiPassType passType)
void setDifferentialTransition(MultiPassType passType, const OdTrRndDifferentialTransitionPtr &pDifTrans)
virtual OdUInt32 rsNumViewports() const =0
virtual void rsViewportSettings(OdUInt32 numViewport, OdTrRndRenderSettingsPtr &rs) const =0
virtual OdUInt32 rsViewportFlags(OdUInt32 numViewport) const =0
virtual bool rsIsViewportRenderModeOverride(OdUInt32 numViewport) const =0
virtual OdTrRndRenderSettings & rsViewportSettings(OdUInt32 numViewport)=0
virtual void rsSetViewportRenderModeOverride(OdUInt32 numViewport, bool bOverride)=0
virtual OdTrVisViewportId rsViewportId(OdUInt32 numViewport) const =0
virtual void rsApplyViewportRenderModeOverride(OdUInt32 numViewport)=0
virtual void renderSettingsChanged(OdTrRndRenderSettings *pRSets)=0
Color(ColorType colorType=kColorBackground, ODCOLORREF colorVal=ODRGBA(0, 0, 0, 255))
OdUInt32 m_nLinkUIId1
PropType m_propType
UIPropRanges m_ranges
OdUInt32 m_nLinkUIId2
UIDefVal m_defaultVal
OdUInt32 m_nPropCode
const OdChar * m_pName
UIPropRanges(OdInt32 intMin, OdInt32 intMax)
UIPropRanges(OdUInt32 uintMin, OdUInt32 uintMax)
UIPropRanges(float fltMin, float fltMax)
struct OdTrRndRenderSettings::UIDefVal::ColorProp m_colorProp
UIDefVal(ColorType colorType, ODCOLORREF colorVal=ODRGBA(0, 0, 0, 255))