MGCL V10
V10
MGCL V10
|
MGGroup is a class which constains MGGel elements. [詳解]
公開型 | |
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 MGGroup & | operator= (const MGGel &gel2) |
virtual MGGroup & | operator= (const MGGroup &gel2) |
virtual bool | operator< (const MGGroup &gel2) const |
comparison [詳解] | |
virtual bool | operator< (const MGGel &gel2) const |
MGAppearance * | appearance () |
const MGAppearance * | appearance () const |
const MGGel * | back () const |
Judge if the display list for vmode is made or not. [詳解] | |
MGGel * | back () |
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 MGGroup * | clone () const |
MGContext * | context () |
const MGContext * | context () 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 |
MGAppearance * | ensure_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 MGGroup * | get_i_th_MemberGroup (int i) const |
MGGroup * | get_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 MGGel * | front () const |
MGGel * | front () |
MGGroup * | group () |
Return MGGroup pointer if this MGGel is an MGGroup, else return null. [詳解] | |
const MGGroup * | group () const |
virtual long | identify_type () const |
Return This object's typeID. [詳解] | |
const MGObject * | includes_object () const |
MGObject * | includes_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. [詳解] | |
MGGel * | removeAt (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 MGAttribedGel & | operator= (const MGAttribedGel &gel2) |
virtual | ~MGAttribedGel () |
void | copy_appearance (const MGAttribedGel &gel2) |
mgVBO * | dlist_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 MGName * | get_name () const |
void | set_color (const MGColor &newColor) |
const MGColor * | get_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 MGAttrib * | attrib () |
Return MGAttrib pointer if this MGGel is an MGAttrib, else return null. [詳解] | |
virtual const MGAttrib * | attrib () const |
virtual MGObject * | object () |
Return MGObject pointer if this MGGel is an MGObject, else return null. [詳解] | |
virtual const MGObject * | object () const |
virtual MGGeometry * | geometry () |
Return MGGeometry pointer if this MGGel is an MGGeometry, else return null. [詳解] | |
virtual const MGGeometry * | geometry () const |
virtual MGPoint * | point () |
Return point pointer if this MGGel is an MGPoint, else return null. [詳解] | |
virtual const MGPoint * | point () const |
virtual MGCurve * | curve () |
Return curve pointer if this MGGel is an MGCurve, else return null. [詳解] | |
virtual const MGCurve * | curve () const |
virtual MGSurface * | surf () |
Return MGSurface pointer if this MGGel is an MGSurface, else return null. [詳解] | |
virtual const MGSurface * | surf () const |
virtual MGTopology * | topology () |
Return MGTopology pointer if this MGGel is an MGTopology, else return null. [詳解] | |
virtual const MGTopology * | topology () const |
virtual MGFace * | face () |
Return MGFace pointer if this MGGel is an MGFace, else return null. [詳解] | |
virtual const MGFace * | face () const |
virtual MGShell * | shell () |
Return MGShell pointer if this MGGel is an MGShell, else return null. [詳解] | |
virtual const MGShell * | shell () 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< mgVBO > | m_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.
typedef MGPlist<MGGel>::const_iterator MGGroup::const_iterator |
typedef MGPlist<MGGel>::iterator MGGroup::iterator |
別名定義
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.
|
virtual |
Get the MGAppearance pointer in this group. If not defined, null will be returned.
MGAttribedGelを実装しています。
|
virtual |
MGAttribedGelを実装しています。
|
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.
|
inline |
|
inline |
Return const_iterator at the beginning of list.
|
inline |
MGBox MGGroup::box | ( | ) | const |
Get the box of the group. If no objects were included in this group, null box will be returned.
|
inline |
clear list, that is, erase(delete) all the elements in the MGGel.
|
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 |
sgl | Sgl to make pictures in. |
scale | scaling of the graph. |
density | densitiy of the graph. |
use_radius | true:radius display, false:curvature display. |
MGGelを再実装しています。
|
virtual |
Process of draw or render attributes.
vbo | The target graphic object. |
no_color | if true, color attribute will be neglected. |
MGAttribedGelを再実装しています。
|
inline |
Return true (1) if there are no items in the MGGel, false(0) otherwise.
|
inline |
Return const_iterator at the end of MGGel.
|
inline |
|
virtual |
make this group has appearance and get the MGAppearance pointer.
MGAttribedGelを実装しています。
erase element x. Function's return value is the following iterator of the erased element x.
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.
gel | The target gel. |
grp | The group that includes gel will be returned. When not found grp=null will be returned |
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.
gel | The target gel. |
grp | The group that includes gel will be returned, When not found grp=null will be returned. |
|
inline |
Return(but does not remove) first element in the MGGel. If list is empty, behavior is undefined.
|
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 | グループ最下層のデータを入れる |
|
inlinevirtual |
|
inlinevirtual |
Return This object's typeID.
MGGelを実装しています。
|
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を実装しています。
insert an element x before the position it. Function's return value is the iterator of x after inserted.
|
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.
|
inlinevirtual |
|
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.
name | The target name. |
groupIncluding | If found the group including the gel of the name is set, |
gelFound | else, 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.
name | The target name. |
groupIncluding | If found, the group including the gel of the name is set, |
gelFound | else, 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 |
comparison
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 |
Output virtual function.
MGGelを実装しています。
|
virtual |
IGES output function.
MGGelを再実装しています。
|
inline |
pop last element.
|
inline |
pop first element.
void MGGroup::push_appearance | ( | MGAppearance * | appr | ) |
void MGGroup::push_back | ( | MGGel * | x | ) |
push element x at the end.
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_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.
|
inline |
Return const_reverse_iterator at the beginning of list.
|
inline |
|
protectedvirtual |
Read all member data.
MGGelを再実装しています。
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.
|
virtual |
Remove the MGAppearance of this MGAttribedGel.
MGAttribedGelを実装しています。
Remove the MGGel* and return the MGGel*. If i is not valid, behavior is undefined. 現在の所有権を放棄し、ただのポインタを返す。
|
inline |
Return const_reverse_iterator at the end of list.
|
inline |
|
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.
angleBase | base angle. |
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 |
|
virtual |
MGAttribedGelを実装しています。
|
inline |
Return the number of items that are in the list.
|
inline |
Equivalent to call std::list::sort().
|
inline |
|
virtual |
|
virtual |
scaling.
MGGelを再実装しています。
|
virtual |
matrix transformation.
MGGelを再実装しています。
|
virtual |
general transformation.
MGGelを再実装しています。
|
inlinevirtual |
MGGelを実装しています。
|
protectedvirtual |
Write all member data.
MGGelを再実装しています。