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

MGGroup is a class which constains MGGel elements. [詳解]

MGGroup の継承関係図
MGAttribedGel MGGel

公開型

typedef MGPlist< MGGel >::iterator iterator
 別名定義 [詳解]
 
typedef MGPlist< MGGel >
::const_iterator 
const_iterator
 
typedef MGPlist< MGGel >
::reverse_iterator 
reverse_iterator
 
typedef MGPlist< MGGel >
::const_reverse_iterator 
const_reverse_iterator
 

公開メンバ関数

 MGGroup ()
 Void constructor(初期化なしでオブジェクトを作成する。) [詳解]
 
 MGGroup (MGGel *gel)
 
 MGGroup (const TCHAR *file, int &error)
 
virtual MGGroupoperator= (const MGGel &gel2)
 
virtual MGGroupoperator= (const MGGroup &gel2)
 
virtual bool operator< (const MGGroup &gel2) const
 comparison [詳解]
 
virtual bool operator< (const MGGel &gel2) const
 
MGAppearanceappearance ()
 
const MGAppearanceappearance () const
 
const MGGelback () const
 Judge if the display list for vmode is made or not. [詳解]
 
MGGelback ()
 
const_iterator begin () const
 Return const_iterator at the beginning of list. [詳解]
 
iterator begin ()
 
MGBox box () const
 
void clear ()
 clear list, that is, erase(delete) all the elements in the MGGel. [詳解]
 
virtual MGGroupclone () const
 
MGContextcontext ()
 
const MGContextcontext () const
 
virtual void display_arrows (mgSysGL &sgl) const
 
virtual void display_break_points (mgSysGL &sgl) const
 
virtual void display_control_polygon (mgSysGL &sgl) const
 
virtual void display_curvatures (mgSysGL &sgl, double scale, int density, bool use_radius) const
 
MGAppearanceensure_appearance ()
 make this group has appearance and get the MGAppearance pointer. [詳解]
 
bool empty () const
 
const_iterator end () const
 Return const_iterator at the end of MGGel. [詳解]
 
iterator end ()
 
iterator erase (iterator x)
 
iterator erase (iterator first, iterator last)
 
const_iterator find (const MGGel *gel, const MGGroup *&grp) const
 
iterator find (MGGel *gel, MGGroup *&grp)
 
int getMemberGroupNumber () const
 
const MGGroupget_i_th_MemberGroup (int i) const
 
MGGroupget_i_th_MemberGroup (int i)
 
iterator search_by_id (MGGEL_TID tid)
 
const_iterator search_by_id (MGGEL_TID tid) const
 
void nameSearch (const MGName &name, MGGroup *&groupIncluding, MGAttribedGel *&gelFound)
 
void nameSearch (const MGName &name, const MGGroup *&groupIncluding, const MGAttribedGel *&gelFound) const
 
const MGGelfront () const
 
MGGelfront ()
 
MGGroupgroup ()
 Return MGGroup pointer if this MGGel is an MGGroup, else return null. [詳解]
 
const MGGroupgroup () const
 
virtual long identify_type () const
 Return This object's typeID. [詳解]
 
const MGObjectincludes_object () const
 
MGObjectincludes_object ()
 
iterator insert (iterator it, MGGel *x)
 
int make_file (const TCHAR *file)
 
void make_display_list (MGCL::VIEWMODE vmode=MGCL::DONTCARE) const
 Make a display list of this gel. [詳解]
 
virtual int manifold_dimension () const
 
void delete_displayList (const_iterator x) const
 Delete the mgVBO of the i-th element. [詳解]
 
void delete_displayList (const_iterator first, const_iterator last) const
 Delete display list of the sequence [first, last). [詳解]
 
void delete_displayList (const std::vector< const MGGel * > &gels_to_delete) const
 Delete the mgVBO of gels_to_delete. [詳解]
 
void drawAttrib (mgVBO &vbo, bool no_color=false) const
 Process of draw or render attributes. [詳解]
 
int max_size () const
 Returns the size of maximum size. [詳解]
 
int num_of_objects () const
 Get the number of objects included in thie group. [詳解]
 
virtual int out_to_IGES (MGIgesOfstream &igesfile, int SubordinateEntitySwitch=0) const
 IGES output function. [詳解]
 
virtual std::ostream & out (std::ostream &) const
 Output virtual function. [詳解]
 
void pop_back ()
 pop last element. [詳解]
 
void pop_front ()
 pop first element. [詳解]
 
void push_appearance (MGAppearance *appr)
 
void push_context (MGContext *cntx)
 
void push_back (MGGel *x)
 push element x at the end. [詳解]
 
void push_back (MGPvector< MGObject > &objs)
 
void push_back (MGPlist< MGObject > &objs)
 
void push_back (MGPvector< MGGel > &gels)
 
void push_back (MGPlist< MGGel > &gels)
 
void push_front (MGGel *x)
 
const_reverse_iterator rbegin () const
 Return const_reverse_iterator at the beginning of list. [詳解]
 
reverse_iterator rbegin ()
 
const_reverse_iterator rend () const
 Return const_reverse_iterator at the end of list. [詳解]
 
reverse_iterator rend ()
 
iterator release (iterator i)
 
void releaseAll ()
 
void remove_appearance ()
 Remove the MGAppearance of this MGAttribedGel. [詳解]
 
MGGelremoveAt (iterator x)
 
void reverse ()
 reverse sequence. [詳解]
 
void scalePolar (double angleBase, double angle1, double angle2)
 
void set_appearance (const MGAppearance &appr2)
 
int size () const
 Return the number of items that are in the list. [詳解]
 
void getSmallGroupData (std::vector< MGObject * > &outputObjects)
 グループ最下層のデータを取得する [詳解]
 
void getAllObjects (std::vector< MGObject * > &allObjects)
 グループに含まれるすべてのobjectを取得する [詳解]
 
void sort ()
 Equivalent to call std::list::sort(). [詳解]
 
template<class Traits >
void sort (Traits _Comp)
 
virtual void transform (const MGVector &v)
 Transform the gel by the argument. [詳解]
 
virtual void transform (double scale)
 scaling. [詳解]
 
virtual void transform (const MGMatrix &mat)
 matrix transformation. [詳解]
 
virtual void transform (const MGTransf &tr)
 general transformation. [詳解]
 
virtual std::string whoami () const
 
- 基底クラス MGAttribedGel に属する継承公開メンバ関数
 MGAttribedGel ()
 void constructor. [詳解]
 
 MGAttribedGel (const MGAttribedGel &gel2)
 copy constructor. [詳解]
 
virtual MGAttribedGeloperator= (const MGAttribedGel &gel2)
 
virtual ~MGAttribedGel ()
 
void copy_appearance (const MGAttribedGel &gel2)
 
mgVBOdlist_name () const
 
virtual bool displayList_is_made (MGCL::VIEWMODE vmode) const
 Judge if the display list for vmode is made or not. [詳解]
 
void deleteDlistName () const
 
virtual void render_attribute () const
 
virtual int get_draw_attrib_mask () const
 Obtain attribute mask for glPushAttrib(). [詳解]
 
virtual int get_render_attrib_mask () const
 
int getVBOElementsNumber () const
 Get the number of elements of m_dlistName. [詳解]
 
int getVBOShaderElementsNumber () const
 Get the number of shading elements of m_dlistName. [詳解]
 
virtual bool no_display () const
 
void remove_GLattrib (long tid)
 Removed the attribute of specified type. [詳解]
 
virtual void set_GLattrib (MGGLAttrib *attr)
 
virtual void set_display ()
 Set this group as display or no display group. [詳解]
 
virtual void set_no_display ()
 
bool visible () const
 
void set_name (const MGName &newName)
 
const MGNameget_name () const
 
void set_color (const MGColor &newColor)
 
const MGColorget_color () const
 
void setDlistName (mgVBO *vbo=0) const
 
void setDirty (bool is_dirty) const
 Set dirty flag(s) of this VBO(m_dlistName). [詳解]
 
- 基底クラス MGGel に属する継承公開メンバ関数
virtual ~MGGel ()
 Virtual Destructor. [詳解]
 
virtual bool operator== (const MGGel &gel2) const
 Comparison. [詳解]
 
virtual bool operator!= (const MGGel &gel2) const
 
virtual bool operator> (const MGGel &gel2) const
 
virtual MGAttribattrib ()
 Return MGAttrib pointer if this MGGel is an MGAttrib, else return null. [詳解]
 
virtual const MGAttribattrib () const
 
virtual MGObjectobject ()
 Return MGObject pointer if this MGGel is an MGObject, else return null. [詳解]
 
virtual const MGObjectobject () const
 
virtual MGGeometrygeometry ()
 Return MGGeometry pointer if this MGGel is an MGGeometry, else return null. [詳解]
 
virtual const MGGeometrygeometry () const
 
virtual MGPointpoint ()
 Return point pointer if this MGGel is an MGPoint, else return null. [詳解]
 
virtual const MGPointpoint () const
 
virtual MGCurvecurve ()
 Return curve pointer if this MGGel is an MGCurve, else return null. [詳解]
 
virtual const MGCurvecurve () const
 
virtual MGSurfacesurf ()
 Return MGSurface pointer if this MGGel is an MGSurface, else return null. [詳解]
 
virtual const MGSurfacesurf () const
 
virtual MGTopologytopology ()
 Return MGTopology pointer if this MGGel is an MGTopology, else return null. [詳解]
 
virtual const MGTopologytopology () const
 
virtual MGFaceface ()
 Return MGFace pointer if this MGGel is an MGFace, else return null. [詳解]
 
virtual const MGFaceface () const
 
virtual MGShellshell ()
 Return MGShell pointer if this MGGel is an MGShell, else return null. [詳解]
 
virtual const MGShellshell () const
 
std::string string_content () const
 
bool type_is (const MGAbstractGels &types) const
 

限定公開メンバ関数

virtual void ReadMembers (MGIfstream &buf)
 Read all member data. [詳解]
 
virtual void WriteMembers (MGOfstream &buf) const
 Write all member data. [詳解]
 

その他の継承メンバ

- 基底クラス MGAttribedGel に属する継承限定公開変数類
std::auto_ptr< mgVBOm_dlistName
 display name if m_dlistName!=0; [詳解]
 

詳解

MGGroup is a class which constains MGGel elements.

MGGroup provides functions: (1) a container of MGGel(MGAtrribedGel(MGObject or MGGroup), MGAttrib) elements. (2) To attach an appearance to the context of the group.

型定義メンバ詳解

別名定義

構築子と解体子

MGGroup::MGGroup ( )

Void constructor(初期化なしでオブジェクトを作成する。)

MGGroup::MGGroup ( MGGel gel)
MGGroup::MGGroup ( const TCHAR *  file,
int &  error 
)

Construct MGGroup from the file made by MGOfstream. error contains error flag as: =0: open succeeded. =1: file not found, or could not be opened. =2: file found, but, the format is not MGCL format. When error!=0, MGGroup contains no MGGel's.

関数詳解

MGAppearance* MGGroup::appearance ( )
virtual

Get the MGAppearance pointer in this group. If not defined, null will be returned.

MGAttribedGelを実装しています。

const MGAppearance* MGGroup::appearance ( ) const
virtual

MGAttribedGelを実装しています。

const MGGel* MGGroup::back ( ) const
inline

Judge if the display list for vmode is made or not.

Return(but does not remove) last element in the group. If list is empty, behavior is undefined.

MGGel* MGGroup::back ( )
inline
const_iterator MGGroup::begin ( ) const
inline

Return const_iterator at the beginning of list.

iterator MGGroup::begin ( )
inline
MGBox MGGroup::box ( ) const

Get the box of the group. If no objects were included in this group, null box will be returned.

void MGGroup::clear ( )
inline

clear list, that is, erase(delete) all the elements in the MGGel.

virtual MGGroup* MGGroup::clone ( ) const
virtual

Generate copied gel of this gel. Returned is a newed object. User must delete the object.

MGGelを実装しています。

MGContext* MGGroup::context ( )

Get the MGContext pointer stored in this group. If not defined, null will be returned.

const MGContext* MGGroup::context ( ) const
void MGGroup::delete_displayList ( const_iterator  x) const

Delete the mgVBO of the i-th element.

void MGGroup::delete_displayList ( const_iterator  first,
const_iterator  last 
) const

Delete display list of the sequence [first, last).

void MGGroup::delete_displayList ( const std::vector< const MGGel * > &  gels_to_delete) const

Delete the mgVBO of gels_to_delete.

virtual void MGGroup::display_arrows ( mgSysGL sgl) const
virtual

MGGelを再実装しています。

virtual void MGGroup::display_break_points ( mgSysGL sgl) const
virtual

MGGelを再実装しています。

virtual void MGGroup::display_control_polygon ( mgSysGL sgl) const
virtual

MGGelを再実装しています。

virtual void MGGroup::display_curvatures ( mgSysGL sgl,
double  scale,
int  density,
bool  use_radius 
) const
virtual
引数
sglSgl to make pictures in.
scalescaling of the graph.
densitydensitiy of the graph.
use_radiustrue:radius display, false:curvature display.

MGGelを再実装しています。

void MGGroup::drawAttrib ( mgVBO vbo,
bool  no_color = false 
) const
virtual

Process of draw or render attributes.

引数
vboThe target graphic object.
no_colorif true, color attribute will be neglected.

MGAttribedGelを再実装しています。

bool MGGroup::empty ( ) const
inline

Return true (1) if there are no items in the MGGel, false(0) otherwise.

const_iterator MGGroup::end ( ) const
inline

Return const_iterator at the end of MGGel.

iterator MGGroup::end ( )
inline
MGAppearance* MGGroup::ensure_appearance ( )
virtual

make this group has appearance and get the MGAppearance pointer.

MGAttribedGelを実装しています。

iterator MGGroup::erase ( iterator  x)
inline

erase element x. Function's return value is the following iterator of the erased element x.

iterator MGGroup::erase ( iterator  first,
iterator  last 
)
inline

erase sequence [first, last). Function's return value is the following iterator of the erased elements.

const_iterator MGGroup::find ( const MGGel gel,
const MGGroup *&  grp 
) const

Find the position of the gel in the gel list and the group pointer which includes the gel. Searching will be done into the member group gel of this list.

引数
gelThe target gel.
grpThe group that includes gel will be returned. When not found grp=null will be returned
iterator MGGroup::find ( MGGel gel,
MGGroup *&  grp 
)

Find the position of the gel in the gel list and the group pointer which includes the gel. Searching will be done into the member group gel of this list.

引数
gelThe target gel.
grpThe group that includes gel will be returned, When not found grp=null will be returned.
const MGGel* MGGroup::front ( ) const
inline

Return(but does not remove) first element in the MGGel. If list is empty, behavior is undefined.

MGGel* MGGroup::front ( )
inline
const MGGroup* MGGroup::get_i_th_MemberGroup ( int  i) const

Get i-th MGGroup pointer of this memeber group except MGAppearance. If i-th MGGroup except MGAppearance is not found, null will be returned.

MGGroup* MGGroup::get_i_th_MemberGroup ( int  i)
void MGGroup::getAllObjects ( std::vector< MGObject * > &  allObjects)

グループに含まれるすべてのobjectを取得する

引数
allObjectsオブジェクトデータ
int MGGroup::getMemberGroupNumber ( ) const

Count up how many MGGroup members are included in this group except MGAppearance. Function's return value is the number of member group. Only the members of this group are counted.

void MGGroup::getSmallGroupData ( std::vector< MGObject * > &  outputObjects)

グループ最下層のデータを取得する

引数
outputObjectsグループ最下層のデータを入れる
MGGroup* MGGroup::group ( )
inlinevirtual

Return MGGroup pointer if this MGGel is an MGGroup, else return null.

MGGelを再実装しています。

const MGGroup* MGGroup::group ( ) const
inlinevirtual

MGGelを再実装しています。

virtual long MGGroup::identify_type ( ) const
inlinevirtual

Return This object's typeID.

MGGelを実装しています。

const MGObject* MGGroup::includes_object ( ) const
virtual

Test if this gel includes an object. Function's return value is the 1st object found in the gel list of this if this includes an object. Otherwise null will be returned.

MGGelを実装しています。

MGObject* MGGroup::includes_object ( )
virtual

MGGelを実装しています。

iterator MGGroup::insert ( iterator  it,
MGGel x 
)
inline

insert an element x before the position it. Function's return value is the iterator of x after inserted.

void MGGroup::make_display_list ( MGCL::VIEWMODE  vmode = MGCL::DONTCARE) const
virtual

Make a display list of this gel.

MGGelを再実装しています。

int MGGroup::make_file ( const TCHAR *  file)

Make an MGOfstream file which contains this group. The file generated by make_file can be retrieved by the constructor MGGroup(const char* file, int error); Function's return value is: =0: the file is successfully made. =1: file could not be opened.

virtual int MGGroup::manifold_dimension ( ) const
inlinevirtual

Get manifold dimension. MGGroup returns right one, MGGroup return 2, and others return -1.

MGGelを再実装しています。

int MGGroup::max_size ( ) const
inline

Returns the size of maximum size.

void MGGroup::nameSearch ( const MGName name,
MGGroup *&  groupIncluding,
MGAttribedGel *&  gelFound 
)

Find the 1st gel(MGGroup or MGObject) member in this MGGroup that has the given name. **********Searching IS performed into the member group recursively.

引数
nameThe target name.
groupIncludingIf found the group including the gel of the name is set,
gelFoundelse, null will be returned.found gel will be returned if found, else null.
void MGGroup::nameSearch ( const MGName name,
const MGGroup *&  groupIncluding,
const MGAttribedGel *&  gelFound 
) const

Find the 1st gel(MGGroup or MGObject) member in this MGGroup that has the given name. **********Searching IS performed into the member group recursively.

引数
nameThe target name.
groupIncludingIf found, the group including the gel of the name is set,
gelFoundelse, null will be returned.found gel will be returned if found, else null.
int MGGroup::num_of_objects ( ) const

Get the number of objects included in thie group.

virtual bool MGGroup::operator< ( const MGGroup gel2) const
virtual

comparison

virtual bool MGGroup::operator< ( const MGGel gel2) const
virtual

MGGelを再実装しています。

virtual MGGroup& MGGroup::operator= ( const MGGel gel2)
virtual

Copy constructor. MGGroup(const MGGroup& obj2); Virtual Destructor virtual ~MGGroup(); Assignment. When the leaf object of this and gel2 are not equal, this assignment does nothing.

MGGelを再実装しています。

virtual MGGroup& MGGroup::operator= ( const MGGroup gel2)
virtual
virtual std::ostream& MGGroup::out ( std::ostream &  ) const
virtual

Output virtual function.

MGGelを実装しています。

virtual int MGGroup::out_to_IGES ( MGIgesOfstream igesfile,
int  SubordinateEntitySwitch = 0 
) const
virtual

IGES output function.

MGGelを再実装しています。

void MGGroup::pop_back ( )
inline

pop last element.

void MGGroup::pop_front ( )
inline

