CFx SDK Documentation  2020SP3
TrVisVisualStyle.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 visual style definition
24 
25 #ifndef ODTRVISVISUALSTYLE
26 #define ODTRVISVISUALSTYLE
27 
28 #include "TD_PackPush.h"
29 
30 #include "Gi/GiVisualStyle.h"
31 #include "OdVector.h"
32 
33 #include "TrVisRenderMode.h"
34 
39 {
40  protected:
41  struct DataType
42  {
49 
51  : m_type(0), m_set(0), m_alloc(0), m_modified(0), m_reserve(0), m_num(0)
52  { }
53 
54  bool isPropSet() const { return m_alloc == 1; }
55  void setPropSet(bool bSet = true) { m_alloc = (bSet) ? 1 : 0; }
56 
57  bool isInherit() const { return m_set != 1; }
58  void setInherit(bool bSet) { m_set = (bSet) ? 0 : 1; }
59 
60  bool isModified() const { return m_modified == 1; }
61  void setModified(bool bSet) { m_modified = (bSet) ? 1 : 0; }
62 
65 
66  OdUInt32 getPropNumber() const { return m_num; }
67  void setPropNumber(OdUInt32 num) { m_num = num; }
68  } m_type;
69  union TypeData
70  {
71  bool m_boolVal;
74  double m_dblVal;
76 
78  : m_ptrVal(NULL)
79  { }
80 
81  bool getBool() const { return m_boolVal; }
82  void setBool(bool bVal) { m_boolVal = bVal; }
83 
84  OdInt32 getInt() const { return m_intVal; }
85  void setInt(OdInt32 iVal) { m_intVal = iVal; }
86 
87  OdUInt32 getUInt() const { return m_uintVal; }
88  void setUInt(OdUInt32 uVal) { m_uintVal = uVal; }
89 
90  double getDouble() const { return m_dblVal; }
91  void setDouble(double dVal) { m_dblVal = dVal; }
92 
93  const OdChar *getString() const { return m_ptrVal; }
94  void setString(const OdChar *pStr)
95  {
96  if (pStr)
97  {
98  OdUInt32 nLen = lclk(pStr);
99  OdChar *pNew = new OdChar[nLen + 1];
100  cstr(pNew, pStr, nLen); pNew[nLen] = 0;
101  m_ptrVal = pNew;
102  } else m_ptrVal = NULL;
103  }
104  void resetString()
105  {
106  if (m_ptrVal) { delete []m_ptrVal; m_ptrVal = NULL; }
107  }
108  bool cmpString(const OdChar *pStr) const
109  {
110  if (!m_ptrVal != !m_ptrVal) return false;
111  if (m_ptrVal)
112  {
113  const OdChar *pStrLeft = m_ptrVal;
114  while (*pStrLeft && *pStr)
115  {
116  if (*pStrLeft != *pStr)
117  return false;
118  pStrLeft++; pStr++;
119  }
120  return *pStrLeft == *pStr;
121  }
122  return true;
123  }
124  protected:
125  OdUInt32 lclk(const OdChar *pStr) const
126  {
127  if (!pStr) return 0;
128  OdUInt32 nLen = 0;
129  while (pStr[nLen]) nLen++;
130  return nLen;
131  }
132  void cstr(OdChar *pStr, const OdChar *pStr_, OdUInt32 nLen) const
133  {
134  for (OdUInt32 i = 0; i < nLen; i++)
135  pStr[i] = pStr_[i];
136  }
138  public:
140  {
144 
145  kColorRGB = 255
146  };
147  protected:
148  void blockExecution() const { throw OdError(eInvalidInput); }
150  bool hasString() const { return m_type.isPropSet() && (m_type.getType() == OdGiVariant::kString); }
153  {
154  if (!isValidType(type))
155  blockExecution();
156  if (!m_type.isPropSet())
157  {
159  m_type.setPropSet();
160  }
161  else if (type != m_type.getType())
162  blockExecution();
163  }
164  void checkType(const OdGiVariant::VariantType *pTypes, OdUInt32 nTypes) const
165  {
166  if (!m_type.isPropSet())
167  blockExecution();
168  for (OdUInt32 nType = 0; nType < nTypes; nType++)
169  {
170  if (m_type.getType() == pTypes[nType])
171  return;
172  }
173  blockExecution();
174  }
176  public:
180 
182  { reset(); copyFrom(from, from.operation()); return *this; }
183 
184  void setPropertyNumber(OdUInt32 propNum) { m_type.setPropNumber(propNum); }
186 
188 
189  void set(bool bVal, bool bSet = true)
190  {
192  m_data.setBool(bVal);
193  m_type.setInherit(!bSet);
194  }
195  void set(OdInt32 iVal, bool bSet = true)
196  {
198  m_data.setInt(iVal);
199  m_type.setInherit(!bSet);
200  }
201  void set(OdUInt32 uVal, bool bSet = true, bool bAsColor = false)
202  {
204  m_data.setUInt(uVal);
205  m_type.setInherit(!bSet);
206  }
207  void set(ODCOLORREF cVal, ColorType type, bool bSet = true)
208  {
210  m_data.setUInt(ODRGBA(ODGETRED(cVal), ODGETGREEN(cVal), ODGETBLUE(cVal), type));
211  m_type.setInherit(!bSet);
212  }
213  void set(double dVal, bool bSet = true)
214  {
216  m_data.setDouble(dVal);
217  m_type.setInherit(!bSet);
218  }
219  void set(const OdChar *sVal, bool bSet = true)
220  {
221  resetString();
223  m_data.setString(sVal);
224  m_type.setInherit(!bSet);
225  }
226  void set(const OdString &sVal, bool bSet = true) { set(sVal.c_str(), bSet); }
227  void set(const char *sVal, bool bSet = true) { set(OdString(sVal), bSet); }
228 
229  bool getBool() const
230  {
232  return m_data.getBool();
233  }
234  OdUInt8 getBoolAsInt() const { return (getBool()) ? 1 : 0; }
235  OdInt32 getInt() const
236  {
238  return m_data.getInt();
239  }
241  {
243  checkType(validTypes, sizeof(validTypes) / sizeof(OdGiVariant::VariantType));
244  return m_data.getUInt();
245  }
247  {
249  if (pType) *pType = (ColorType)ODGETALPHA(m_data.getUInt());
251  }
253  {
255  return (ColorType)ODGETALPHA(m_data.getUInt());
256  }
257  double getDouble() const
258  {
260  return m_data.getDouble();
261  }
262  const OdChar *getString() const
263  {
265  return m_data.getString();
266  }
267 
268  void setOperation(bool bSet) { m_type.setInherit(!bSet); }
269  bool operation() const { return !m_type.isInherit(); }
270 
271  void setFlag(OdUInt32 nFlag, bool bSet)
272  {
273  OdUInt32 flags = 0;
274  if (m_type.isPropSet()) flags = getUInt();
275  SETBIT(flags, nFlag, bSet);
276  set(flags);
277  }
278  bool getFlag(OdUInt32 nFlag) const
279  { return GETBIT(getUInt(), nFlag); }
280 
281  void setModified(bool bSet) { m_type.setModified(bSet); }
282  bool isModified() const { return m_type.isModified(); }
283 
284  void copyFrom(const OdTrVisVisualStyleProperty &from, bool bSet = true)
285  {
286  resetString();
287  setType(from.m_type.getType());
288  switch (from.m_type.getType())
289  {
290  case OdGiVariant::kBoolean: m_data.setBool(from.m_data.getBool()); break;
295  }
296  m_type.setInherit(!bSet);
297  m_type.setModified(from.isModified());
299  }
300 
301  void reset()
302  {
303  resetString();
305  m_type.setPropSet(false);
306  m_type.setInherit(true);
308  m_data.m_ptrVal = NULL;
309  }
310 
311  bool compare(const OdTrVisVisualStyleProperty &with, bool bCmpVal = true, bool bCmpOp = false, bool bCmpNum = false) const
312  {
313  if ((m_type.isPropSet() != with.m_type.isPropSet()) || (m_type.getType() != with.m_type.getType()))
314  return false;
315  if (bCmpVal)
316  {
317  switch (m_type.getType())
318  {
319  case OdGiVariant::kBoolean: if (m_data.getBool() != with.m_data.getBool()) return false; break;
320  case OdGiVariant::kInt: case OdGiVariant::kColor: if (m_data.getUInt() != with.m_data.getUInt()) return false; break;
321  case OdGiVariant::kDouble: if (!OdEqual(m_data.getDouble(), with.m_data.getDouble())) return false; break;
322  case OdGiVariant::kString: if (!m_data.cmpString(with.m_data.getString())) return false; break;
324  }
325  }
326  if (bCmpOp && (m_type.isInherit() != with.m_type.isInherit()))
327  return false;
328  if (bCmpNum && (m_type.getPropNumber() != with.m_type.getPropNumber()))
329  return false;
330  return true;
331  }
332  bool operator ==(const OdTrVisVisualStyleProperty &with) const { return compare(with); }
333  bool operator !=(const OdTrVisVisualStyleProperty &with) const { return !compare(with); }
334 };
335 
340 {
341  protected:
343  protected:
349  protected:
350  void checkLength(OdUInt32 nProp) const
351  {
352  if (m_props.size() <= nProp)
353  m_props.resize(nProp + 1);
354  }
355  void copyType(const OdTrVisVisualStyle &from)
356  {
357  m_type = from.m_type;
358  m_name = from.m_name;
359  m_bInternal = from.m_bInternal;
360  m_bTemporary = from.m_bTemporary;
361  }
362  struct PropCheck
363  {
365  static void lwd_mod(int& curExtension) { curExtension = (curExtension + 1) / 2; }
366  static void jitter_mod(int& curExtension)
367  {
368  switch (curExtension)
369  {
370  case OdGiVisualStyleProperties::kJitterLow: curExtension = 4; break;
371  case OdGiVisualStyleProperties::kJitterMedium: curExtension = 6; break;
372  case OdGiVisualStyleProperties::kJitterHigh: curExtension = 8; break;
373  }
374  }
375  static bool run(const OdTrVisVisualStyle &pVS, OdGiVisualStyleProperties::Property EdgeFlags, OdUInt32 EdgeFlag,
376  OdGiVisualStyleProperties::Property PropName, int minLimit, ModifierType modType, int &maxExtension)
377  {
378  if (pVS.property(EdgeFlags).getFlag(EdgeFlag))
379  {
380  int curExtension = (int)pVS.property(PropName).getInt();
381  if (curExtension > minLimit)
382  {
383  switch (modType)
384  {
385  case kLwdMod: lwd_mod(curExtension); break;
386  case kJitterMod: jitter_mod(curExtension); break;
387  default: break;
388  }
389  if (curExtension > maxExtension)
390  maxExtension = curExtension;
391  return true;
392  }
393  }
394  return false;
395  }
396  };
397  public:
399  : m_type(OdGiVisualStyle::kEmptyStyle)
400  , m_name()
401  , m_bInternal(false)
403  , m_props(0, 1)
404  { }
406  : m_type(OdGiVisualStyle::kEmptyStyle)
407  , m_name()
408  , m_bInternal(false)
410  , m_props(0, 1)
411  { copyFrom(from); }
413 
414  void copyFrom(const OdTrVisVisualStyle &from, bool bCopyType = true, bool bCopyDiff = false)
415  {
416  if (bCopyType)
417  copyType(from);
418  OdUInt32 nProps = from.m_props.size();
419  m_props.resize(nProps);
420  for (OdUInt32 nProp = 0; nProp < nProps; nProp++)
421  {
422  if (!bCopyDiff || (m_props[nProp] != from.m_props[nProp]))
423  m_props[nProp] = from.m_props[nProp];
424  }
425  }
426  void copyModified(const OdTrVisVisualStyle &from, bool bCopyType = true)
427  {
428  if (bCopyType)
429  copyType(from);
430  OdUInt32 nProps = from.m_props.size();
431  m_props.resize(nProps);
432  for (OdUInt32 nProp = 0; nProp < nProps; nProp++)
433  {
434  if (from.m_props[nProp].isModified())
435  {
436  m_props[nProp] = from.m_props[nProp];
437  m_props[nProp].setModified(false);
438  }
439  }
440  }
441 
442  OdTrVisVisualStyle &operator =(const OdTrVisVisualStyle &from) { copyFrom(from); return *this; }
443 
444  void setType(OdGiVisualStyle::Type tpy) { m_type = tpy; }
445  OdGiVisualStyle::Type type() const { return m_type; }
446 
447  void setName(const OdString &name) { m_name = name; }
448  const OdString &name() const { return m_name; }
449 
450  void setInternal(bool bSet) { m_bInternal = bSet; }
451  bool isInternal() const { return m_bInternal; }
452 
453  void setTemporary(bool bSet) { m_bTemporary = bSet; }
454  bool isTemporary() const { return m_bTemporary; }
455 
456  void setPropertiesNumber(OdUInt32 nProps) { m_props.resize(nProps); }
457  OdUInt32 numProperties() const { return m_props.size(); }
458 
460 
463 
464  bool compare(const OdTrVisVisualStyle &with, bool bCmpType = false, bool bCmpProps = true) const
465  {
466  if (bCmpType && ((m_type != with.m_type) ||
467  (m_name != with.m_name) ||
468  (m_bInternal != with.m_bInternal) ||
469  (m_bTemporary != with.m_bTemporary)))
470  return false;
471  if (bCmpProps)
472  {
473  if (m_props.size() != with.m_props.size())
474  return false;
475  const OdUInt32 nProps = m_props.size();
476  for (OdUInt32 nProp = 0; nProp < nProps; nProp++)
477  {
478  if (m_props[nProp] != with.m_props[nProp])
479  return false;
480  }
481  }
482  return true;
483  }
484  bool operator ==(const OdTrVisVisualStyle &with) const { return compare(with); }
485  bool operator !=(const OdTrVisVisualStyle &with) const { return !compare(with); }
486 
487  void resetModified(bool bSet = false)
488  {
489  const OdUInt32 nProps = m_props.size();
491  for (OdUInt32 nProp = 0; nProp < nProps; nProp++)
492  pProps[nProp].setModified(bSet);
493  }
495  {
496  OdUInt32 nModified = 0;
497  const OdUInt32 nProps = m_props.size();
498  const OdTrVisVisualStyleProperty *pProps = m_props.getPtr();
499  for (OdUInt32 nProp = 0; nProp < nProps; nProp++)
500  {
501  if (pProps[nProp].isModified())
502  nModified++;
503  }
504  return nModified;
505  }
506 
507  bool resolveInheritance(const OdTrVisVisualStyle &owner, OdUInt32 *nResolved = NULL, OdUInt32 *nUnresolved = NULL);
508  OdUInt32 countUnresolved() const;
509  bool backSubstitution(const OdTrVisVisualStyle &child, OdUInt32 *nSubstituted = NULL, OdUInt32 *nUnresolved = NULL);
510 
511  void computeRenderMode(OdTrVisRenderMode &pRM, bool bBestMatch = false) const;
512  int computeExtentsEnlargement() const;
513 };
514 
515 // Inlines section
516 
517 inline
519 {
520  if (nResolved) *nResolved = 0; if (nUnresolved) *nUnresolved = 0;
521  if (m_props.size() > owner.m_props.size())
522  return false;
523  const OdUInt32 nProps = m_props.size();
524  for (OdUInt32 nProp = 0; nProp < nProps; nProp++)
525  {
526  OdTrVisVisualStyleProperty &prop = m_props[nProp];
527  if (!prop.operation())
528  {
529  if (owner.m_props[nProp].operation())
530  {
531  prop = owner.m_props[nProp];
532  if (nResolved) (*nResolved)++;
533  }
534  else if (nUnresolved)
535  (*nUnresolved)++;
536  }
537  }
538  return true;
539 }
540 
541 inline
543 {
544  OdUInt32 nUnresolved = 0;
545  const OdUInt32 nProps = m_props.size();
546  for (OdUInt32 nProp = 0; nProp < nProps; nProp++)
547  {
548  if (!m_props[nProp].operation())
549  nUnresolved++;
550  }
551  return nUnresolved;
552 }
553 
554 inline
555 bool OdTrVisVisualStyle::backSubstitution(const OdTrVisVisualStyle &child, OdUInt32 *nSubstituted, OdUInt32 *nUnresolved)
556 {
557  const OdUInt32 nProps = odmax(m_props.size(), child.m_props.size());
558  for (OdUInt32 nProp = 0; nProp < nProps; nProp++)
559  {
560  OdTrVisVisualStyleProperty &prop = child.m_props[nProp];
561  if (prop.operation())
562  {
563  m_props[nProp] = prop;
564  if (nSubstituted) (*nSubstituted)++;
565  }
566  else if (nUnresolved && !m_props[nProp].operation())
567  (*nUnresolved)++;
568  }
569  return true;
570 }
571 
572 inline
574 {
576  //pRM.setStencilBufferEnabled(property(OdGiVisualStyleProperties::kFaceColorMode).getInt() == OdGiVisualStyleProperties::kBackgroundColor);
579  // There are 4 places where lighting can be enabled/disable. Which is actually used by Acad?
580  //pRM.setLightingEnabled(property(OdGiVisualStyleProperties::kFaceLightingModel).getInt() != OdGiVisualStyleProperties::kInvisible);
581  //pRM.setLightingEnabled(property(OdGiVisualStyleProperties::kLightingEnabled).getBool());
584  pRM.calibrate();
585  if (bBestMatch)
586  {
589  pRM.setPolygonOffsetEnabled(true); // #CORE-11059
590  }
591 }
592 
593 inline
595 {
596  int maxExtension = 0;
597 
598  // Edges width flag
600  // Edges overhang
602  // Jitter effect
604  // Halo gap
606  // Silhouette
608  return maxExtension;
609 }
610 
611 #include "TD_PackPop.h"
612 
613 #endif // ODTRVISVISUALSTYLE
GETBIT
#define GETBIT(flags, bit)
Definition: OdaDefs.h:498
OdTrVisVisualStyleProperty::isValidType
bool isValidType(OdGiVariant::VariantType type) const
Definition: TrVisVisualStyle.h:149
OdTrVisVisualStyleProperty::checkType
void checkType(OdGiVariant::VariantType type) const
Definition: TrVisVisualStyle.h:175
OdTrVisVisualStyle::m_bInternal
bool m_bInternal
Definition: TrVisVisualStyle.h:346
OdTrVisVisualStyleProperty::TypeData::setInt
void setInt(OdInt32 iVal)
Definition: TrVisVisualStyle.h:85
OdTrVisRenderMode
Definition: TrVisRenderMode.h:36
OdGiVariant::VariantType
VariantType
Definition: GiVariant.h:54
OdTrVisVisualStyle::PropCheck::ModifierType
ModifierType
Definition: TrVisVisualStyle.h:364
OdEqual
bool OdEqual(double x, double y, double tol=1.e-10)
Definition: OdaDefs.h:523
OdTrVisVisualStyle::isInternal
bool isInternal() const
Definition: TrVisVisualStyle.h:451
OdTrVisVisualStyleProperty::reset
void reset()
Definition: TrVisVisualStyle.h:301
OdTrVisVisualStyleProperty::TypeData::setUInt
void setUInt(OdUInt32 uVal)
Definition: TrVisVisualStyle.h:88
OdTrVisVisualStyleProperty::getFlag
bool getFlag(OdUInt32 nFlag) const
Definition: TrVisVisualStyle.h:278
OdString
Definition: OdString.h:95
NULL
#define NULL
Definition: GsProperties.h:177
OdTrVisVisualStyle::numProperties
OdUInt32 numProperties() const
Definition: TrVisVisualStyle.h:457
OdGiVisualStyleProperties::kEdgeJitterFlag
@ kEdgeJitterFlag
Definition: GiVisualStyle.h:896
OdTrVisVisualStyleProperty::DataType::setModified
void setModified(bool bSet)
Definition: TrVisVisualStyle.h:61
OdTrVisVisualStyleProperty::TypeData::setDouble
void setDouble(double dVal)
Definition: TrVisVisualStyle.h:91
OdTrVisVisualStyleProperty::TypeData::m_intVal
OdInt32 m_intVal
Definition: TrVisVisualStyle.h:72
OdTrVisVisualStyleProperty::TypeData::TypeData
TypeData()
Definition: TrVisVisualStyle.h:77
OdTrVisVisualStyleProperty::TypeData::getDouble
double getDouble() const
Definition: TrVisVisualStyle.h:90
OdUInt8
unsigned char OdUInt8
Definition: OdPlatformSettings.h:759
TrVisRenderMode.h
OdTrVisVisualStyleProperty::m_type
struct OdTrVisVisualStyleProperty::DataType m_type
OdTrVisVisualStyleProperty::TypeData::cmpString
bool cmpString(const OdChar *pStr) const
Definition: TrVisVisualStyle.h:108
name
GLuint const GLchar * name
Definition: gles2_ext.h:265
OdVector.h
OdTrVisVisualStyleProperty::DataType::setInherit
void setInherit(bool bSet)
Definition: TrVisVisualStyle.h:58
OdTrVisVisualStyle::OdTrVisVisualStyle
OdTrVisVisualStyle(const OdTrVisVisualStyle &from)
Definition: TrVisVisualStyle.h:405
OdGiVisualStyleProperties::kEdgeJitterAmount
@ kEdgeJitterAmount
Definition: GiVisualStyle.h:761
OdTrVisVisualStyleProperty::OdTrVisVisualStyleProperty
OdTrVisVisualStyleProperty(const OdTrVisVisualStyleProperty &from)
Definition: TrVisVisualStyle.h:178
type
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
OdTrVisRenderMode::calibrate
void calibrate()
Definition: TrVisRenderMode.h:140
OdTrVisVisualStyleProperty::TypeData::m_uintVal
OdUInt32 m_uintVal
Definition: TrVisVisualStyle.h:73
OdGiVariant::kColor
@ kColor
Definition: GiVariant.h:59
false
false
Definition: DimVarDefs.h:165
OdTrVisRenderMode::setPolygonOffsetEnabled
void setPolygonOffsetEnabled(bool bSet)
Definition: TrVisRenderMode.h:56
OdTrVisVisualStyle::name
const OdString & name() const
Definition: TrVisVisualStyle.h:448
OdTrVisVisualStyleProperty::getBool
bool getBool() const
Definition: TrVisVisualStyle.h:229
OdGiVisualStyleProperties::kEdgeModel
@ kEdgeModel
Definition: GiVisualStyle.h:749
OdGiVariant::kTable
@ kTable
Definition: GiVariant.h:61
OdTrVisVisualStyle::setInternal
void setInternal(bool bSet)
Definition: TrVisVisualStyle.h:450
OdTrVisVisualStyleProperty::set
void set(double dVal, bool bSet=true)
Definition: TrVisVisualStyle.h:213
SETBIT
#define SETBIT(flags, bit, value)
Definition: OdaDefs.h:497
ODGETBLUE
#define ODGETBLUE(rgb)
Definition: OdPlatform.h:889
OdTrVisVisualStyle::property
OdTrVisVisualStyleProperty & property(OdGiVisualStyleProperties::Property prop)
Definition: TrVisVisualStyle.h:461
OdTrVisVisualStyle::operator=
OdTrVisVisualStyle & operator=(const OdTrVisVisualStyle &from)
Definition: TrVisVisualStyle.h:442
OdGiVisualStyleProperties::kEdgeHaloGapFlag
@ kEdgeHaloGapFlag
Definition: GiVisualStyle.h:899
OdTrVisVisualStyle::PropCheck
Definition: TrVisVisualStyle.h:363
OdTrVisVisualStyle::PropCheck::lwd_mod
static void lwd_mod(int &curExtension)
Definition: TrVisVisualStyle.h:365
OdTrVisVisualStyleProperty::setFlag
void setFlag(OdUInt32 nFlag, bool bSet)
Definition: TrVisVisualStyle.h:271
OdTrVisVisualStyleProperty::DataType::m_num
OdUInt32 m_num
Definition: TrVisVisualStyle.h:48
OdTrVisVisualStyle::type
OdGiVisualStyle::Type type() const
Definition: TrVisVisualStyle.h:445
OdTrVisVisualStyleProperty::DataType::getType
OdGiVariant::VariantType getType() const
Definition: TrVisVisualStyle.h:63
TD_PackPop.h
OdTrVisVisualStyleProperty::TypeData::getUInt
OdUInt32 getUInt() const
Definition: TrVisVisualStyle.h:87
OdTrVisVisualStyleProperty
Definition: TrVisVisualStyle.h:39
OdTrVisVisualStyle::backSubstitution
bool backSubstitution(const OdTrVisVisualStyle &child, OdUInt32 *nSubstituted=NULL, OdUInt32 *nUnresolved=NULL)
Definition: TrVisVisualStyle.h:555
OdTrVisVisualStyleProperty::set
void set(ODCOLORREF cVal, ColorType type, bool bSet=true)
Definition: TrVisVisualStyle.h:207
OdTrVisVisualStyleProperty::DataType::DataType
DataType()
Definition: TrVisVisualStyle.h:50
OdTrVisVisualStyle::m_name
OdString m_name
Definition: TrVisVisualStyle.h:345
OdTrVisVisualStyle::copyType
void copyType(const OdTrVisVisualStyle &from)
Definition: TrVisVisualStyle.h:355
OdTrVisRenderMode::setDepthBufferEnabled
void setDepthBufferEnabled(bool bSet)
Definition: TrVisRenderMode.h:54
OdTrVisVisualStyleProperty::getString
const OdChar * getString() const
Definition: TrVisVisualStyle.h:262
OdTrVisVisualStyle::~OdTrVisVisualStyle
~OdTrVisVisualStyle()
Definition: TrVisVisualStyle.h:412
ODGETALPHA
#define ODGETALPHA(rgba)
Definition: OdPlatform.h:890
OdTrVisVisualStyle::setPropertiesNumber
void setPropertiesNumber(OdUInt32 nProps)
Definition: TrVisVisualStyle.h:456
OdTrVisVisualStyle::checkLength
void checkLength(OdUInt32 nProp) const
Definition: TrVisVisualStyle.h:350
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdTrVisVisualStyleProperty::kColorNone
@ kColorNone
Definition: TrVisVisualStyle.h:141
OdTrVisVisualStyleProperty::TypeData
Definition: TrVisVisualStyle.h:70
ODA_FAIL
#define ODA_FAIL()
Definition: DebugStuff.h:65
OdTrVisVisualStyleProperty::DataType::m_set
OdUInt32 m_set
Definition: TrVisVisualStyle.h:44
OdGiVisualStyleProperties::kFaceLightingModel
@ kFaceLightingModel
Definition: GiVisualStyle.h:739
OdGiVariant::kBoolean
@ kBoolean
Definition: GiVariant.h:56
OdVector::getPtr
const T * getPtr() const
Definition: OdVector.h:976
OdGiVariant::kString
@ kString
Definition: GiVariant.h:60
OdTrVisVisualStyleProperty::TypeData::resetString
void resetString()
Definition: TrVisVisualStyle.h:104
OdTrVisVisualStyle::setName
void setName(const OdString &name)
Definition: TrVisVisualStyle.h:447
OdTrVisVisualStyle::m_type
OdGiVisualStyle::Type m_type
Definition: TrVisVisualStyle.h:344
ODGETRED
#define ODGETRED(rgb)
Definition: OdPlatform.h:887
OdTrVisVisualStyleProperty::TypeData::setBool
void setBool(bool bVal)
Definition: TrVisVisualStyle.h:82
OdGiVisualStyle::kEmptyStyle
@ kEmptyStyle
Definition: GiVisualStyle.h:1038
OdTrVisVisualStyleProperty::DataType::isModified
bool isModified() const
Definition: TrVisVisualStyle.h:60
OdTrVisVisualStyleProperty::TypeData::setString
void setString(const OdChar *pStr)
Definition: TrVisVisualStyle.h:94
OdTrVisVisualStyleProperty::TypeData::cstr
void cstr(OdChar *pStr, const OdChar *pStr_, OdUInt32 nLen) const
Definition: TrVisVisualStyle.h:132
OdTrVisVisualStyleProperty::TypeData::m_boolVal
bool m_boolVal
Definition: TrVisVisualStyle.h:71
OdTrVisVisualStyle::compare
bool compare(const OdTrVisVisualStyle &with, bool bCmpType=false, bool bCmpProps=true) const
Definition: TrVisVisualStyle.h:464
OdTrVisVisualStyle::resetModified
void resetModified(bool bSet=false)
Definition: TrVisVisualStyle.h:487
OdTrVisVisualStyleProperty::TypeData::m_dblVal
double m_dblVal
Definition: TrVisVisualStyle.h:74
OdTrVisVisualStyleProperty::TypeData::getInt
OdInt32 getInt() const
Definition: TrVisVisualStyle.h:84
OdString
OdString OdString
Definition: OdString.h:1224
OdTrVisVisualStyle::setType
void setType(OdGiVisualStyle::Type tpy)
Definition: TrVisVisualStyle.h:444
OdGiVisualStyleProperties::kEdgeOverhangFlag
@ kEdgeOverhangFlag
Definition: GiVisualStyle.h:895
OdTrVisVisualStyle::copyModified
void copyModified(const OdTrVisVisualStyle &from, bool bCopyType=true)
Definition: TrVisVisualStyle.h:426
OdTrVisVisualStyleProperty::TypeData::lclk
OdUInt32 lclk(const OdChar *pStr) const
Definition: TrVisVisualStyle.h:125
OdTrVisVisualStyleProperty::operation
bool operation() const
Definition: TrVisVisualStyle.h:269
OdTrVisVisualStyleProperty::setPropertyNumber
void setPropertyNumber(OdUInt32 propNum)
Definition: TrVisVisualStyle.h:184
OdGiVisualStyle
Definition: GiVisualStyle.h:996
OdTrVisVisualStyleProperty::DataType
Definition: TrVisVisualStyle.h:42
OdTrVisVisualStyle::isTemporary
bool isTemporary() const
Definition: TrVisVisualStyle.h:454
OdGiVisualStyleProperties::kEdgeSilhouetteWidth
@ kEdgeSilhouetteWidth
Definition: GiVisualStyle.h:763
OdTrVisVisualStyle::PropCheck::kNoMod
@ kNoMod
Definition: TrVisVisualStyle.h:364
OdInt32
int OdInt32
Definition: OdPlatformSettings.h:782
OdGiVariant::kUndefined
@ kUndefined
Definition: GiVariant.h:55
OdTrVisVisualStyle::m_bTemporary
bool m_bTemporary
Definition: TrVisVisualStyle.h:347
OdTrVisVisualStyleProperty::DataType::m_reserve
OdUInt32 m_reserve
Definition: TrVisVisualStyle.h:47
OdTrVisVisualStyleProperty::kColorBackground
@ kColorBackground
Definition: TrVisVisualStyle.h:143
OdTrVisVisualStyleProperty::operator=
OdTrVisVisualStyleProperty & operator=(const OdTrVisVisualStyleProperty &from)
Definition: TrVisVisualStyle.h:181
OdTrVisVisualStyleProperty::blockExecution
void blockExecution() const
Definition: TrVisVisualStyle.h:148
OdTrVisVisualStyleProperty::type
OdGiVariant::VariantType type() const
Definition: TrVisVisualStyle.h:187
OdTrVisVisualStyle::PropCheck::kJitterMod
@ kJitterMod
Definition: TrVisVisualStyle.h:364
OdTrVisVisualStyleProperty::copyFrom
void copyFrom(const OdTrVisVisualStyleProperty &from, bool bSet=true)
Definition: TrVisVisualStyle.h:284
OdTrVisVisualStyle::operator!=
bool operator!=(const OdTrVisVisualStyle &with) const
Definition: TrVisVisualStyle.h:485
ODGETGREEN
#define ODGETGREEN(rgb)
Definition: OdPlatform.h:888
OdVector::setPhysicalLength
OdVector & setPhysicalLength(size_type physicalLength)
Definition: OdVector.h:1141
OdGiVisualStyleProperties::kEdgeHaloGap
@ kEdgeHaloGap
Definition: GiVisualStyle.h:764
OdGiVisualStyleProperties::kEdgeModifiers
@ kEdgeModifiers
Definition: GiVisualStyle.h:756
OdTrVisVisualStyleProperty::isModified
bool isModified() const
Definition: TrVisVisualStyle.h:282
OdChar
wchar_t OdChar
Definition: OdPlatformSettings.h:745
OdGiVisualStyleProperties::kPerFaceLighting
@ kPerFaceLighting
Definition: GiVisualStyle.h:833
OdTrVisVisualStyleProperty::set
void set(const char *sVal, bool bSet=true)
Definition: TrVisVisualStyle.h:227
OdTrVisVisualStyleProperty::DataType::isInherit
bool isInherit() const
Definition: TrVisVisualStyle.h:57
OdVector< OdTrVisVisualStyleProperty >
OdTrVisVisualStyleProperty::getInt
OdInt32 getInt() const
Definition: TrVisVisualStyle.h:235
OdTrVisVisualStyleProperty::set
void set(bool bVal, bool bSet=true)
Definition: TrVisVisualStyle.h:189
OdTrVisVisualStyleProperty::getUInt
OdUInt32 getUInt() const
Definition: TrVisVisualStyle.h:240
OdGiVisualStyleProperties::kConstant
@ kConstant
Definition: GiVisualStyle.h:820
OdGiVisualStyleProperties::Property
Property
Definition: GiVisualStyle.h:734
TD_PackPush.h
OdVector::resize
void resize(size_type logicalLength, const T &value)
GiVisualStyle.h
OdTrVisVisualStyleProperty::DataType::getPropNumber
OdUInt32 getPropNumber() const
Definition: TrVisVisualStyle.h:66
OdTrVisVisualStyle::PropCheck::run
static bool run(const OdTrVisVisualStyle &pVS, OdGiVisualStyleProperties::Property EdgeFlags, OdUInt32 EdgeFlag, OdGiVisualStyleProperties::Property PropName, int minLimit, ModifierType modType, int &maxExtension)
Definition: TrVisVisualStyle.h:375
OdGiVariant::kDouble
@ kDouble
Definition: GiVariant.h:58
OdTrVisVisualStyleProperty::OdTrVisVisualStyleProperty
OdTrVisVisualStyleProperty()
Definition: TrVisVisualStyle.h:177
OdTrVisVisualStyle::property
const OdTrVisVisualStyleProperty & property(OdGiVisualStyleProperties::Property prop) const
Definition: TrVisVisualStyle.h:462
OdTrVisVisualStyleProperty::propertyNumber
OdUInt32 propertyNumber() const
Definition: TrVisVisualStyle.h:185
OdVector::asArrayPtr
const T * asArrayPtr() const
Definition: OdVector.h:970
OdTrVisVisualStyleProperty::DataType::m_alloc
OdUInt32 m_alloc
Definition: TrVisVisualStyle.h:45
OdTrVisVisualStyleProperty::DataType::setType
void setType(OdGiVariant::VariantType type)
Definition: TrVisVisualStyle.h:64
odmax
#define odmax(X, Y)
Definition: OdPlatform.h:35
OdTrVisVisualStyleProperty::resetString
void resetString()
Definition: TrVisVisualStyle.h:151
OdTrVisVisualStyleProperty::compare
bool compare(const OdTrVisVisualStyleProperty &with, bool bCmpVal=true, bool bCmpOp=false, bool bCmpNum=false) const
Definition: TrVisVisualStyle.h:311
OdGiVisualStyleProperties::kEdgeOverhang
@ kEdgeOverhang
Definition: GiVisualStyle.h:760
OdTrVisVisualStyle::computeExtentsEnlargement
int computeExtentsEnlargement() const
Definition: TrVisVisualStyle.h:594
OdGiVisualStyleProperties::kEdgeWidth
@ kEdgeWidth
Definition: GiVisualStyle.h:759
OdTrVisVisualStyleProperty::setType
void setType(OdGiVariant::VariantType type)
Definition: TrVisVisualStyle.h:152
OdTrVisVisualStyleProperty::DataType::setPropSet
void setPropSet(bool bSet=true)
Definition: TrVisVisualStyle.h:55
OdTrVisRenderMode::setStencilBufferEnabled
void setStencilBufferEnabled(bool bSet)
Definition: TrVisRenderMode.h:55
OdTrVisVisualStyleProperty::DataType::isPropSet
bool isPropSet() const
Definition: TrVisVisualStyle.h:54
OdTrVisVisualStyleProperty::TypeData::getString
const OdChar * getString() const
Definition: TrVisVisualStyle.h:93
OdTrVisVisualStyleProperty::TypeData::m_ptrVal
OdChar * m_ptrVal
Definition: TrVisVisualStyle.h:75
OdTrVisVisualStyleProperty::set
void set(const OdString &sVal, bool bSet=true)
Definition: TrVisVisualStyle.h:226
OdTrVisVisualStyleProperty::getDouble
double getDouble() const
Definition: TrVisVisualStyle.h:257
OdGiVisualStyleProperties::kJitterHigh
@ kJitterHigh
Definition: GiVisualStyle.h:914
OdGiVisualStyleProperties::kFaceLightingQuality
@ kFaceLightingQuality
Definition: GiVisualStyle.h:740
OdGiVisualStyleProperties::kJitterMedium
@ kJitterMedium
Definition: GiVisualStyle.h:913
OdTrVisVisualStyleProperty::kColorRGB
@ kColorRGB
Definition: TrVisVisualStyle.h:145
OdTrVisVisualStyleProperty::setOperation
void setOperation(bool bSet)
Definition: TrVisVisualStyle.h:268
OdTrVisVisualStyle::copyFrom
void copyFrom(const OdTrVisVisualStyle &from, bool bCopyType=true, bool bCopyDiff=false)
Definition: TrVisVisualStyle.h:414
OdGiVisualStyleProperties::kSilhouetteFlag
@ kSilhouetteFlag
Definition: GiVisualStyle.h:884
OdTrVisRenderMode::setLightingEnabled
void setLightingEnabled(bool bSet)
Definition: TrVisRenderMode.h:57
OdError
Definition: OdError.h:43
OdTrVisVisualStyleProperty::set
void set(const OdChar *sVal, bool bSet=true)
Definition: TrVisVisualStyle.h:219
OdTrVisVisualStyle
Definition: TrVisVisualStyle.h:340
ODRGBA
#define ODRGBA(r, g, b, a)
Definition: OdPlatform.h:885
OdTrVisVisualStyleProperty::hasString
bool hasString() const
Definition: TrVisVisualStyle.h:150
OdTrVisVisualStyle::PropCheck::kLwdMod
@ kLwdMod
Definition: TrVisVisualStyle.h:364
ODCOLORREF
#define ODCOLORREF
Definition: OdPlatform.h:883
OdTrVisVisualStyle::setTemporary
void setTemporary(bool bSet)
Definition: TrVisVisualStyle.h:453
OdTrVisVisualStyleProperty::m_data
union OdTrVisVisualStyleProperty::TypeData m_data
OdTrVisVisualStyleProperty::DataType::setPropNumber
void setPropNumber(OdUInt32 num)
Definition: TrVisVisualStyle.h:67
OdTrVisVisualStyle::computeRenderMode
void computeRenderMode(OdTrVisRenderMode &pRM, bool bBestMatch=false) const
Definition: TrVisVisualStyle.h:573
OdTrVisVisualStyle::OdTrVisVisualStyle
OdTrVisVisualStyle()
Definition: TrVisVisualStyle.h:398
OdTrVisVisualStyleProperty::TypeData::getBool
bool getBool() const
Definition: TrVisVisualStyle.h:81
OdGiVisualStyleProperties::kEdgeWidthFlag
@ kEdgeWidthFlag
Definition: GiVisualStyle.h:897
OdVector::size
size_type size() const
Definition: OdVector.h:866
OdTrVisVisualStyleProperty::kColorForeground
@ kColorForeground
Definition: TrVisVisualStyle.h:142
OdTrVisRenderMode::is_sh
bool is_sh() const
Definition: TrVisRenderMode.h:78
OdGiVisualStyleProperties::kUseDrawOrder
@ kUseDrawOrder
Definition: GiVisualStyle.h:775
OdTrVisVisualStyleProperty::getBoolAsInt
OdUInt8 getBoolAsInt() const
Definition: TrVisVisualStyle.h:234
OdTrVisVisualStyleProperty::operator==
bool operator==(const OdTrVisVisualStyleProperty &with) const
Definition: TrVisVisualStyle.h:332
OdTrVisVisualStyle::PropCheck::jitter_mod
static void jitter_mod(int &curExtension)
Definition: TrVisVisualStyle.h:366
OdTrVisVisualStyle::countModified
OdUInt32 countModified() const
Definition: TrVisVisualStyle.h:494
OdGiVisualStyle::Type
Type
Definition: GiVisualStyle.h:1004
OdTrVisVisualStyle::m_props
PropsCont m_props
Definition: TrVisVisualStyle.h:348
OdTrVisVisualStyle::operator==
bool operator==(const OdTrVisVisualStyle &with) const
Definition: TrVisVisualStyle.h:484
OdTrVisVisualStyleProperty::getColorType
ColorType getColorType() const
Definition: TrVisVisualStyle.h:252
OdTrVisVisualStyleProperty::setModified
void setModified(bool bSet)
Definition: TrVisVisualStyle.h:281
OdTrVisVisualStyleProperty::operator!=
bool operator!=(const OdTrVisVisualStyleProperty &with) const
Definition: TrVisVisualStyle.h:333
OdString::c_str
const OdChar * c_str() const
Definition: OdString.h:200
OdTrVisVisualStyleProperty::DataType::m_modified
OdUInt32 m_modified
Definition: TrVisVisualStyle.h:46
OdTrVisVisualStyleProperty::DataType::m_type
OdUInt32 m_type
Definition: TrVisVisualStyle.h:43
OdTrVisVisualStyleProperty::ColorType
ColorType
Definition: TrVisVisualStyle.h:140
OdTrVisVisualStyleProperty::~OdTrVisVisualStyleProperty
~OdTrVisVisualStyleProperty()
Definition: TrVisVisualStyle.h:179
OdTrVisRenderMode::setFaceNormalsEnabled
void setFaceNormalsEnabled(bool bSet)
Definition: TrVisRenderMode.h:58
OdTrVisVisualStyleProperty::checkType
void checkType(const OdGiVariant::VariantType *pTypes, OdUInt32 nTypes) const
Definition: TrVisVisualStyle.h:164
OdTrVisVisualStyleProperty::getColor
ODCOLORREF getColor(ColorType *pType=NULL) const
Definition: TrVisVisualStyle.h:246
OdTrVisVisualStyle::resolveInheritance
bool resolveInheritance(const OdTrVisVisualStyle &owner, OdUInt32 *nResolved=NULL, OdUInt32 *nUnresolved=NULL)
Definition: TrVisVisualStyle.h:518
OdTrVisVisualStyle::PropsCont
OdVector< OdTrVisVisualStyleProperty > PropsCont
Definition: TrVisVisualStyle.h:342
OdGiVisualStyleProperties::kEdgeStyles
@ kEdgeStyles
Definition: GiVisualStyle.h:750
OdGiVisualStyleProperties::kNoEdges
@ kNoEdges
Definition: GiVisualStyle.h:872
OdTrVisVisualStyle::countUnresolved
OdUInt32 countUnresolved() const
Definition: TrVisVisualStyle.h:542
OdGiVariant::kInt
@ kInt
Definition: GiVariant.h:57
OdTrVisVisualStyleProperty::set
void set(OdInt32 iVal, bool bSet=true)
Definition: TrVisVisualStyle.h:195
OdTrVisVisualStyle::clear
void clear()
Definition: TrVisVisualStyle.h:459
OdTrVisVisualStyleProperty::set
void set(OdUInt32 uVal, bool bSet=true, bool bAsColor=false)
Definition: TrVisVisualStyle.h:201
OdGiVisualStyleProperties::kJitterLow
@ kJitterLow
Definition: GiVisualStyle.h:912