MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
TL2Triangle.h
1 #ifndef _mgTL2Triangle_HH_
2 #define _mgTL2Triangle_HH_
3 
4 #include <vector>
5 #include "mg/MGCL.h"
6 #include "mg/Position.h"
7 #include "Tl2/TL2parameter.h"
8 
9 /****************************************************************/
10 /* Copyright (c) 2005 by DG Technologies, Inc. */
11 /* All rights reserved. */
12 /****************************************************************/
13 class MGSurface;
14 class MGFace;
15 class mgTL2Face;
16 
23 
31 
32 public:
33  typedef std::vector<MGPosition>::iterator iterator;
34  typedef std::vector<MGPosition>::const_iterator const_iterator;
35 
36 friend std::ostream& operator<< (std::ostream& out, const mgTL2Triangle& triangle);
37 
41 ):m_type(type){;};
42 
44  int n,
46 );
47 
49 
50 const MGPosition& operator[](int i)const{return m_xyzs[i];};
51 MGPosition& operator[](int i){return m_xyzs[i];};
52 
54 
55 iterator begin(){return m_xyzs.begin();};
56 iterator end(){return m_xyzs.end();};
57 const_iterator begin()const{return m_xyzs.begin();};
58 const_iterator end()const{return m_xyzs.end();};
59 
61 mgTESTRIANG getGeometryType()const{return m_type;};
62 
63 void push_back(const MGPosition& xyz){m_xyzs.push_back(xyz);};
64 void pop_back(){m_xyzs.pop_back();};
65 
67 void setGeometryType(mgTESTRIANG type){m_type = type;};
68 
70 int size()const{return int(m_xyzs.size());};
71 
72 private:
73  mgTESTRIANG m_type;
74  std::vector<MGPosition> m_xyzs;
75 };
80  // end of UseTessellation group
82 #endif
mgTESTRIANG getGeometryType() const
タイプを返却する mgTESTRIANG_FAN mgTESTRIANG_STRIP
Definition: TL2Triangle.h:61
like a csTriFanSet
Definition: MGCL.h:230
int size() const
Obtain the number of points included.
Definition: TL2Triangle.h:70
MGPosition & operator[](int i)
Definition: TL2Triangle.h:51
std::vector< MGPosition >::iterator iterator
Definition: TL2Triangle.h:33
iterator begin()
Definition: TL2Triangle.h:55
mgTESTRIANG
a set of triangl type(3角形頂点リストのタイプ).
Definition: MGCL.h:228
const MGPosition & operator[](int i) const
Definition: TL2Triangle.h:50
MGFace is a trimmed surface.
Definition: Face.h:51
const_iterator end() const
Definition: TL2Triangle.h:58
Represent a positional data.
Definition: Position.h:28
MGSurface is an abstract class of 3D surface.
Definition: Surface.h:54
void push_back(const MGPosition &xyz)
Definition: TL2Triangle.h:63
mgTL2Face is a proprietry class for Face tessellation.
Definition: TL2Face.h:29
std::vector< MGPosition >::const_iterator const_iterator
Definition: TL2Triangle.h:34
friend std::ostream & operator<<(std::ostream &out, const mgTL2Triangle &triangle)
void setGeometryType(mgTESTRIANG type)
タイプを設定する
Definition: TL2Triangle.h:67
const_iterator begin() const
Definition: TL2Triangle.h:57
void pop_back()
Definition: TL2Triangle.h:64
mgTL2Triangle holds (multiple) triangles data, which are a fan or a strip.
Definition: TL2Triangle.h:30
mgTL2Triangle(mgTESTRIANG type=mgTESTRIANG_FAN)
Definition: TL2Triangle.h:39
iterator end()
Definition: TL2Triangle.h:56