pop first element.

void MGGroup::push_appearance ( MGAppearance appr)
void MGGroup::push_back ( MGGel x)

push element x at the end.

void MGGroup::push_back ( MGPvector< MGObject > &  objs)

push elements in objs at the end. All of the object pointers are transfered to this. On return, objs will have no object pointer in it.

void MGGroup::push_back ( MGPlist< MGObject > &  objs)
void MGGroup::push_back ( MGPvector< MGGel > &  gels)
void MGGroup::push_back ( MGPlist< MGGel > &  gels)
void MGGroup::push_context ( MGContext cntx)
void MGGroup::push_front ( MGGel x)

push element x at the first. x must be a newed object, and the ownership will be transfered to thisMGGroup.

const_reverse_iterator MGGroup::rbegin ( ) const
inline

Return const_reverse_iterator at the beginning of list.

reverse_iterator MGGroup::rbegin ( )
inline
virtual void MGGroup::ReadMembers ( MGIfstream buf)
protectedvirtual

Read all member data.

MGGelを再実装しています。

iterator MGGroup::release ( iterator  i)
inline

Release the gel at the position i. Returned will be the position after the relesed gel.

void MGGroup::releaseAll ( )

Release all the gelof this group. The released memebes are newed objects. User must take care to delete them.

void MGGroup::remove_appearance ( )
virtual

Remove the MGAppearance of this MGAttribedGel.

MGAttribedGelを実装しています。

MGGel* MGGroup::removeAt ( iterator  x)
inline

Remove the MGGel* and return the MGGel*. If i is not valid, behavior is undefined. 現在の所有権を放棄し、ただのポインタを返す。

const_reverse_iterator MGGroup::rend ( ) const
inline

Return const_reverse_iterator at the end of list.

reverse_iterator MGGroup::rend ( )
inline
void MGGroup::reverse ( )
inline

reverse sequence.

void MGGroup::scalePolar ( double  angleBase,
double  angle1,
double  angle2 
)

Execute polar-scaling to all the MGCurve and MGFace of this group. curve's (x,y) are updated. No other coordinates are unchanged. The updated result curve is always MGLBRep. For MGFace, the boundaries are polar-scaled.

Rotation is performed from the angle range (angleBase,angle1) to (angleBase,angle2). That is, when angle1=angle2, no change is done. When angle2 is angleBase, all the data will lie on the straight of from origin to (cos(angleBase), sin(angleBase)). angle1-angleBase must be >MGTolerance::angle_zero(). IF a member gel is not MGCurve nor MGFace, it is unchanged.

引数
angleBasebase angle.
iterator MGGroup::search_by_id ( MGGEL_TID  tid)

Find the position of the 1st member gel of type tid in this MGGroup. **********Searching is NOT performed into the member group.

const_iterator MGGroup::search_by_id ( MGGEL_TID  tid) const
void MGGroup::set_appearance ( const MGAppearance appr2)
virtual

MGAttribedGelを実装しています。

int MGGroup::size ( ) const
inline

Return the number of items that are in the list.

void MGGroup::sort ( )
inline

Equivalent to call std::list::sort().

template<class Traits >
void MGGroup::sort ( Traits  _Comp)
inline
virtual void MGGroup::transform ( const MGVector v)
virtual

Transform the gel by the argument.

translation

MGGelを再実装しています。

virtual void MGGroup::transform ( double  scale)
virtual

scaling.

MGGelを再実装しています。

virtual void MGGroup::transform ( const MGMatrix mat)
virtual

matrix transformation.

MGGelを再実装しています。

virtual void MGGroup::transform ( const MGTransf tr)
virtual

general transformation.

MGGelを再実装しています。

virtual std::string MGGroup::whoami ( ) const
inlinevirtual

MGGelを実装しています。

virtual void MGGroup::WriteMembers ( MGOfstream buf) const
protectedvirtual

Write all member data.

MGGelを再実装しています。


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