CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbVisualStyle.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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
24#ifndef OD_DBVISUALSTYLE_H
25#define OD_DBVISUALSTYLE_H
26
27#include "TD_PackPush.h"
28
29#include "DbObject.h"
30#include "Gi/GiVisualStyle.h"
31
36namespace OdDb
37{
38 // Legacy (shademode) styles
39 const wchar_t kszVSFlat[] = L"Flat";
40 const wchar_t kszVSFlatWithEdges[] = L"FlatWithEdges";
41 const wchar_t kszVSGouraud[] = L"Gouraud";
42 const wchar_t kszVSGouraudWithEdges[] = L"GouraudWithEdges";
43
44 // Visual Styles
45 const wchar_t kszVS2DWireframe[] = L"2dWireframe";
46 const wchar_t kszVS3DWireframe[] = L"Wireframe"; // Was "3dWireframe" before (#11263)
47 const wchar_t kszVSBasic[] = L"Basic";
48 const wchar_t kszVSHidden[] = L"Hidden"; // Was "3D Hidden" before (#11263)
49 const wchar_t kszVSRealistic[] = L"Realistic";
50 const wchar_t kszVSConceptual[] = L"Conceptual";
51 const wchar_t kszVSCustom[] = L"Custom";
52 const wchar_t kszVSShadesOfGray[] = L"Shades of Gray";
53 const wchar_t kszVSSketchy[] = L"Sketchy";
54 const wchar_t kszVSXRay[] = L"X-Ray";
55
56 // AirMax Visual Styles
57 const wchar_t kszVSShadedWithEdges[] = L"Shaded with edges";
58 const wchar_t kszVSShaded[] = L"Shaded";
59
60 // Highlight Visual Styles (internal use only)
61 const wchar_t kszVSDim[] = L"Dim";
62 const wchar_t kszVSBrighten[] = L"Brighten";
63 const wchar_t kszVSThicken[] = L"Thicken";
64 const wchar_t kszVSTransparent[] = L"Transparent";
65 const wchar_t kszVSLinePattern[] = L"Linepattern";
66 const wchar_t kszVSFacePattern[] = L"Facepattern";
67 const wchar_t kszVSColorChange[] = L"ColorChange";
68
69 // Edge Style Override Visual Styles (internal use only)
70 const wchar_t kszVSJitterOff[] = L"JitterOff";
71 const wchar_t kszVSOverhangOff[] = L"OverhangOff";
72 const wchar_t kszVSEdgeColorOff[] = L"EdgeColorOff";
73}
80{
81public:
83
88
94 void setDescription(const OdString& pDescription);
95
99 const OdString description () const;
100
107
112
118 void setFaceStyle(const OdGiFaceStyle& faceStyle);
119
123 const OdGiFaceStyle& faceStyle() const;
124
130 void setEdgeStyle(const OdGiEdgeStyle& edgeStyle);
131
135 const OdGiEdgeStyle& edgeStyle() const;
136
142 void setDisplayStyle(const OdGiDisplayStyle& displayStyle);
143
148
156 bool isInternalUseOnly() const;
157
163 void setInternalUseOnly(bool bInternalUseOnly);
164
172
180
188
196
215
225
235
245 void setTrait(OdGiVisualStyleProperties::Property prop, double red, double green, double blue,
247
257
267
278
286 void setTraitFlag(OdGiVisualStyleProperties::Property flagProp, OdUInt32 flagVal, bool bEnable = true);
287
299
305 void name(OdString &value) const;
306
308 OdDbDwgFiler* pFiler);
309
310 virtual void dwgOutFields(
311 OdDbDwgFiler* pFiler) const;
312
314 OdDbDxfFiler* pFiler);
315
316 virtual void dxfOutFields(
317 OdDbDxfFiler* pFiler) const;
318
320
322 OdGiDrawableTraits* pTraits) const;
323};
324
329
330#include "TD_PackPop.h"
331
332#endif // OD_DBVISUALSTYLE_H
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdSmartPtr< OdDbVisualStyle > OdDbVisualStylePtr
unsigned int OdUInt32
int OdInt32
OdResult
Definition: OdResult.h:29
void setFaceStyle(const OdGiFaceStyle &faceStyle)
bool traitFlag(OdGiVisualStyleProperties::Property flagProp, OdUInt32 flagVal) const
void setEdgeStyle(const OdGiEdgeStyle &edgeStyle)
OdGiVisualStyle::Type type() const
void setTrait(OdGiVisualStyleProperties::Property prop, double dVal, OdGiVisualStyleOperations::Operation op=OdGiVisualStyleOperations::kSet)
const OdString description() const
void setTrait(OdGiVisualStyleProperties::Property prop, bool bVal, OdGiVisualStyleOperations::Operation op=OdGiVisualStyleOperations::kSet)
virtual OdUInt32 subSetAttributes(OdGiDrawableTraits *pTraits) const
void setTrait(OdGiVisualStyleProperties::Property prop, double red, double green, double blue, OdGiVisualStyleOperations::Operation op=OdGiVisualStyleOperations::kSet)
static OdGiVisualStylePtr createVisualStyle()
void setTrait(OdGiVisualStyleProperties::Property prop, const OdString &strVal, OdGiVisualStyleOperations::Operation op=OdGiVisualStyleOperations::kSet)
void setTrait(OdGiVisualStyleProperties::Property prop, const OdGiVariant *pVal, OdGiVisualStyleOperations::Operation op=OdGiVisualStyleOperations::kSet)
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
void setTraitFlag(OdGiVisualStyleProperties::Property flagProp, OdUInt32 flagVal, bool bEnable=true)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
void name(OdString &value) const
void setDescription(const OdString &pDescription)
const OdGiEdgeStyle & edgeStyle() const
OdGiVariantPtr trait(OdGiVisualStyleProperties::Property prop, OdGiVisualStyleOperations::Operation *pOp=NULL) const
virtual OdGiDrawable * drawable()
void setTrait(OdGiVisualStyleProperties::Property prop, const OdCmColor *pColor, OdGiVisualStyleOperations::Operation op=OdGiVisualStyleOperations::kSet)
const OdGiDisplayStyle & displayStyle() const
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
void setInternalUseOnly(bool bInternalUseOnly)
const OdGiFaceStyle & faceStyle() const
void setType(OdGiVisualStyle::Type type)
void setTrait(OdGiVisualStyleProperties::Property prop, OdInt32 nVal, OdGiVisualStyleOperations::Operation op=OdGiVisualStyleOperations::kSet)
bool isInternalUseOnly() const
ODDB_DECLARE_MEMBERS(OdDbVisualStyle)
static OdGiDisplayStylePtr createDisplayStyle()
static OdGiFaceStylePtr createFaceStyle()
void setDisplayStyle(const OdGiDisplayStyle &displayStyle)
static OdGiEdgeStylePtr createEdgeStyle()
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
GLfloat GLfloat blue
Definition: gles2_ext.h:147
GLfloat green
Definition: gles2_ext.h:147
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
const wchar_t kszVSShadesOfGray[]
Definition: DbVisualStyle.h:52
const wchar_t kszVSColorChange[]
Definition: DbVisualStyle.h:67
const wchar_t kszVSShaded[]
Definition: DbVisualStyle.h:58
const wchar_t kszVSHidden[]
Definition: DbVisualStyle.h:48
const wchar_t kszVSShadedWithEdges[]
Definition: DbVisualStyle.h:57
const wchar_t kszVSFlat[]
Definition: DbVisualStyle.h:39
const wchar_t kszVSXRay[]
Definition: DbVisualStyle.h:54
const wchar_t kszVSFlatWithEdges[]
Definition: DbVisualStyle.h:40
const wchar_t kszVSRealistic[]
Definition: DbVisualStyle.h:49
const wchar_t kszVSOverhangOff[]
Definition: DbVisualStyle.h:71
const wchar_t kszVSThicken[]
Definition: DbVisualStyle.h:63
const wchar_t kszVSConceptual[]
Definition: DbVisualStyle.h:50
const wchar_t kszVSEdgeColorOff[]
Definition: DbVisualStyle.h:72
const wchar_t kszVSLinePattern[]
Definition: DbVisualStyle.h:65
const wchar_t kszVSJitterOff[]
Definition: DbVisualStyle.h:70
const wchar_t kszVSBrighten[]
Definition: DbVisualStyle.h:62
const wchar_t kszVS2DWireframe[]
Definition: DbVisualStyle.h:45
const wchar_t kszVSDim[]
Definition: DbVisualStyle.h:61
const wchar_t kszVSFacePattern[]
Definition: DbVisualStyle.h:66
const wchar_t kszVSGouraud[]
Definition: DbVisualStyle.h:41
const wchar_t kszVSGouraudWithEdges[]
Definition: DbVisualStyle.h:42
const wchar_t kszVSCustom[]
Definition: DbVisualStyle.h:51
const wchar_t kszVSSketchy[]
Definition: DbVisualStyle.h:53
const wchar_t kszVSTransparent[]
Definition: DbVisualStyle.h:64
const wchar_t kszVS3DWireframe[]
Definition: DbVisualStyle.h:46
const wchar_t kszVSBasic[]
Definition: DbVisualStyle.h:47