MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
isects.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #ifndef _MGisects_HH_
6 #define _MGisects_HH_
7 
12 #include "mg/Pvector.h"
13 #include "mg/isect.h"
14 
15 //Forward class declaration.
16 class MGObject;
17 class MGCCisect_list;
18 class MGCSisect_list;
19 class MGSSisect_list;
20 class MGCFisect_vector;
21 class MGFFisect;
22 class MGHHisect;
23 class MGHHisect_vector;
24 
26 
44 class MG_DLL_DECLR MGisects{
45 
46 public:
47 
55 
57 MG_DLL_DECLR friend std::ostream& operator << (std::ostream& ostrm, const MGisects& is);
58 
60 
62 MGisects(
63  const MGObject* obj1=0,
64  const MGObject* obj2=0
65 );
66 
69 
72 
75 
78 
80 MGisects(MGHHisect& hhi);
81 
84 
85 //Copy Constructor.
86 //MGisects(const MGisects& vector);
87 
89 //~MGisects(){;};
90 
92 
95 
96 const MGisect* operator[](int i)const{return m_is_vector[i];};
97 MGisect* operator[](int i){return m_is_vector[i];};
98 
101 
103 
106 const MGisect* back() const{return m_is_vector.back();};
107 MGisect* back() {return m_is_vector.back();};
108 
110 iterator begin(){return m_is_vector.begin();}
111 const_iterator begin() const{return m_is_vector.begin();}
112 
114 void clear(){m_is_vector.clear();}
115 
117 bool empty() const{return m_is_vector.empty();};
118 
120 iterator end(){return m_is_vector.end();}
121 const_iterator end() const{return m_is_vector.end();}
122 
125 iterator erase(iterator i){return m_is_vector.erase(i);}
126 
128 void exchange12();
129 
132 const MGisect* front() const{return m_is_vector.front();};
133 MGisect* front(){return m_is_vector.front();};
134 
137 void insertAt(iterator i, MGisect* isect){
138  m_is_vector.insert(i, isect);
139 };
140 
145 const MGObject* object1(int i)const;
146 
151 const MGObject* object2(int i)const;
152 
154 void pop_back(){m_is_vector.pop_back();}
155 
158 void push_back(MGisect* isect){m_is_vector.push_back(isect);};
159 
162 void push_back(MGisects& isects);
163 
165 int size() const{return int(m_is_vector.size());};
166 
167 private:
168  MGPvector<MGisect> m_is_vector;
169  const MGObject* m_object1;
170  const MGObject* m_object2;
171 
172 };
173  // end of IsectContainer group
175 #endif
MGPvector< MGisect >::reference reference
Definition: isects.h:52
iterator begin()
Get the iterator of the first element of the m_is_vector.
Definition: isects.h:110
bool empty() const
Return true if there are no items in the vector, false(0) otherwise.
Definition: isects.h:117
MGFFisect represents one intersection line of a MGFace and MGFace or MGSurface.
Definition: FFisect.h:31
MGCFisect_vector defines a vector of MGCFisect.
Definition: CFisect_vector.h:25
int size() const
Return the number of items that are in the vector.
Definition: isects.h:165
std::ostream & operator<<(std::ostream &ostrm, const MGisect &is)
Debug Function.
Definition: isect.h:95
MGPvector< MGisect >::iterator iterator
Definition: isects.h:48
const_iterator begin() const
Definition: isects.h:111
void insertAt(iterator i, MGisect *isect)
Definition: isects.h:137
Is an abstract class which represents a whole geometry and a topology.
Definition: Object.h:42
const_iterator end() const
Definition: isects.h:121
iterator end()
Get the iterator of the next of the last element of the m_is_vector.
Definition: isects.h:120
Is an abstract class to provide unified interfaces to handle an intersection of two objects...
Definition: isect.h:26
const MGisect * back() const
Definition: isects.h:106
MGPvector< MGisect >::reverse_iterator reverse_iterator
Definition: isects.h:50
void pop_back()
Erase the last element of m_is_vector if not null.
Definition: isects.h:154
void push_back(MGisect *isect)
Definition: isects.h:158
MGSSisect_list defines linked list of MGSSisect.
Definition: SSisect_list.h:26
MGCSisect_list defines linked list of MGCSisect.
Definition: CSisect_list.h:22
MGPvector< MGisect >::const_reference const_reference
Definition: isects.h:53
const MGisect * front() const
Definition: isects.h:132
MGPvector< MGisect >::const_reverse_iterator const_reverse_iterator
Definition: isects.h:51
Defines a list of MGCCisect(curve to curve intersection).
Definition: CCisect_list.h:20
MGPvector< MGisect >::size_type size_type
Definition: isects.h:54
MGisect * back()
Definition: isects.h:107
MGHHisect_vector defines a vector of MGHHisect.
Definition: HHisect_vector.h:28
MGPvector< MGisect >::const_iterator const_iterator
Definition: isects.h:49
const MGisect * operator[](int i) const
Definition: isects.h:96
MGisect * front()
Definition: isects.h:133
MGisect * operator[](int i)
Definition: isects.h:97
MGisects defines a vector of MGisect.
Definition: isects.h:44
MGHHisect is to represent one continuous intersection line of shells.
Definition: HHisect.h:43
Defines Vector of newed object pointers.
Definition: Pvector.h:27
void clear()
Clear all the elements in m_is_vector.
Definition: isects.h:114
iterator erase(iterator i)
Definition: isects.h:125