MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
mgTL2Triangles クラス

A vector of mgTL2Triangle's. [詳解]

公開型

typedef MGPvector
< mgTL2Triangle >
::const_iterator 
const_iterator
 
typedef MGPvector
< mgTL2Triangle >::iterator 
iterator
 

公開メンバ関数

 mgTL2Triangles (MGCL::TL_DATA_KIND dkind=MGCL::UV, const MGSurface *surf=0)
 
 mgTL2Triangles (const mgTL2Triangles &tris)
 Copy constructor. [詳解]
 
const mgTL2Triangleoperator[] (int i) const
 Return the i-th mgTL2Triangle. [詳解]
 
mgTL2Triangleoperator[] (int i)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
mgTL2Trianglefront ()
 
mgTL2Triangleback ()
 
const mgTL2Trianglefront () const
 
const mgTL2Triangleback () const
 
bool is_uv () const
 Return true if m_triangles' data is (u,v). [詳解]
 
void makeStrip (const mgTL2LPline &pline0, const mgTL2LPline &pline2)
 
void makeFan (const mgTL2LPline &plinen, const mgTL2LPline &pline0)
 
bool need_normal () const
 Return true if m_triangles' data is (u,v). [詳解]
 
MGCL::TL_DATA_KIND get_kind () const
 return the data kind of this. [詳解]
 
void push_back (mgTL2Triangle *pTlTriangle)
 
void push_back (mgTL2Triangles &tris)
 
void push_back (const mgTL2Fans &fans, int nvTri, const std::vector< int > &verticesIDs)
 
int size () const
 
void set_surface (const MGSurface *surf)
 
const MGSurfacesurface () const
 
void tessellate1234edgesLoop (const MGLoop &oloop)
 

フレンド

std::ostream & operator<< (std::ostream &out, const mgTL2Triangles &tlTriangles)
 

詳解

A vector of mgTL2Triangle's.

mgTL2Triangle holds multiple triangles, and mgTL2Triangles holds vector of mgTriangle's. ポリゴンのベクトル保持クラス

型定義メンバ詳解

構築子と解体子

mgTL2Triangles::mgTL2Triangles ( MGCL::TL_DATA_KIND  dkind = MGCL::UV,
const MGSurface surf = 0 
)
引数
dkindIndicates if triangles's data is (u,v) data, (x,y,z) or (x,y,z) with the normal. =UV(0): (u,v) data. The space dimension of all the elements(MGPosition) of mgTL2Triangle is 2. =XYZ(1): (x,y,z) data. The space dimension of all the elements(MGPosition) of mgTL2Triangle is 3. =XYZNormal(2): (x,y,z) with (xn,yn,zn)=normal data. The space dimension of all the elements(MGPosition) of mgTL2Triangle is 6 and includes (x,y,z,xn,yn,zn). Here (xn,yn,zn) is the unit normal at the position (x,y,z) of the surface.
mgTL2Triangles::mgTL2Triangles ( const mgTL2Triangles tris)

Copy constructor.

関数詳解

mgTL2Triangle* mgTL2Triangles::back ( )
inline
const mgTL2Triangle* mgTL2Triangles::back ( ) const
inline
iterator mgTL2Triangles::begin ( )
inline
const_iterator mgTL2Triangles::begin ( ) const
inline
iterator mgTL2Triangles::end ( )
inline
const_iterator mgTL2Triangles::end ( ) const
inline
mgTL2Triangle* mgTL2Triangles::front ( )
inline
const mgTL2Triangle* mgTL2Triangles::front ( ) const
inline
MGCL::TL_DATA_KIND mgTL2Triangles::get_kind ( ) const
inline

return the data kind of this.

bool mgTL2Triangles::is_uv ( ) const
inline

Return true if m_triangles' data is (u,v).

void mgTL2Triangles::makeFan ( const mgTL2LPline plinen,
const mgTL2LPline pline0 
)

Make fan data from plinen and pline0 and push back to this. The number of vertices of plinen is 2 or greater than 2. The fan is made from the pline0's start point to n vertices of plinen.

void mgTL2Triangles::makeStrip ( const mgTL2LPline pline0,
const mgTL2LPline pline2 
)

Make strip data from pline0 and pline2 and push back to this. The number of vertices of pline0 is greater or equal to the one of pline2. And the differecne must be at most 1.

bool mgTL2Triangles::need_normal ( ) const
inline

Return true if m_triangles' data is (u,v).

const mgTL2Triangle& mgTL2Triangles::operator[] ( int  i) const

Return the i-th mgTL2Triangle.

mgTL2Triangle& mgTL2Triangles::operator[] ( int  i)
void mgTL2Triangles::push_back ( mgTL2Triangle pTlTriangle)
inline
void mgTL2Triangles::push_back ( mgTL2Triangles tris)
inline
void mgTL2Triangles::push_back ( const mgTL2Fans fans,
int  nvTri,
const std::vector< int > &  verticesIDs 
)

Push back a triangel of type mgTESTRIANG_FAN. The veritces of the triangle is verticesIDs which are vertex id of fans.

引数
fansTarget to push back.
nvTriNumber of vertices in verticesIDs. generally nvTri!=verticesIDs.size().
verticesIDsVertex ids.
void mgTL2Triangles::set_surface ( const MGSurface surf)
inline
int mgTL2Triangles::size ( ) const
inline
const MGSurface* mgTL2Triangles::surface ( ) const
inline
void mgTL2Triangles::tessellate1234edgesLoop ( const MGLoop oloop)

Do perform the tessellation for the mgTL2Plygon that has 3 or 4 edges outer loop, and that has no inner loops. The result will be appended onto triangles. When triangles.is_uv()=false, all of the element of the triangle position data has normal data as (x,y,z,xn,yn,zn). Here (x,y,z) is the position data and (xn,yn,zn) is the normal vector at the position (x,y,z). When triangles.is_uv()=true, all of the element of the triange position data are (u,v). Tessellated triangles will be appended.

フレンドと関連関数の詳解

std::ostream& operator<< ( std::ostream &  out,
const mgTL2Triangles tlTriangles 
)
friend

このクラス詳解は次のファイルから抽出されました: