CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
GiShellFaceIterator.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
25
26#ifndef __ODGISHELLFACEITERATOR__
27#define __ODGISHELLFACEITERATOR__
28
29#include "TD_PackPush.h"
30
31
37{
38 const OdGePoint3d* _points;
39 const OdInt32* _faceList;
40public:
42 : _points(0)
43 , _faceList(0)
44 {
45 }
46
47 inline OdGiShellFaceIterator(const OdGePoint3d* points, const OdInt32* faceList)
48 {
49 set(points, faceList);
50 }
51
52 inline void set(const OdGePoint3d* points, const OdInt32* faceList)
53 {
54 _points = points;
55 _faceList = faceList;
56 }
57
58 inline const OdInt32* faceListPos() { return _faceList; }
59
60 inline const OdGePoint3d& operator *() const
61 {
62 return _points[*_faceList];
63 }
64 inline operator const OdGePoint3d*() const
65 {
66 return _points + (*_faceList);
67 }
68 inline const OdGePoint3d* operator ->() const
69 {
70 return _points + *_faceList;
71 }
72 inline const OdGePoint3d &operator [](int n) const
73 {
74 return _points[_faceList[n]];
75 }
77 {
78 ++_faceList;
79 return *this;
80 }
82 {
83 OdGiShellFaceIterator res(*this);
84 ++_faceList;
85 return res;
86 }
88 {
89 --_faceList;
90 return *this;
91 }
93 {
94 OdGiShellFaceIterator res(*this);
95 --_faceList;
96 return res;
97 }
99 {
100 _faceList+=n;
101 return *this;
102 }
104 {
105 _faceList-=n;
106 return *this;
107 }
108 inline OdGiShellFaceIterator operator + (const int n) const
109 {
110 OdGiShellFaceIterator res(*this);
111 res+=n;
112 return res;
113 }
114 inline OdGiShellFaceIterator operator - (const int n) const
115 {
116 OdGiShellFaceIterator res(*this);
117 res-=n;
118 return res;
119 }
120 inline bool operator < (const OdGiShellFaceIterator& op) const
121 {
122 return _faceList < op._faceList;
123 }
124 inline bool operator < (const OdInt32* op) const
125 {
126 return _faceList < op;
127 }
128};
129
130#include "TD_PackPop.h"
131
132#endif // __ODGISHELLFACEITERATOR__
int OdInt32
bool operator<(const OdGiShellFaceIterator &op) const
const OdInt32 * faceListPos()
OdGiShellFaceIterator & operator++()
const OdGePoint3d & operator*() const
OdGiShellFaceIterator operator-(const int n) const
OdGiShellFaceIterator & operator--()
const OdGePoint3d & operator[](int n) const
void set(const OdGePoint3d *points, const OdInt32 *faceList)
OdGiShellFaceIterator(const OdGePoint3d *points, const OdInt32 *faceList)
OdGiShellFaceIterator operator+(const int n) const
OdGiShellFaceIterator & operator-=(const int n)
OdGiShellFaceIterator & operator+=(const int n)
const OdGePoint3d * operator->() const