CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GiShellFaceIterator.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
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 }
73 {
74 ++_faceList;
75 return *this;
76 }
78 {
79 OdGiShellFaceIterator res(*this);
80 ++_faceList;
81 return res;
82 }
84 {
85 --_faceList;
86 return *this;
87 }
89 {
90 OdGiShellFaceIterator res(*this);
91 --_faceList;
92 return res;
93 }
95 {
96 _faceList+=n;
97 return *this;
98 }
100 {
101 _faceList-=n;
102 return *this;
103 }
104 inline OdGiShellFaceIterator operator + (const int n) const
105 {
106 OdGiShellFaceIterator res(*this);
107 res+=n;
108 return res;
109 }
110 inline OdGiShellFaceIterator operator - (const int n) const
111 {
112 OdGiShellFaceIterator res(*this);
113 res-=n;
114 return res;
115 }
116 inline bool operator < (const OdGiShellFaceIterator& op) const
117 {
118 return _faceList < op._faceList;
119 }
120 inline bool operator < (const OdInt32* op) const
121 {
122 return _faceList < op;
123 }
124};
125
126#include "TD_PackPop.h"
127
128#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--()
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