CFx SDK Documentation  2023 SP0
AECMeshFace.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 __AECMESHFACE_H__
25 #define __AECMESHFACE_H__
26 
27 #include "AECIndexList.h"
28 #include <Ge/GePlane.h>
29 #include <Gi/Gi.h>
30 
34 namespace AECGe
35 {
36 
37 class Mesh;
38 
40 // Obsolete struct.
41 struct EdgeData
42 {
46  {
47  iVertex = 0;
49  }
50 
54  {
55  iVertex = iV;
57  }
58 
62  {
63  iVertex = iV;
64  eVisibility = eV;
65  }
66 
69 };
70 
72 // Obsolete class. Since Teighaź Architecture 2.4.0 Face is used instead.
73 class AECGEOMETRY_API MeshFace
74 {
75  public:
80 
84  MeshFace( const IndexList& ilList,
85  OdGiVisibility eVisibility = kOdGiVisible );
86 
90  const OdGePlane& GetPlane() const;
91 
98  bool UpdatePlane( const Mesh& mOwner );
99 
103  void Invert();
104 
108  double GetArea( const Mesh& mOwner ) const;
109 
113  bool IsVisible() const;
114 
118  void SetVisible( bool bVisible );
119 
123  OdUInt32 GetSize() const;
124 
128  void SetSize( OdUInt32 iSize );
129 
133  OdUInt32 GetAt( OdUInt32 iIndex ) const;
134 
138  void SetAt( OdUInt32 iIndex, OdUInt32 iVertex );
139 
144 
148  void SetVisibilityAt( OdUInt32 iIndex, OdGiVisibility eVisibility );
149 
153  void Add( OdUInt32 iVertex,
154  OdGiVisibility eVisibility = kOdGiVisible );
155 
159  void Add( const IndexList& ilVertices,
160  OdGiVisibility eVisibility = kOdGiVisible );
161 
165  void Insert( OdUInt32 iPosition, OdUInt32 iVertex,
166  OdGiVisibility eVisibility = kOdGiVisible );
167 
171  void Clear();
172 
173  protected:
175  // Sets face`s plane.
176  //void SetPlane( const OdGePlane& plane );
177 
179  // Internal field.
180  // Used only during boolean operation.
182 
183  private:
184  // Plane this face lies on.
185  OdGePlane m_pPlane;
186 
187  // Visibility flag.
188  bool m_bVisible;
189 
190  // Edge data.
191  std::vector<EdgeData> m_aEdges;
192 
193  friend class Mesh;
194  friend class SubMesh;
195  friend class Simplificator;
196 };
197 
198 }
199 
200 #endif //__AECMESHFACE_H__
OdGiVisibility
Definition: Gi.h:46
@ kOdGiVisible
Definition: Gi.h:48
unsigned int OdUInt32
int OdInt32
void Add(const IndexList &ilVertices, OdGiVisibility eVisibility=kOdGiVisible)
bool IsVisible() const
OdGiVisibility GetVisibilityAt(OdUInt32 iIndex) const
void Add(OdUInt32 iVertex, OdGiVisibility eVisibility=kOdGiVisible)
void SetAt(OdUInt32 iIndex, OdUInt32 iVertex)
OdUInt32 GetSize() const
double GetArea(const Mesh &mOwner) const
MeshFace(const IndexList &ilList, OdGiVisibility eVisibility=kOdGiVisible)
void Insert(OdUInt32 iPosition, OdUInt32 iVertex, OdGiVisibility eVisibility=kOdGiVisible)
void SetVisibilityAt(OdUInt32 iIndex, OdGiVisibility eVisibility)
void SetVisible(bool bVisible)
OdInt32 Tag
DOM.
Definition: AECMeshFace.h:181
bool UpdatePlane(const Mesh &mOwner)
OdUInt32 GetAt(OdUInt32 iIndex) const
void SetSize(OdUInt32 iSize)
const OdGePlane & GetPlane() const
DOM.
Definition: AECMesh.h:41
OdUInt32 iVertex
Definition: AECMeshFace.h:67
OdGiVisibility eVisibility
Definition: AECMeshFace.h:68
EdgeData(OdUInt32 iV)
Definition: AECMeshFace.h:53
EdgeData(OdUInt32 iV, OdGiVisibility eV)
Definition: AECMeshFace.h:61