CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
Gi.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 _OD_GI_H_
25#define _OD_GI_H_
26
27#include "RxObject.h"
28#include "CmColorBase.h"
29#include "GiAuxData.h"
30
31class OdDbStub;
32class OdCmEntityColor;
33class OdGeVector3d;
34class OdGiMapper;
37class OdGiFill;
39class OdGiPalette;
40
44typedef enum
45{
46 kOdGiFillAlways = 1, // Always fill closed graphic primitives.
47 kOdGiFillNever = 2 // Never fill closed graphic primitives.
49
53typedef enum
54{
55 kOdGiInvisible = 0, // Invisible
56 kOdGiVisible = 1, // Visible
57 kOdGiSilhouette = 2, // Silhouette edge
58 kOdGiJoint = 4 // Joint open silhouette edge
60
61#include "TD_PackPush.h"
62
84
103{
104public:
105
110 {
111 kNoDrawFlags = 0x0000, // Default value. No DrawFlags specified.
112 kDrawBackfaces = 0x0001, // Forces backfaces vectorization.
113 kDrawHatchGroup = 0x0002, // Next shells and meshes should draw hatches.
114 kDrawFrontfacesOnly = 0x0004, // Forces discard backfaces mode.
115 kDrawGradientFill = 0x0008, // Draws with gradient fill.
116 kDrawSolidFill = 0x0010, // Draws with solid fill.
117 kDrawNoLineWeight = 0x0020, // Disables lineweight.
118 kDrawNoPlotstyle = 0x0080, // Disables plotstyles.
119 // the range before 0x8000 is reserved.
120 kDrawContourFill = 0x08000, // Specific to DGN files.
121 kDisableLayoutCache = 0x10000, // Disable metafile caching for layout switching.
122 kDrawBoundaryForClipping = 0x20000, // Draw (rough) boundary of object to be checked
123 // when clipping is performed, set by vectorizer.
124 kDrawBoundaryForClippingDrw = 0x40000, // Draw (rough) boundary of object to be checked
125 // when clipping is performed, set by a drawable.
127 kDrawPolygonFill = 0x100000, // Fill in all modes if FillAlways mode enabled.
128 kExcludeFromViewExt = 0x200000, // Don't use extents of the entity when calculating total extents.
129 kDrawDgLsPolyWithoutBreaks = 0x400000, // Draw polylines/polygons with Dgn Line Style without segmentation.
130 kPolygonProcessing = 0x800000, // Polygon filling logic must be applied for shell primitive.
131 kDisableAutoGenerateNormals = 0x1000000, // Avoid automatic generation of normals for mesh/shell primitives.
132 kDisableFillModeCheck = 0x2000000, // Avoid checking of OdGiContext::fillMode during filling of geometry primitives.
133 kDrawUnderlayReference = 0x4000000, // Draw underlay reference object.
134 kLineStyleScaleOverride = 0x8000000, // Doesn't multiply current line scale to byBlock line scale. Only for multiplyByBlockLinetypeScales mode.
135 kDisableDisplayClipping = 0x10000000, // Disable display clipping
136 kRegenTypeDependent2dDraw = 0x20000000, // Specific for spamodeler. Draw edges as polyline created by points generated by the faceter
138//FELIX_CHANGE_BEGIN
140 kFxNoFillOnSelect = 0x40000000,
141//FELIX_CHANGE_END
142 // Flags which can be inherited by nested drawables.
145 };
146
151 {
152 kNoLockFlags = 0x00000000, // No lock flags are used.
153 kLockColors = 0x00000001, // Lock colors.
154 kLockLineWeight = 0x00000002, // Lock lineweight.
155 kLockLineType = 0x00000004, // Lock linetype.
156 kLockLineTypeScale = 0x00000008, // Lock linetype scale.
157 kLockLayer = 0x00000010, // Lock layer.
158 kLockByBlockLayer = 0x00000020, // Lock the ByBlock layer.
159 kKeepAuxDataAndLockFlags = 0x00000040, // Keep auxiliary data and lock flags.
161 };
162
167 {
168 kShadowsCastAndReceive = 0, // Geometry could cast and receive shadows.
169 kShadowsDoesNotCast = 1, // Geometry doesn't cast shadows.
170 kShadowsDoesNotReceive = 2, // Geometry doesn't receive shadows.
171 kShadowsIgnore = kShadowsDoesNotCast | kShadowsDoesNotReceive // Geometry doesn't cast and receive shadows.
172 };
173
178 {
179 kNoSelectionFlags = 0, // No selection flags set.
180 kSelectionIgnore = 1, // Avoid geometry selection.
181 kHighlightingGeometry = 2, // Geometry drawn only in case if entire entity highlighted.
182 kHiddenInHighlight = 4 // Geometry hidden only in case if entire entity highlighted.
183//FELIX_CHANGE_BEGIN
184 ,
185#ifdef XENON
186 kFxDrawWhenSelected = 0x08, // XENON: Geometry drawn only when entity is selected
187 kFxSkipDrawWhenSelected = 0x10, // XENON: Geometry hidden when entity is selected
188#endif
189 kFxSubentitySelection = 0x80 // Selection geometry for subentity selection only.
190//FELIX_CHANGE_END
191 };
192
197 {
198 kHint2DAttributes = 1, // Setup attributes only available in 2DWireframe mode (plotStyles and etc.).
199 kHint3DAttributes = 2, // Setup attributes only available in shaded modes (materials and etc.).
200 kHintAllAttributes = kHint2DAttributes | kHint3DAttributes, // Setup attributes that available in both 2D and 3D modes.
201 kHintSnapModeOn = 4, // Setup that we currently inside selection for snap method.
202 kHintDefaultState = kHintAllAttributes // Default setup flag for the attributes.
203 };
204public:
206
231 virtual void setColor(
232 OdUInt16 color) = 0;
233
241 virtual void setTrueColor(
242 const OdCmEntityColor& color) = 0;
243
250 virtual void setLayer(
251 OdDbStub* layerId) = 0;
252
259 virtual void setLineType(
260 OdDbStub* lineTypeId) = 0;
261
266 virtual void setSelectionMarker(
267 OdGsMarker selectionMarker) = 0;
268
289 virtual void setFillType(
291
301 virtual void setFillPlane(
302 const OdGeVector3d* pNormal = 0);
303
311 virtual void setLineWeight(
313
320 virtual void setLineTypeScale(
321 double lineTypeScale = 1.0) = 0;
322
327 virtual void setThickness(
328 double thickness) = 0;
329
349 virtual void setPlotStyleName(
351 OdDbStub* plotStyleNameId = 0) = 0;
352
359 virtual void setMaterial(
360 OdDbStub* materialId) = 0;
361
368 virtual void setMapper(
369 const OdGiMapper *pMapper) = 0;
370
377 virtual void setVisualStyle(
378 const OdDbStub* visualStyleId);
379
389 virtual void setTransparency(
391
397 virtual void setDrawFlags(
399
405 virtual void setLockFlags(
407
415 virtual void setSelectionGeom(
416 bool bSelectionFlag);
417
425 virtual void setShadowFlags(
427
435 virtual void setSectionable(
436 bool bSectionableFlag);
437
443 virtual void setSelectionFlags(
445
472 virtual OdUInt16 color() const = 0;
473
485 virtual OdCmEntityColor trueColor() const = 0;
486
495 virtual OdDbStub* layer() const = 0;
496
505 virtual OdDbStub* lineType() const = 0;
506
526 virtual OdGiFillType fillType() const = 0;
527
540 virtual bool fillPlane(
541 OdGeVector3d& normal);
542
551 virtual OdDb::LineWeight lineWeight() const = 0;
552
561 virtual double lineTypeScale() const = 0;
562
569 virtual double thickness() const = 0;
570
586
593 virtual OdDbStub* plotStyleNameId() const = 0;
594
603 virtual OdDbStub* material() const = 0;
604
613 virtual const OdGiMapper* mapper() const = 0;
614
623 virtual OdDbStub* visualStyle() const;
624
636
643 virtual OdUInt32 drawFlags() const;
644
651 virtual OdUInt32 lockFlags() const;
652
661 virtual bool selectionGeom() const;
662
671 virtual ShadowFlags shadowFlags() const;
672
681 virtual bool sectionable() const;
682
690
691 // Specific to DGN files
692
699 const OdCmEntityColor& color);
700
708
715 const OdGiDgLinetypeModifiers* pLSMod);
716
724
725 // eof Specific to DGN files section
726
732 virtual void setFill(
733 const OdGiFill* pFill);
734
741 virtual const OdGiFill* fill() const;
742
748 virtual void setAuxData(
749 const OdGiAuxiliaryDataPtr& pAuxData);
750
758
765 virtual bool pushLineweightOverride(const OdGiLineweightOverride* pOverride);
766
770 virtual void popLineweightOverride();
771
777 virtual bool pushPaletteOverride(const OdGiPalette* pOverride);
778
782 virtual void popPaletteOverride();
783
791 virtual OdUInt32 setupForEntity() const;
792
803 virtual void addLight(
804 const OdDbStub* lightId);
805};
806
811
812#include "TD_PackPop.h"
813
814#endif //_OD_GI_H_
OdGiFillType
Definition Gi.h:45
@ kOdGiFillAlways
Definition Gi.h:46
@ kOdGiFillNever
Definition Gi.h:47
OdGiVisibility
Definition Gi.h:54
@ kOdGiSilhouette
Definition Gi.h:57
@ kOdGiInvisible
Definition Gi.h:55
@ kOdGiVisible
Definition Gi.h:56
@ kOdGiJoint
Definition Gi.h:58
OdSmartPtr< OdGiSubEntityTraits > OdGiSubEntityTraitsPtr
Definition Gi.h:810
OdSmartPtr< OdGiAuxiliaryData > OdGiAuxiliaryDataPtr
Definition GiAuxData.h:95
ptrdiff_t OdGsMarker
unsigned int OdUInt32
unsigned short OdUInt16
#define FIRSTDLL_EXPORT
Definition RootExport.h:39
ODRX_DECLARE_MEMBERS(OdGiDrawableTraits)
virtual void setAuxData(const OdGiAuxiliaryDataPtr &pAuxData)
virtual void setLayer(OdDbStub *layerId)=0
virtual OdUInt16 color() const =0
virtual OdDbStub * material() const =0
virtual void setFillPlane(const OdGeVector3d *pNormal=0)
virtual OdDb::PlotStyleNameType plotStyleNameType() const =0
virtual void setFill(const OdGiFill *pFill)
virtual void setLineType(OdDbStub *lineTypeId)=0
virtual bool pushPaletteOverride(const OdGiPalette *pOverride)
virtual const OdGiFill * fill() const
virtual OdGiFillType fillType() const =0
virtual void setSectionable(bool bSectionableFlag)
virtual void setLockFlags(OdUInt32 lockFlags)
virtual void setLineTypeScale(double lineTypeScale=1.0)=0
virtual bool sectionable() const
virtual OdUInt32 setupForEntity() const
virtual void setShadowFlags(ShadowFlags shadowFlags)
virtual OdGiAuxiliaryDataPtr auxData() const
virtual void setMapper(const OdGiMapper *pMapper)=0
virtual void popLineweightOverride()
virtual const OdGiDgLinetypeModifiers * lineStyleModifiers() const
virtual SelectionFlags selectionFlags() const
virtual void setLineWeight(OdDb::LineWeight lineWeight)=0
virtual void setVisualStyle(const OdDbStub *visualStyleId)
ODRX_DECLARE_MEMBERS(OdGiSubEntityTraits)
virtual void popPaletteOverride()
virtual void setSelectionFlags(SelectionFlags selectionFlags)
virtual void setLineStyleModifiers(const OdGiDgLinetypeModifiers *pLSMod)
virtual void setSelectionMarker(OdGsMarker selectionMarker)=0
virtual void setColor(OdUInt16 color)=0
@ kDrawFrontfacesOnly
Definition Gi.h:114
@ kInheritableDrawFlags
Definition Gi.h:143
@ kLineStyleScaleOverride
Definition Gi.h:134
@ kDisableFillModeCheck
Definition Gi.h:132
@ kDisableLayoutCache
Definition Gi.h:121
@ kExcludeFromViewExt
Definition Gi.h:128
@ kDrawUnderlayReference
Definition Gi.h:133
@ kDisableAutoGenerateNormals
Definition Gi.h:131
@ kDisableDisplayClipping
Definition Gi.h:135
@ kDrawBoundaryForClipping
Definition Gi.h:122
@ kDrawBoundaryForClippingDrw
Definition Gi.h:124
@ kRegenTypeDependent2dDraw
Definition Gi.h:136
@ kDrawGeometryForExtents
Definition Gi.h:139
@ kDrawDgLsPolyWithoutBreaks
Definition Gi.h:129
virtual double lineTypeScale() const =0
virtual void setPlotStyleName(OdDb::PlotStyleNameType plotStyleNameType, OdDbStub *plotStyleNameId=0)=0
virtual OdUInt32 drawFlags() const
virtual OdCmTransparency transparency() const
virtual void setTrueColor(const OdCmEntityColor &color)=0
virtual const OdGiMapper * mapper() const =0
virtual OdCmEntityColor trueColor() const =0
@ kHighlightingGeometry
Definition Gi.h:181
@ kFxSubentitySelection
Definition Gi.h:189
virtual ShadowFlags shadowFlags() const
virtual bool fillPlane(OdGeVector3d &normal)
virtual void addLight(const OdDbStub *lightId)
virtual OdDbStub * plotStyleNameId() const =0
virtual void setDrawFlags(OdUInt32 drawFlags)
@ kShadowsCastAndReceive
Definition Gi.h:168
@ kShadowsDoesNotCast
Definition Gi.h:169
@ kShadowsDoesNotReceive
Definition Gi.h:170
virtual void setSelectionGeom(bool bSelectionFlag)
virtual OdDbStub * visualStyle() const
virtual void setThickness(double thickness)=0
virtual OdDbStub * layer() const =0
virtual OdDbStub * lineType() const =0
virtual OdCmEntityColor secondaryTrueColor() const
virtual void setSecondaryTrueColor(const OdCmEntityColor &color)
virtual void setFillType(OdGiFillType fillType)=0
virtual OdUInt32 lockFlags() const
virtual void setMaterial(OdDbStub *materialId)=0
virtual bool selectionGeom() const
virtual OdDb::LineWeight lineWeight() const =0
virtual double thickness() const =0
virtual void setTransparency(const OdCmTransparency &transparency)
@ kKeepAuxDataAndLockFlags
Definition Gi.h:159
@ kInheritableLockFlags
Definition Gi.h:160
virtual bool pushLineweightOverride(const OdGiLineweightOverride *pOverride)
PlotStyleNameType
Definition OdaDefs.h:417
LineWeight
Definition OdaDefs.h:386