CFx SDK Documentation  2023 SP0
AEC2dSectionHatchRegion.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 
24 #ifndef __AEC2DSECTIONHATCHREGION_H__
25 #define __AEC2DSECTIONHATCHREGION_H__
26 
27 #include "Subobjects/AECImpObj.h"
29 
35 class AECBASE_API AEC2dSectionHatchRegion : public AECImpObj
36 {
38 
39  public:
43  enum ApplyTo
44  {
45  eSurfaceHatchOnly = 1,
46  eSectionHatchOnly = 2,
47  eSurfaceAndSectionHatch = eSurfaceHatchOnly | eSectionHatchOnly,
48  eEdgeLineworkOnly = 4,
49  eAllLinework = eSurfaceHatchOnly | eSectionHatchOnly | eEdgeLineworkOnly
50  };
51 
55  enum Purpose
56  {
57  eLimit = 0,
58  eErase = 1
59  };
60 
61  public:
65  OdUInt32 GetIndex() const;
66 
70  void SetIndex( OdUInt32 iIndex );
71 
76 
80  void SetApplyTo( ApplyTo eApplyTo );
81 
89 
96  void SetPurpose( Purpose ePurpose );
97 
102 
108 
114 
120 
126 
132 
137 
141  void AddMaterial( const OdDbObjectId& idMaterial );
142 
146  void RemoveMaterial( const OdDbObjectId& idMaterial );
147 
151  bool IsAppliedTo( const OdDbObjectId& idMaterial ) const;
152 
153  protected:
154  union Flags
155  {
157  struct
158  {
159 #ifdef ODA_BIGENDIAN
160  OdUInt32 uUnknown01 : 26;
161  OdUInt32 ePurpose : 1;
162  OdUInt32 bApplyToSectionShrinkwrapHatching : 1;
163  OdUInt32 bApplyToSectionShrinkwrapLinework : 1;
164  OdUInt32 eApplyTo : 3;
165 #else
171 #endif
172  } m_bBits;
173  };
174 
175  protected:
176  // Hatch region index.
178 
179  // Flags.
181 
182  // Material boundary.
184 
185  // Materials.
186  std::vector<OdDbHardPointerId> m_aMaterials;
187 };
188 
191 
192 #endif //__AEC2DSECTIONHATCHREGION_H__
OdSmartPtr< AEC2dSectionHatchRegion > AEC2dSectionHatchRegionPtr
AECSubPtr< AEC2dSectionHatchRegion > AEC2dSectionHatchRegionSubPtr
#define AEC_DECLARE_MEMBERS(ClassName)
Definition: AECMacros.h:54
unsigned int OdUInt32
AECGeProfileSubPtr GetBoundary() const
bool IsAppliedTo(const OdDbObjectId &idMaterial) const
bool IsAppliedToSectionShrinkwrapLinework() const
void SetIsAppliedToSectionShrinkwrapHatching(bool bApplied)
OdUInt32 GetIndex() const
bool IsAppliedToSectionShrinkwrapHatching() const
OdDbObjectId GetMaterialByIndex(OdUInt32 iIndex) const
void RemoveMaterial(const OdDbObjectId &idMaterial)
std::vector< OdDbHardPointerId > m_aMaterials
OdUInt32 GetMaterialCount() const
Purpose GetPurpose() const
void SetApplyTo(ApplyTo eApplyTo)
void SetIndex(OdUInt32 iIndex)
ApplyTo GetApplyTo() const
void SetIsAppliedToSectionShrinkwrapLinework(bool bApplied)
void AddMaterial(const OdDbObjectId &idMaterial)
void SetPurpose(Purpose ePurpose)