CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Gi.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_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
41typedef enum
42{
43 kOdGiFillAlways = 1, // Always fill closed graphic primitives.
44 kOdGiFillNever = 2 // Never fill closed graphic primitives.
46
47typedef enum
48{
49 kOdGiInvisible = 0, // Invisible
50 kOdGiVisible = 1, // Visible
51 kOdGiSilhouette = 2 // Silhouette edge
53
54#include "TD_PackPush.h"
55
73{
74public:
76};
77
96{
97public:
98
103 {
104 kNoDrawFlags = 0x0000, // Default value. No DrawFlags specified.
105 kDrawBackfaces = 0x0001, // Forces backfaces vectorization.
106 kDrawHatchGroup = 0x0002, // Next shells and meshes should draw hatches.
107 kDrawFrontfacesOnly = 0x0004, // Forces discard backfaces mode.
108 kDrawGradientFill = 0x0008, // Draws with gradient fill.
109 kDrawSolidFill = 0x0010, // Draws with solid fill.
110 kDrawNoLineWeight = 0x0020, // Disables lineweight.
111 kDrawNoPlotstyle = 0x0080, // Disables plotstyles.
112 // the range before 0x8000 is reserved.
113 kDrawContourFill = 0x08000, // Specific to DGN files.
114 kDisableLayoutCache = 0x10000, // Disable metafile caching for layout switching.
115 kDrawBoundaryForClipping = 0x20000, // Draw (rough) boundary of object to be checked
116 // when clipping is performed, set by vectorizer.
117 kDrawBoundaryForClippingDrw = 0x40000, // Draw (rough) boundary of object to be checked
118 // when clipping is performed, set by a drawable.
119 kClipSetIsEmpty = 0x80000,
120 kDrawPolygonFill = 0x100000, // Fill in all modes if FillAlways mode enabled.
121 kExcludeFromViewExt = 0x200000, // Don't use extents of the entity when calculating total extents.
122 kDrawDgLsPolyWithoutBreaks = 0x400000, // Draw polylines/polygons with Dgn Line Style without segmentation.
123 kPolygonProcessing = 0x800000, // Polygon filling logic must be applied for shell primitive.
124 kDisableAutoGenerateNormals = 0x1000000, // Avoid automatic generation of normals for mesh/shell primitives.
125 kDisableFillModeCheck = 0x2000000, // Avoid checking of OdGiContext::fillMode during filling of geometry primitives.
126 kDrawUnderlayReference = 0x4000000, // Draw underlay reference object.
127 kLineStyleScaleOverride = 0x8000000, // Doesn't multiply current line scale to byBlock line scale. Only for multiplyByBlockLinetypeScales mode.
128 kDisableDisplayClipping = 0x10000000, // Disable display clipping
129 kRegenTypeDependent2dDraw = 0x20000000, // Specific for spamodeler. Draw edges as polyline created by points generated by the faceter
130 kInternalDrawFlags = kDisableLayoutCache | kClipSetIsEmpty | kRegenTypeDependent2dDraw,
131//FELIX_CHANGE_BEGIN
132#ifdef XENON
133 /*
134 kDrawOnHighlight = 0x08000000,
135 kSkipDrawOnHighlight = 0x10000000,
136 kDrawOnSelection = 0x20000000,
137 kSkipDrawOnSelection = 0x40000000,
138 kXenonFlags = kDrawOnHighlight | kSkipDrawOnHighlight | kDrawOnSelection | kSkipDrawOnSelection,
139 // All bits used! 0x80000000 is used internally to save/restore traits
140 */
141#else
142 kDrawGeometryForExtents = 0x04000,
143 kFxNoFillOnSelect = 0x40000000,
144#endif
145//FELIX_CHANGE_END
146 // Flags which can be inherited by nested drawables.
147 kInheritableDrawFlags = kDrawNoLineWeight | kDrawNoPlotstyle | kDrawBoundaryForClipping | kDrawBoundaryForClippingDrw |
148 kInternalDrawFlags | kExcludeFromViewExt | kDrawBackfaces | kDrawFrontfacesOnly | kDisableDisplayClipping | kRegenTypeDependent2dDraw
149//FELIX_CHANGE_BEGIN
150#ifdef XENON
151 //| kXenonFlags
152#endif
153//FELIX_CHANGE_END
154 };
155
160 {
161 kNoLockFlags = 0x00000000, // No lock flags are used.
162 kLockColors = 0x00000001, // Lock colors.
163 kLockLineWeight = 0x00000002, // Lock lineweight.
164 kLockLineType = 0x00000004, // Lock linetype.
165 kLockLineTypeScale = 0x00000008, // Lock linetype scale.
166 kLockLayer = 0x00000010, // Lock layer.
167 kLockByBlockLayer = 0x00000020, // Lock the ByBlock layer.
168 kKeepAuxDataAndLockFlags = 0x00000040, // Keep auxiliary data and lock flags.
169 kInheritableLockFlags = kLockColors | kLockLineWeight | kLockLineType | kLockLineTypeScale | kLockLayer | kKeepAuxDataAndLockFlags // Inherited lock flags.
170 };
171
176 {
177 kShadowsCastAndReceive = 0, // Geometry could cast and receive shadows.
178 kShadowsDoesNotCast = 1, // Geometry doesn't cast shadows.
179 kShadowsDoesNotReceive = 2, // Geometry doesn't receive shadows.
180 kShadowsIgnore = kShadowsDoesNotCast | kShadowsDoesNotReceive // Geometry doesn't cast and receive shadows.
181 };
182
187 {
188 kNoSelectionFlags = 0, // No selection flags set.
189 kSelectionIgnore = 1, // Avoid geometry selection.
190 kHighlightingGeometry = 2, // Geometry drawn only in case if entire entity highlighted.
191 kHiddenInHighlight = 4 // Geometry hidden only in case if entire entity highlighted.
192//FELIX_CHANGE_BEGIN
194 kFxSubentitySelection = 0x80 // Selection geometry for subentity selection only.
195//FELIX_CHANGE_END
196 };
197
202 {
203 kHint2DAttributes = 1, // Setup attributes only available in 2DWireframe mode (plotStyles and etc.).
204 kHint3DAttributes = 2, // Setup attributes only available in shaded modes (materials and etc.).
205 kHintAllAttributes = kHint2DAttributes | kHint3DAttributes, // Setup attributes that available in both 2D and 3D modes.
206 kHintSnapModeOn = 4, // Setup that we currently inside selection for snap method.
207 kHintDefaultState = kHintAllAttributes // Default setup flag for the attributes.
208 };
209public:
211
236 virtual void setColor(
237 OdUInt16 color) = 0;
238
246 virtual void setTrueColor(
247 const OdCmEntityColor& color) = 0;
248
255 virtual void setLayer(
256 OdDbStub* layerId) = 0;
257
264 virtual void setLineType(
265 OdDbStub* lineTypeId) = 0;
266
271 virtual void setSelectionMarker(
272 OdGsMarker selectionMarker) = 0;
273
294 virtual void setFillType(
295 OdGiFillType fillType) = 0;
296
306 virtual void setFillPlane(
307 const OdGeVector3d* pNormal = 0);
308
316 virtual void setLineWeight(
317 OdDb::LineWeight lineWeight) = 0;
318
325 virtual void setLineTypeScale(
326 double lineTypeScale = 1.0) = 0;
327
332 virtual void setThickness(
333 double thickness) = 0;
334
354 virtual void setPlotStyleName(
355 OdDb::PlotStyleNameType plotStyleNameType,
356 OdDbStub* plotStyleNameId = 0) = 0;
357
364 virtual void setMaterial(
365 OdDbStub* materialId) = 0;
366
373 virtual void setMapper(
374 const OdGiMapper *pMapper) = 0;
375
382 virtual void setVisualStyle(
383 const OdDbStub* visualStyleId);
384
394 virtual void setTransparency(
395 const OdCmTransparency &transparency);
396
402 virtual void setDrawFlags(
403 OdUInt32 drawFlags);
404
410 virtual void setLockFlags(
411 OdUInt32 lockFlags);
412
420 virtual void setSelectionGeom(
421 bool bSelectionFlag);
422
430 virtual void setShadowFlags(
431 ShadowFlags shadowFlags);
432
440 virtual void setSectionable(
441 bool bSectionableFlag);
442
448 virtual void setSelectionFlags(
449 SelectionFlags selectionFlags);
450
477 virtual OdUInt16 color() const = 0;
478
490 virtual OdCmEntityColor trueColor() const = 0;
491
500 virtual OdDbStub* layer() const = 0;
501
510 virtual OdDbStub* lineType() const = 0;
511
531 virtual OdGiFillType fillType() const = 0;
532
545 virtual bool fillPlane(
546 OdGeVector3d& normal);
547
556 virtual OdDb::LineWeight lineWeight() const = 0;
557
566 virtual double lineTypeScale() const = 0;
567
574 virtual double thickness() const = 0;
575
591
598 virtual OdDbStub* plotStyleNameId() const = 0;
599
608 virtual OdDbStub* material() const = 0;
609
618 virtual const OdGiMapper* mapper() const = 0;
619
628 virtual OdDbStub* visualStyle() const;
629
641
648 virtual OdUInt32 drawFlags() const;
649
656 virtual OdUInt32 lockFlags() const;
657
666 virtual bool selectionGeom() const;
667
676 virtual ShadowFlags shadowFlags() const;
677
686 virtual bool sectionable() const;
687
695
696 // Specific to DGN files
697
704 const OdCmEntityColor& color);
705
713
720 const OdGiDgLinetypeModifiers* pLSMod);
721
729
730 // eof Specific to DGN files section
731
737 virtual void setFill(
738 const OdGiFill* pFill);
739
746 virtual const OdGiFill* fill() const;
747
753 virtual void setAuxData(
754 const OdGiAuxiliaryDataPtr& pAuxData);
755
763
770 virtual bool pushLineweightOverride(const OdGiLineweightOverride* pOverride);
771
775 virtual void popLineweightOverride();
776
782 virtual bool pushPaletteOverride(const OdGiPalette* pOverride);
783
787 virtual void popPaletteOverride();
788
796 virtual OdUInt32 setupForEntity() const;
797
808 virtual void addLight(
809 const OdDbStub* lightId);
810};
811
816
817#include "TD_PackPop.h"
818
819#endif //_OD_GI_H_
@ kSelectionIgnore
Definition: BrEnums.h:156
OdGiFillType
Definition: Gi.h:42
@ kOdGiFillAlways
Definition: Gi.h:43
@ kOdGiFillNever
Definition: Gi.h:44
OdGiVisibility
Definition: Gi.h:48
@ kOdGiSilhouette
Definition: Gi.h:51
@ kOdGiInvisible
Definition: Gi.h:49
@ kOdGiVisible
Definition: Gi.h:50
OdSmartPtr< OdGiSubEntityTraits > OdGiSubEntityTraitsPtr
Definition: Gi.h:815
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
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
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)
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)
virtual bool pushLineweightOverride(const OdGiLineweightOverride *pOverride)
PlotStyleNameType
Definition: OdaDefs.h:417
LineWeight
Definition: OdaDefs.h:386