CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
GiVisualStyle.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, 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-2024 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 __ODGIVISUALSTYLE_H__
25#define __ODGIVISUALSTYLE_H__
26
27#include "TD_PackPush.h"
28
29#include "Gi/Gi.h"
30#include "Gi/GiVariant.h"
31
32class OdCmColorBase;
33
42class FIRSTDLL_EXPORT OdGiFaceStyle : public OdRxObject
43{
44public:
46
51 {
52 kInvisible = 0, // Faces are invisible.
53 kConstant = 1, // Faces are drawn in a constant color.
54 kPhong = 2, // Faces are drawn with Phong model to approximate realistic direct lighting.
55 kGooch = 3 // Faces are drawn with non-photorealistic lighting model for automatic technical illustration.
56 };
57
62 {
63 kNoLighting = 0, // No lighting calculations are applied to the faces.
64 kPerFaceLighting = 1, // Color is calculated for each face based on its orientation to the light sources of the scene.
65 kPerVertexLighting = 2, // Color is calculated for each vertex of a face based on its orientation to the light sources of the scene.
66 kPerPixelLighting = 3 // Color is calculated for each pixel of a face based on its orientation to the light sources of the scene.
67 };
68
73 {
74 kNoColorMode = 0, // Apply no modifications to the faces.
75 kObjectColor = 1, // Apply the color of the drawable object to the faces of the object.
76 kBackgroundColor = 2, // Apply the display background color to the faces.
77 kMono = 3, // All faces are treated as having a specific color, resulting in a "monochromatic" effect.
78 kTint = 4, // All faces have the hue and saturation values of their color mapped to the hue and saturation values of a specific color, resulting in a "tinted" effect. The luminance value remains unchanged.
79 kDesaturate = 5 // Apply a desaturation percentage to the diffuse color of a material.
80 };
81
86 {
87 kNoFaceModifiers = 0, // Apply no face modifiers to the faces.
88 kOpacity = 1, // Apply an opacity value to the faces. If unset, faces are displayed with full opacity. If set, faces are displayed with a specified degree of opacity from completely opaque to completely transparent.
89 kSpecular = 2 // Apply a specular highlight (indicating reflection and shininess values) to a material that is applied to the faces.
90 };
91
97 void set(const OdGiFaceStyle& style);
98
105
121 bool operator==(const OdGiFaceStyle& style) const;
122
129
133 virtual LightingModel lightingModel() const = 0;
134
141
145 virtual LightingQuality lightingQuality() const = 0;
146
152 virtual void setFaceColorMode(FaceColorMode mode) = 0;
153
157 virtual FaceColorMode faceColorMode() const = 0;
158
164 virtual void setFaceModifiers(unsigned long nModifiers) = 0;
165
172 virtual void setFaceModifierFlag(FaceModifier flag, bool bEnable) = 0;
173
177 virtual unsigned long faceModifiers() const = 0;
178
186 virtual bool isFaceModifierFlagSet(FaceModifier flag) const = 0;
187
194 virtual void setOpacityLevel(double nLevel, bool bEnableModifier) = 0;
195
199 virtual double opacityLevel() const = 0;
200
207 virtual void setSpecularAmount(double nAmount, bool bEnableModifier) = 0;
208
212 virtual double specularAmount() const = 0;
213
220 virtual void setMonoColor(const OdCmColorBase& color, bool bEnableMode) = 0;
221
225 virtual const OdCmColorBase& monoColor() const = 0;
226
230 virtual OdCmColorBase& monoColor() = 0;
231};
232
237
246class FIRSTDLL_EXPORT OdGiEdgeStyle : public OdRxObject
247{
248public:
250
255 {
256 kNoEdges = 0, // No edges are displayed.
257 kIsolines = 1, // Display isolines.
258 kFacetEdges = 2 // Display facet edges (the edges between neighbouring faces).
259 };
260
265 {
266 kNoEdgeStyle = 0, // No edge styles are applied to the edges.
267 kVisible = 1, // Visible edges are displayed.
268 kSilhouette = 2, // Silhouette edges are displayed.
269 kObscured = 4, // Obscured edges are displayed.
270 kIntersection = 8 // Intersection edges are displayed.
271 };
272
277 {
278 kNoEdgeModifiers = 0x000, // No modifiers are applied.
279 kOverhang = 0x001, // Allow an edge to overhang its start and end points by a specified amount.
280 kJitter = 0x002, // Apply a jitter effect to the edges. The jitter effect is produced by drawing extra lines adjacent to the original line, with a specific amount of perturbation away from the original line.
281 kWidth = 0x004, // Apply a width to the edges.
282 kColor = 0x008, // Apply a color that differs from the drawable object color to the edges.
283 kHaloGap = 0x010, // Apply a halo gap percentage to the edges of an object that is hidden by another object, such that the specified gap is displayed between the edges of the hidden object and the edges of the object which hides it.
284 kLinetype = 0x020, // Apply a linetype to the edges.
285 kAlwaysOnTop = 0x040, // Force edges to be on top. Edges will not participate in the Z-ordering of the displayed drawables.
286 kOpacity = 0x080, // Apply an opacity value to the edges. If unset, edges are displayed with full opacity. If set, edges are displayed with a specified degree of opacity from completely opaque to completely transparent.
287 kWiggle = 0x100, // Apply a wiggle value to the edges.
288 kTexture = 0x200 // Apply a material texture to the edges.
289 };
290
295 {
296 kJitterLow = 1, // A small amount of perturbation.
297 kJitterMedium = 2, // A medium amount of perturbation.
298 kJitterHigh = 3 // A large amount of perturbation.
299 };
300
305 {
306 kWiggleLow = 1, // A small amount of perturbation.
307 kWiggleMedium = 2, // A medium amount of perturbation.
308 kWiggleHigh = 3 // A large amount of perturbation.
309 };
310
315 {
316 kSolid = 1, // A solid line pattern is used to display edges.
317 kDashed = 2, // A dashed line pattern is used to display edges.
318 kDotted = 3, // A dotted line pattern is used to display edges.
319 kShortDash = 4, // A short dashed line pattern is used to display edges.
320 kMediumDash = 5, // A medium dashed line pattern is used to display edges.
321 kLongDash = 6, // A long dashed line pattern is used to display edges.
322 kDoubleShortDash = 7, // A double short dashed line pattern is used to display edges.
323 kDoubleMediumDash = 8, // A double medium dashed line pattern is used to display edges.
324 kDoubleLongDash = 9, // A double long dashed line pattern is used to display edges.
325 kMediumLongDash = 10, // A medium long dashed line pattern is used to display edges.
326 kSparseDot = 11 // A sparse dotted line pattern is used to display edges.
327 };
328
333 {
334 kDefault, // Apply the edge style to the geometry as designed.
335 kAll // Apply the edge style to all geometry.
336 };
337
343 void set(const OdGiEdgeStyle& style);
344
351
380 bool operator==(const OdGiEdgeStyle& style) const;
381
387 virtual void setEdgeModel(EdgeModel model) = 0;
388
392 virtual EdgeModel edgeModel() const = 0;
393
399 virtual void setEdgeStyles(unsigned long nStyles) = 0;
400
407 virtual void setEdgeStyleFlag(EdgeStyle flag, bool bEnable) = 0;
408
412 virtual unsigned long edgeStyles() const = 0;
413
421 virtual bool isEdgeStyleFlagSet(EdgeStyle flag) const = 0;
422
428 virtual void setIntersectionColor(const OdCmColorBase& color) = 0;
429
433 virtual const OdCmColorBase& intersectionColor() const = 0;
434
439
445 virtual void setObscuredColor(const OdCmColorBase& color) = 0;
446
450 virtual const OdCmColorBase& obscuredColor() const = 0;
451
456
463
467 virtual LineType obscuredLinetype() const = 0;
468
475
479 virtual LineType intersectionLinetype() const = 0;
480
486 virtual void setCreaseAngle(double nAngle) = 0;
487
491 virtual double creaseAngle() const = 0;
492
498 virtual void setEdgeModifiers(unsigned long nModifiers) = 0;
499
506 virtual void setEdgeModifierFlag(EdgeModifier flag, bool bEnable) = 0;
507
511 virtual unsigned long edgeModifiers() const = 0;
512
520 virtual bool isEdgeModifierFlagSet(EdgeModifier flag) const = 0;
521
528 virtual void setEdgeColor(const OdCmColorBase& color, bool bEnableModifier) = 0;
529
533 virtual const OdCmColorBase& edgeColor() const = 0;
534
538 virtual OdCmColorBase& edgeColor() = 0;
539
546 virtual void setOpacityLevel(double nLevel, bool bEnableModifier) = 0;
547
551 virtual double opacityLevel() const = 0;
552
559 virtual void setEdgeWidth(int nWidth, bool bEnableModifier) = 0;
560
564 virtual int edgeWidth() const = 0;
565
572 virtual void setOverhangAmount(int nAmount, bool bEnableModifier) = 0;
573
577 virtual int overhangAmount() const = 0;
578
585 virtual void setJitterAmount(JitterAmount amount, bool bEnableModifier) = 0;
586
590 virtual JitterAmount jitterAmount() const = 0;
591
598 virtual void setWiggleAmount(WiggleAmount amount, bool bEnableModifier) = 0;
599
603 virtual WiggleAmount wiggleAmount() const = 0;
604
610 virtual void setSilhouetteColor(const OdCmColorBase& color) = 0;
611
615 virtual const OdCmColorBase& silhouetteColor() const = 0;
616
621
627 virtual void setSilhouetteWidth(short nWidth) = 0;
628
632 virtual short silhouetteWidth() const = 0;
633
640 virtual void setHaloGap(int nHaloGap, bool bEnableModifier) = 0;
641
645 virtual int haloGap() const = 0;
646
652 virtual void setIsolines(unsigned short nIsolines) = 0;
653
657 virtual unsigned short isolines() const = 0;
658
664 virtual void setHidePrecision(bool bHidePrecision) = 0;
665
671 virtual bool hidePrecision() const = 0;
672
678 virtual void setEdgeStyleApply(EdgeStyleApply apply) = 0;
679
683 virtual EdgeStyleApply edgeStyleApply() const = 0;
684};
685
690
699class FIRSTDLL_EXPORT OdGiDisplayStyle : public OdRxObject
700{
701public:
703
708 {
709 kNone = 0x00, // No display settings are used.
710 kBackgrounds = 0x01, // Backgrounds are enabled.
711 kLights = 0x02, // Lights are enabled.
712 kMaterials = 0x04, // Materials are enabled.
713 kTextures = 0x08 // Textures are enabled.
714 };
715
720 {
721 kShadowsNone = 0, // No shadow is displayed.
722 kShadowsGroundPlane = 1, // Ground plane shadows are displayed.
723 kShadowsFull = 2, // Full shadows are displayed.
724 kShadowsFullAndGround = 3 // Full shadows are displayed along with shadows on the ground plane.
725 };
726
732 void set(const OdGiDisplayStyle& style);
733
740
752 bool operator==(const OdGiDisplayStyle& style) const;
753
759 virtual void setDisplaySettings(unsigned long nSettings) = 0;
760
767 virtual void setDisplaySettingsFlag(DisplaySettings flag, bool bEnable) = 0;
768
772 virtual unsigned long displaySettings() const = 0;
773
781 virtual bool isDisplaySettingsFlagSet(DisplaySettings flag) const = 0;
782
788 virtual void setBrightness(double value) = 0;
789
793 virtual double brightness() const = 0;
794
800 virtual void setShadowType(ShadowType type) = 0;
801
805 virtual ShadowType shadowType() const = 0;
806};
807
812
813
821{
826 {
827 kInvalidProperty = -1, // Invalid property.
828
829 // Face properties
830
831 kFaceLightingModel = 0, // The lighting model applied to the faces of drawables. See the FaceLightingModel enumeration.
832 kFaceLightingQuality = 1, // The calculation method of lighting effects applied to faces. See the FaceLightingQuality enumeration.
833 kFaceColorMode = 2, // The color mode applied to faces. See the FaceColorMode enumeration.
834 kFaceModifiers = 3, // Modifications applied to faces. See the FaceModifiers enumeration.
835 kFaceOpacity = 4, // The face opacity property. Double value representing the face opacity level in the range from 0.0 (faces are fully transparent) to 1.0 (no transparency).
836 kFaceSpecular = 5, // The face specular property. Double value representing the specular highlight amount (indicating reflection and shininess values) of the material that is applied to faces.
837 kFaceMonoColor = 6, // The face monocolor effect property. OdCmColor representing the color applied to produce a "monochromatic" effect on faces.
838
839 // Edge properties
840
841 kEdgeModel = 7, // The edge model property. See the EdgeModel enumeration.
842 kEdgeStyles = 8, // The edge style property. See the EdgeStyles enumeration.
843 kEdgeIntersectionColor = 9, // The intersected edges color. OdCmColor representing the color applied to intersection edges.
844 kEdgeObscuredColor = 10, // The obscured edges color. OdCmColor representing the color applied to obscured edges.
845 kEdgeObscuredLinePattern = 11, // The line pattern applied to obscured edges. See the EdgeLinePattern enumeration.
846 kEdgeIntersectionLinePattern = 12, // The line pattern applied to intersection edges. See the EdgeLinePattern enumeration.
847 kEdgeCreaseAngle = 13, // The edge crease angle. Double value indicating angle threshold, above which a facet edge representing adjoining facets will be displayed.
848 kEdgeModifiers = 14, // Modifications applied to edges. See the EdgeModifiers enumeration.
849 kEdgeColor = 15, // The edge color property. OdCmColor representing the color applied to edges.
850 kEdgeOpacity = 16, // The edge opacity property. Double value representing the edge opacity level in the range from 0.0 (faces are fully transparent) to 1.0 (no transparency).
851 kEdgeWidth = 17, // The edge width property. Integer value representing edge width in pixels.
852 kEdgeOverhang = 18, // The edge overhang property. Integer value representing the amount, in pixels, that edges should overhang their start and end points.
853 kEdgeJitterAmount = 19, // The edge jitter amount. See the EdgeJitterAmount enum.
854 kEdgeSilhouetteColor = 20, // The edge silhouette color property. OdCmColor enumeration the color applied to silhouette edges.
855 kEdgeSilhouetteWidth = 21, // The edge silhouette width property. Short value representing silhouette edge width in pixels.
856 kEdgeHaloGap = 22, // The edge halo gap amount. Integer value from 0 to 100 representing the halo gap.
857 kEdgeIsolines = 23, // The isolines number property. Unsigned short value, between 0 and 2047, indicating the number of isolines to display for curved surfaces.
858 kEdgeHidePrecision = 24, // The hide precision property. Boolean value indicating hide precision enabled. True if enabled; otherwise, false.
859
860 // Display properties
861
862 kDisplayStyles = 25, // Display settings. See the DisplayStyles enumeration.
863 kDisplayBrightness = 26, // The display brightness property. Double value indicating brightness.
864 kDisplayShadowType = 27, // The display shadow type property. See the DisplayShadowType enumeration.
865
866 // New in AC2011, 2013
867 kUseDrawOrder = 28, // Boolean value indicating whether draw order is enabled. True if enabled; otherwise, false.
868 kViewportTransparency = 29, // Boolean value indicating whether viewport transparency is enabled. True if enabled; otherwise, false.
869 kLightingEnabled = 30, // Boolean value indicating whether lightning is enabled. True if enabled; otherwise, false.
870 kPosterizeEffect = 31, // Boolean value indicating whether posterize effect is enabled. True if enabled; otherwise, false.
871 kMonoEffect = 32, // Boolean value indicating whether mono effect is enabled. True if enabled; otherwise, false.
872
873 // New in 2013
874 kBlurEffect = 33, // Boolean value indicating whether blur effect is enabled. True if enabled; otherwise, false.
875 kPencilEffect = 34, // Boolean value indicating whether pencil effect is enabled. True if enabled; otherwise, false.
876 kBloomEffect = 35, // Boolean value indicating whether bloom effect is enabled. True if enabled; otherwise, false.
877 kPastelEffect = 36, // Boolean value indicating whether pastel effect is enabled. True if enabled; otherwise, false.
878 kBlurAmount = 37, // The blur amount property. Integer value representing amount of blur effect.
879 kPencilAngle = 38, // The pencil angle amount property. Double value representing the angle amount.
880 kPencilScale = 39, // The pencil scale amount property. Double value representing the scale amount.
881 kPencilPattern = 40, // The pencil pattern amount property. Integer value representing the pencil pattern.
882 kPencilColor = 41, // The pencil color property. OdCmColor representing the pencil color.
883 kBloomThreshold = 42, // The bloom effect threshold property. Integer value representing the threshold value.
884 kBloomRadius = 43, // The bloom effect radius. Integer value representing the bloom radius.
885 kTintColor = 44, // The tint color property. OdCmColor representing the color used for tint effect.
886 kFaceAdjustment = 45, // Boolean value indicating face adjustment enabled. True if enabled; otherwise, false.
887 kPostContrast = 46, // The post-processing contrast property. Integer value representing the contrast value.
888 kPostBrightness = 47, // The post-processing brightness property. Integer value representing the brightness value.
889 kPostPower = 48, // Integer value.
890 kTintEffect = 49, // Boolean value indicating tint effect enabled. True if enabled; otherwise, false.
891 kBloomIntensity = 50, // The bloom intensity property. Integer value representing the intensity of the bloom effect.
892 kColor = 51, // OdCmColor value.
893 kTransparency = 52, // Double value.
894 kEdgeWiggleAmount = 53, // The edge wiggle amount property. See the WiggleAmount enumeration.
895 kEdgeTexturePath = 54, // The edge texture path property. String value representing the path to texture.
896 kDepthOfField = 55, // Boolean value indicating depth of field effect enabled. True if enabled; otherwise, false.
897 kFocusDistance = 56, // The focus distance property. Double value indicating the focus distance value.
898 kFocusWidth = 57, // The focus width property. Double value indicating the focus width value.
899
900 kPropertyCount // The number of visual style properties.
901 };
902
903 //
904 // Face properties
905 //
910 {
911 kInvisible = 0, // Faces are invisible.
912 kConstant = 1, // Faces are drawn in a constant color.
913 kPhong = 2, // Faces are drawn with Phong model to approximate realistic direct lighting.
914 kGooch = 3, // Faces are drawn with non-photorealistic lighting model for automatic technical illustration.
915 // New in 2011
917 };
918
923 {
924 kNoLighting = 0, // No lighting calculations are applied to the faces.
925 kPerFaceLighting = 1, // Color is calculated for each face based on its orientation to the light sources of the scene.
926 kPerVertexLighting = 2, // Color is calculated for each vertex of a face based on its orientation to the light sources of the scene.
927 kPerPixelLighting = 3 // Color is calculated for each pixel of a face based on its orientation to the light sources of the scene.
928 };
929
935 {
936 kNoColorMode = 0, // Apply no modifications to the faces.
937 kObjectColor = 1, // Apply the color of the drawable object to the faces of the object.
938 kBackgroundColor = 2, // Apply the display background color to the faces.
939 kMono = 3, // All faces are treated as having a specific color, resulting in a "monochromatic" effect.
940 kTint = 4, // All faces have the hue and saturation values of their colors mapped to the hue and saturation values of a specific color, resulting in a "tinted" effect. The luminance value remains unchanged.
941 kDesaturate = 5, // Apply a desaturation percentage to the diffuse color of a material.
942 // Visualize extensions
943 kBackgroundTexture = 6 // Apply actual background texture to the faces.
944 };
945
951 {
952 kNoFaceModifiers = 0, // Apply no face modifiers to the faces.
953 kFaceOpacityFlag = 1, // Apply an opacity value to the faces. If unset, faces are displayed with full opacity. If set, faces are displayed with a specified degree of opacity from completely opaque to completely transparent.
954 kSpecularFlag = 2 // Apply a specular highlight (indicating reflection and shininess values) to a material that is applied to the faces.
955 };
956
957 //
958 // Edge properties
959 //
960
965 {
966 kNoEdges = 0, // No edges are displayed.
967 kIsolines = 1, // Display isolines.
968 kFacetEdges = 2, // Display facet edges (the edges between neighbouring faces).
969 kTriangulation = 3 // Display edges from triangulation.
970 };
971
976 {
977 kNoEdgeStyle = 0, // No edge styles are applied to the edges.
978 kVisibleFlag = 1, // Visible edges are displayed.
979 kSilhouetteFlag = 2, // Silhouette edges are displayed. A silhouette edge is an edge connecting a back facing polygon with a front facing polygon.
980 kObscuredFlag = 4, // Obscured edges are displayed.
981 kIntersectionFlag = 8 // Intersection edges are displayed.
982 };
983
988 {
989 kNoEdgeModifiers = 0, // No modifiers are applied.
990 kEdgeOverhangFlag = 1, // Allow an edge to overhang its start and end points by a specified amount.
991 kEdgeJitterFlag = 2, // Apply a jitter effect to the edges. The jitter effect is produced by drawing extra lines adjacent to the original line, with a specific amount of perturbation away from the original line.
992 kEdgeWidthFlag = 4, // Apply a width to the edges.
993 kEdgeColorFlag = 8, // Apply a color that differs from the drawable object color to the edges.
994 kEdgeHaloGapFlag = 16, // Apply a halo gap percentage to the edges of an object that is hidden by another object, such that the specified gap is displayed between the edges of the hidden object and the edges of the object which hides it.
995 kAlwaysOnTopFlag = 64, // Force edges to be on top. Edges will not participate in the Z-ordering of the displayed drawables.
996 kEdgeOpacityFlag = 128, // Apply an opacity value to the edges. If unset, edges are displayed with full opacity. If set, edges are displayed with a specified degree of opacity from completely opaque to completely transparent.
997 // New in 2013
998 kEdgeWiggleFlag = 256, // Apply a wiggle value to the edges.
999 kEdgeTextureFlag = 512 // Apply a material textures to the edges.
1000 };
1001
1006 {
1007 kJitterLow = 1, // A small amount of perturbation.
1008 kJitterMedium = 2, // A medium amount of perturbation.
1009 kJitterHigh = 3 // A large amount of perturbation.
1010 };
1011
1016 {
1017 kWiggleLow = 1, // A small amount of perturbation.
1018 kWiggleMedium = 2, // A medium amount of perturbation.
1019 kWiggleHigh = 3 // A large amount of perturbation.
1020 };
1021
1026 {
1027 kSolid = 1, // A solid line pattern is used to display edges.
1028 kDashedLine = 2, // A dashed line pattern is used to display edges.
1029 kDotted = 3, // A dotted line pattern is used to display edges.
1030 kShortDash = 4, // A short dashed line pattern is used to display edges.
1031 kMediumDash = 5, // A medium dashed line pattern is used to display edges.
1032 kLongDash = 6, // A long dashed line pattern is used to display edges.
1033 kDoubleShortDash = 7, // A double short dashed line pattern is used to display edges.
1034 kDoubleMediumDash = 8, // A double medium dashed line pattern is used to display edges.
1035 kDoubleLongDash = 9, // A double long dashed line pattern is used to display edges.
1036 kMediumLongDash = 10, // A medium long dashed line pattern is used to display edges.
1037 kSparseDot = 11 // A sparse dotted line pattern is used to display edges.
1038 };
1039
1040 //
1041 // Display properties
1042 //
1047 {
1048 kNoDisplayStyle = 0, // No display settings are used.
1049 kBackgroundsFlag = 1, // Backgrounds are enabled.
1050 kLightingFlag = 2, // Lights are enabled.
1051 kMaterialsFlag = 4, // Materials are enabled.
1052 kTexturesFlag = 8 // Textures are enabled.
1053 };
1054
1059 {
1060 kShadowsNone = 0, // No shadow is displayed.
1061 kShadowsGroundPlane = 1, // Ground plane shadows are displayed.
1062 kShadowsFull = 2, // Full shadows are displayed.
1063 kShadowsFullAndGround = 3 // Full shadows are displayed along with shadows on the ground plane.
1064 };
1065};
1066
1075{
1077 {
1078 kInvalidOperation = -1, // Invalid operation.
1079 kInherit = 0, // Use the last property value specified.
1080 kSet = 1, // Replace the last property value with the one specified.
1081 kDisable = 2, // Disable the specified bits in the property bitmask.
1082 kEnable = 3 // Enable the specified bits in the property bitmask.
1083 };
1084};
1085
1094class FIRSTDLL_EXPORT OdGiVisualStyle : public OdRxObject
1095{
1096public:
1098
1102 enum Type
1103 {
1104 kFlat, // Flat shaded visual style.
1105 kFlatWithEdges, // Flat shaded visual style with edges displayed.
1106 kGouraud, // Gouraud shaded visual style.
1107 kGouraudWithEdges, // Gouraud shaded visual style with edges displayed.
1108 k2DWireframe, // 2D wireframe visual style (using 2D graphics system).
1109 k3DWireframe, // 3D wireframe visual style (using 3D graphics system).
1110 kHidden, // Hidden visual style.
1111 kBasic, // Basic visual style (default).
1112 kRealistic, // Phong shaded visual style.
1113 kConceptual, // Custom, user defined visual visual style.
1114 kCustom, // Custom, user defined visual visual style.
1115 kDim, // Visual style used for a dimming effect.
1116 kBrighten, // Visual style used for a brightening effect.
1117 kThicken, // Visual style used for a thickening effect.
1118 kLinePattern, // Visual style used to apply a line pattern.
1119 kFacePattern, // Visual style used to apply a face pattern.
1120 kColorChange, // Visual style used to apply a change of color.
1121
1122 kFaceOnly, // Visual style with only face properties. All non-face properties are set to inherit.
1123 kEdgeOnly, // Visual stle with edge properties only. All non-edge properties are set to inherit.
1124 kDisplayOnly, // Visual style with display properties only. All non-display properties are set to inherit.
1125
1126 kJitterOff, // Edge style override visual style with jitter edges off. All other properties are set to inherit.
1127 kOverhangOff, // Edge style override visual style with overhang edges off. All other properties are set to inherit.
1128 kEdgeColorOff, // Edge style override visual style with edge color off. All other properties are set to inherit.
1129 kShadesOfGray, // Shades of gray visual style.
1130 kSketchy, // Sketchy visual style.
1131 kXRay, // Xray visual style.
1132 kShadedWithEdges, // Shade visual style with edges displayed.
1133 kShaded, // Shaded visual style.
1134 kByViewport, // Visual style by viewport.
1135 kByLayer, // Visual style by layer.
1136 kByBlock, // Visual style by block.
1137 kEmptyStyle // Visual style with all properties set to inherit. This effectively creates an empty style upon which a custom visual style can be built.
1138 };
1139
1146
1155 bool operator==(const OdGiVisualStyle& visualStyle) const;
1156
1160 virtual OdGiFaceStyle& faceStyle (void) = 0;
1164 virtual OdGiEdgeStyle& edgeStyle (void) = 0;
1168 virtual OdGiDisplayStyle& displayStyle (void) = 0;
1169
1173 virtual const OdGiFaceStyle& faceStyle (void) const = 0;
1177 virtual const OdGiEdgeStyle& edgeStyle (void) const = 0;
1181 virtual const OdGiDisplayStyle& displayStyle (void) const = 0;
1182
1187 virtual void setFaceStyle (const OdGiFaceStyle& style) = 0;
1192 virtual void setEdgeStyle (const OdGiEdgeStyle& style) = 0;
1197 virtual void setDisplayStyle (const OdGiDisplayStyle& style) = 0;
1198
1206
1207 // New interface
1208
1217 virtual bool setType(Type type) = 0;
1218
1222 virtual Type type() const = 0;
1223
1232
1242 virtual bool setTrait(Property prop, Operation op) = 0;
1243
1254 virtual bool setTrait(Property prop, const OdGiVariant *pVal,
1256
1267 virtual bool setTrait(Property prop, OdInt32 nVal,
1269
1280 virtual bool setTrait(Property prop, bool bVal,
1282
1293 virtual bool setTrait(Property prop, double dVal,
1295
1308 virtual bool setTrait(Property prop, double red, double green, double blue,
1320 virtual bool setTrait(Property prop, const OdCmColorBase &pColor,
1322
1333 virtual bool setTrait(Property prop, const OdCmEntityColor &pColor,
1335
1346 virtual bool setTrait(Property prop, const OdString &pStr,
1348
1358 virtual OdGiVariantPtr trait(Property prop, Operation *pOp = NULL) const = 0;
1359
1368 virtual Operation operation(Property prop) const = 0;
1369
1370
1381 virtual bool setTraitFlag(Property flagProp, OdUInt32 flagVal, bool bEnable = true);
1382
1392 virtual bool traitFlag(Property flagProp, OdUInt32 flagVal) const;
1393
1400private:
1401 void configureForFlat();
1402 void configureForFlatWithEdges();
1403 void configureForGouraud();
1404 void configureForGouraudWithEdges();
1405 void configureForBasic();
1406 void configureFor2DWireframe();
1407 void configureFor3DWireframe();
1408 void configureForHidden();
1409 void configureForRealistic();
1410 void configureForConceptual();
1411 void configureForDim();
1412 void configureForBrighten();
1413 void configureForThicken();
1414 void configureForLinePattern();
1415 void configureForFacePattern();
1416 void configureForColorChange();
1417
1418 // Extended configurations
1419 void configureForFaceOnly();
1420 void configureForEdgeOnly();
1421 void configureForDisplayOnly();
1422
1423 void configureForJitterOff();
1424 void configureForOverhangOff();
1425 void configureForEdgeColorOff();
1426 void configureForShadesOfGray();
1427 void configureForSketchy();
1428 void configureForXRay();
1429 void configureForShadedWithEdges();
1430 void configureForShaded();
1431 void configureForByViewport();
1432 void configureForByLayer();
1433 void configureForByBlock();
1434 void configureForEmptyStyle();
1435
1436 // Extended flags configuration
1437 void configureForAc27(bool b2d = false);
1438
1439 // Clear all changes which is made before
1440 void configureForInit();
1441};
1442
1447
1456{
1457public:
1459
1464 virtual void setOdGiVisualStyle(const OdGiVisualStyle& visualStyle) = 0;
1465
1469 virtual const OdGiVisualStyle& odgiVisualStyle() const = 0;
1470};
1471
1476
1477#include "TD_PackPop.h"
1478
1479#endif //__ODGIVISUALSTYLE_H__
ltype
@ red
Definition FxUIEnum.h:84
OdSmartPtr< OdGiVariant > OdGiVariantPtr
Definition GiVariant.h:415
OdSmartPtr< OdGiEdgeStyle > OdGiEdgeStylePtr
OdSmartPtr< OdGiFaceStyle > OdGiFaceStylePtr
OdSmartPtr< OdGiVisualStyleTraits > OdGiVisualStyleTraitsPtr
OdSmartPtr< OdGiVisualStyle > OdGiVisualStylePtr
OdSmartPtr< OdGiDisplayStyle > OdGiDisplayStylePtr
unsigned int OdUInt32
int OdInt32
#define FIRSTDLL_EXPORT
Definition RootExport.h:39
virtual void setShadowType(ShadowType type)=0
virtual void setDisplaySettings(unsigned long nSettings)=0
OdGiDisplayStyle & operator=(const OdGiDisplayStyle &style)
virtual ShadowType shadowType() const =0
virtual void setDisplaySettingsFlag(DisplaySettings flag, bool bEnable)=0
virtual unsigned long displaySettings() const =0
virtual double brightness() const =0
virtual bool isDisplaySettingsFlagSet(DisplaySettings flag) const =0
virtual void setBrightness(double value)=0
bool operator==(const OdGiDisplayStyle &style) const
ODRX_DECLARE_MEMBERS(OdGiDisplayStyle)
void set(const OdGiDisplayStyle &style)
virtual short silhouetteWidth() const =0
void set(const OdGiEdgeStyle &style)
virtual OdCmColorBase & edgeColor()=0
virtual OdCmColorBase & silhouetteColor()=0
virtual void setIntersectionLinetype(LineType ltype)=0
virtual unsigned long edgeModifiers() const =0
virtual double creaseAngle() const =0
virtual void setIsolines(unsigned short nIsolines)=0
virtual EdgeModel edgeModel() const =0
virtual LineType obscuredLinetype() const =0
virtual void setEdgeModifiers(unsigned long nModifiers)=0
OdGiEdgeStyle & operator=(const OdGiEdgeStyle &style)
virtual void setJitterAmount(JitterAmount amount, bool bEnableModifier)=0
virtual LineType intersectionLinetype() const =0
virtual void setSilhouetteWidth(short nWidth)=0
virtual int haloGap() const =0
virtual void setObscuredColor(const OdCmColorBase &color)=0
virtual JitterAmount jitterAmount() const =0
virtual void setObscuredLinetype(LineType ltype)=0
virtual void setIntersectionColor(const OdCmColorBase &color)=0
virtual void setEdgeWidth(int nWidth, bool bEnableModifier)=0
virtual void setHaloGap(int nHaloGap, bool bEnableModifier)=0
virtual bool isEdgeStyleFlagSet(EdgeStyle flag) const =0
virtual void setEdgeStyleFlag(EdgeStyle flag, bool bEnable)=0
virtual void setEdgeColor(const OdCmColorBase &color, bool bEnableModifier)=0
virtual int edgeWidth() const =0
virtual int overhangAmount() const =0
ODRX_DECLARE_MEMBERS(OdGiEdgeStyle)
virtual void setHidePrecision(bool bHidePrecision)=0
virtual unsigned short isolines() const =0
virtual void setOpacityLevel(double nLevel, bool bEnableModifier)=0
virtual void setWiggleAmount(WiggleAmount amount, bool bEnableModifier)=0
virtual EdgeStyleApply edgeStyleApply() const =0
bool operator==(const OdGiEdgeStyle &style) const
virtual const OdCmColorBase & intersectionColor() const =0
virtual WiggleAmount wiggleAmount() const =0
virtual double opacityLevel() const =0
virtual void setCreaseAngle(double nAngle)=0
virtual const OdCmColorBase & edgeColor() const =0
virtual bool isEdgeModifierFlagSet(EdgeModifier flag) const =0
virtual const OdCmColorBase & silhouetteColor() const =0
virtual void setEdgeStyles(unsigned long nStyles)=0
virtual void setOverhangAmount(int nAmount, bool bEnableModifier)=0
virtual const OdCmColorBase & obscuredColor() const =0
virtual OdCmColorBase & obscuredColor()=0
virtual unsigned long edgeStyles() const =0
virtual void setEdgeStyleApply(EdgeStyleApply apply)=0
virtual void setEdgeModifierFlag(EdgeModifier flag, bool bEnable)=0
virtual OdCmColorBase & intersectionColor()=0
virtual void setEdgeModel(EdgeModel model)=0
virtual void setSilhouetteColor(const OdCmColorBase &color)=0
virtual bool hidePrecision() const =0
virtual void setLightingModel(LightingModel lightingModel)=0
virtual void setMonoColor(const OdCmColorBase &color, bool bEnableMode)=0
virtual void setFaceColorMode(FaceColorMode mode)=0
virtual void setOpacityLevel(double nLevel, bool bEnableModifier)=0
virtual FaceColorMode faceColorMode() const =0
virtual OdCmColorBase & monoColor()=0
virtual void setFaceModifierFlag(FaceModifier flag, bool bEnable)=0
virtual void setSpecularAmount(double nAmount, bool bEnableModifier)=0
virtual LightingModel lightingModel() const =0
void set(const OdGiFaceStyle &style)
bool operator==(const OdGiFaceStyle &style) const
virtual const OdCmColorBase & monoColor() const =0
virtual double opacityLevel() const =0
virtual void setFaceModifiers(unsigned long nModifiers)=0
virtual double specularAmount() const =0
virtual unsigned long faceModifiers() const =0
OdGiFaceStyle & operator=(const OdGiFaceStyle &style)
ODRX_DECLARE_MEMBERS(OdGiFaceStyle)
virtual LightingQuality lightingQuality() const =0
virtual bool isFaceModifierFlagSet(FaceModifier flag) const =0
virtual void setLightingQuality(LightingQuality lightingQuality)=0
OdGiVisualStyle & operator=(const OdGiVisualStyle &visualStyle)
virtual void setFaceStyle(const OdGiFaceStyle &style)=0
virtual bool setTrait(Property prop, bool bVal, Operation op=OdGiVisualStyleOperations::kSet)
virtual const OdGiFaceStyle & faceStyle(void) const =0
void configureForType(Type type)
static OdGiVariant::VariantType propertyType(Property prop)
virtual void setEdgeStyle(const OdGiEdgeStyle &style)=0
virtual bool setTrait(Property prop, double dVal, Operation op=OdGiVisualStyleOperations::kSet)
virtual bool setTrait(Property prop, double red, double green, double blue, Operation op=OdGiVisualStyleOperations::kSet)
bool operator==(const OdGiVisualStyle &visualStyle) const
virtual bool setTrait(Property prop, OdInt32 nVal, Operation op=OdGiVisualStyleOperations::kSet)
virtual const OdGiEdgeStyle & edgeStyle(void) const =0
virtual const OdGiDisplayStyle & displayStyle(void) const =0
virtual bool setTrait(Property prop, Operation op)=0
virtual Type type() const =0
virtual bool setType(Type type)=0
virtual void setDisplayStyle(const OdGiDisplayStyle &style)=0
virtual bool setTrait(Property prop, const OdGiVariant *pVal, Operation op=OdGiVisualStyleOperations::kSet)=0
virtual bool setTrait(Property prop, const OdString &pStr, Operation op=OdGiVisualStyleOperations::kSet)
virtual bool traitFlag(Property flagProp, OdUInt32 flagVal) const
OdGiVisualStyleProperties::Property Property
virtual OdGiDisplayStyle & displayStyle(void)=0
virtual OdGiEdgeStyle & edgeStyle(void)=0
virtual bool setTraitFlag(Property flagProp, OdUInt32 flagVal, bool bEnable=true)
virtual bool setTrait(Property prop, const OdCmEntityColor &pColor, Operation op=OdGiVisualStyleOperations::kSet)
virtual OdGiFaceStyle & faceStyle(void)=0
OdGiVisualStyleOperations::Operation Operation
virtual bool setTrait(Property prop, const OdCmColorBase &pColor, Operation op=OdGiVisualStyleOperations::kSet)
virtual Operation operation(Property prop) const =0
ODRX_DECLARE_MEMBERS(OdGiVisualStyle)
virtual OdGiVariantPtr trait(Property prop, Operation *pOp=NULL) const =0
ODRX_DECLARE_MEMBERS(OdGiVisualStyleTraits)
virtual void setOdGiVisualStyle(const OdGiVisualStyle &visualStyle)=0
virtual const OdGiVisualStyle & odgiVisualStyle() const =0
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