MGCL V10
V10
MGCL V10
|
A container class to hold MGGLAttrib objects. [詳解]
公開型 | |
typedef MGGroup::iterator | iterator |
typedef MGGroup::const_iterator | const_iterator |
公開メンバ関数 | |
MGAppearance () | |
MGAppearance & | operator= (const MGGel &gel2) |
MGAppearance & | operator= (const MGAppearance &gel2) |
bool | operator< (const MGAppearance &gel2) const |
comparison [詳解] | |
bool | operator< (const MGGel &gel2) const |
std::ostream & | out (std::ostream &ostrm) const |
Output virtual function. [詳解] | |
MGAttrib * | back () |
const MGAttrib * | back () const |
iterator | begin () |
const_iterator | begin () const |
void | clear () |
bool | empty () const |
iterator | end () |
const_iterator | end () const |
MGAttrib * | front () |
const MGAttrib * | front () const |
void | pop_back () |
void | pop_front () |
int | size () const |
int | add_light (MGLight *light) |
bool | can_be_removed () const |
Test if this MGAppearance can be removed or not. [詳解] | |
MGAppearance * | clone () const |
void | drawAttrib (mgVBO &vbo, bool no_color=false) const |
draw GLAttributes process. [詳解] | |
virtual mgVBO * | dlist_name () const |
bool | displayList_is_made (MGCL::VIEWMODE vmode) const |
Judge if the display list for vmode is made or not. [詳解] | |
iterator | erase (iterator i) |
int | get_draw_attrib_mask () const |
Turn on the appropriate mask bit for this attribute. See glPushAttrib(). [詳解] | |
int | get_render_attrib_mask () const |
long | identify_type () const |
Return This object's typeID. [詳解] | |
int | manifold_dimension () const |
bool | no_display () const |
Test this is no_display MGAppearance. [詳解] | |
MGGLAttrib * | release_attrib (long tid) |
void | render (mgVBO &vbo) const |
render GLAttributes process. [詳解] | |
iterator | search (const MGGLAttrib *atr) |
iterator | search_by_id (MGGEL_TID tid) |
const_iterator | search (const MGGLAttrib *atr) const |
const_iterator | search_by_id (MGGEL_TID tid) const |
void | set_attrib (MGGLAttrib *attr) |
void | set_attrib (MGGLAttribs &attrs) |
MGGLAttrib * | set_attrib_with_old (MGGLAttrib *attr) |
void | set_color (const MGColor &color) |
void | set_color (const float color[4]) |
void | set_color (float red, float green, float blue, float alpha=1.) |
void | set_display () |
void | set_no_display () |
void | set_light_disabled () |
void | set_light_enabled () |
void | set_material (MGRenderAttr::RENDERSIDE rs, const float ambient[3], const float diffuse[3], const float specular[3], const float emission[3], float shininess=0., float transparency=0.) |
void | set_back_material (const float ambient[3], const float diffuse[3], const float specular[3], const float emission[3], float shininess=0., float transparency=0.) |
void | setLineStipple (short int factor, unsigned short pattern) |
void | setLineWidth (float width) |
virtual std::string | whoami () const |
基底クラス MGAttrib に属する継承公開メンバ関数 | |
virtual | ~MGAttrib () |
Virtual Destructor. [詳解] | |
virtual MGAttrib & | operator= (const MGAttrib &gel2) |
MGAttrib * | attrib () |
Return MGAttrib pointer if this MGGel is an MGAttrib, else return null. [詳解] | |
const MGAttrib * | attrib () const |
const MGObject * | includes_object () const |
Test if this gel includes an object. [詳解] | |
MGObject * | includes_object () |
Test if this gel includes an object. [詳解] | |
基底クラス 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 int | out_to_IGES (MGIgesOfstream &igesfile, int SubordinateEntitySwitch=0) const |
virtual void | make_display_list (MGCL::VIEWMODE vmode=MGCL::DONTCARE) const |
Make a display list of this gel. [詳解] | |
virtual MGGroup * | group () |
Return MGGroup pointer if this MGGel is an MGGroup, else return null. [詳解] | |
virtual const MGGroup * | group () 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 |
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. [詳解] | |
bool | type_is (const MGAbstractGels &types) 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 |
限定公開メンバ関数 | |
void | ReadMembers (MGIfstream &buf) |
メンバデータを読み出す関数 [詳解] | |
void | WriteMembers (MGOfstream &buf) const |
メンバデータを書き込む関数 [詳解] | |
限定公開変数類 | |
MGGroup | m_glattribs |
Attribute elements of this appearance. [詳解] | |
bool | m_no_display |
True if not to display, false if to display. [詳解] | |
A container class to hold MGGLAttrib objects.
MGAppearance acts just like as std::auto_ptr. That is, MGAppearance holds newed object pointers of MGGLAttrib, and when copy constructor or assignment operator is invoked, the pointer ownership is transfered to the new MGAppearance object. A list of newed MGGLAttrib object pointer will be stored in parent MGGroup. No two same leaf type MGGLAttrib objects are included in this list.
|
inline |
int MGAppearance::add_light | ( | MGLight * | light | ) |
Add a light. light must be a newed object, and the ownership will be transfered to this object. Function's return value is the number of lights after added.
|
inline |
|
inline |
|
inline |
|
inline |
bool MGAppearance::can_be_removed | ( | ) | const |
Test if this MGAppearance can be removed or not.
|
inline |
|
virtual |
Generate copied gel of this gel. Returned is a newed object. User must delete the object.
MGGelを実装しています。
|
inline |
Judge if the display list for vmode is made or not.
|
inlinevirtual |
Obtain display list name of the curren rendering context(MGOpenGLView). 0(null) means the current MGOpenGLView=null or MGAppearance..
MGGelを再実装しています。
|
virtual |
draw GLAttributes process.
vbo | The target graphic object. |
no_color | if true, color attribute will be neglected. |
MGGelを再実装しています。
|
inline |
|
inline |
|
inline |
Erase the specified attribute. Function's return value is the iterator after the erased data.
|
inline |
|
inline |
int MGAppearance::get_draw_attrib_mask | ( | ) | const |
Turn on the appropriate mask bit for this attribute. See glPushAttrib().
int MGAppearance::get_render_attrib_mask | ( | ) | const |
|
inlinevirtual |
Return This object's typeID.
MGAttribを再実装しています。
|
inlinevirtual |
|
inlinevirtual |
Test this is no_display MGAppearance.
MGGelを再実装しています。
bool MGAppearance::operator< | ( | const MGAppearance & | gel2 | ) | const |
comparison
|
virtual |
Assignment. When the leaf objects of this and gel2 are not equal, this assignment does nothing.
MGGelを再実装しています。
MGAppearance& MGAppearance::operator= | ( | const MGAppearance & | gel2 | ) |
|
virtual |
Output virtual function.
MGAttribを実装しています。
|
inline |
|
inline |
|
protectedvirtual |
メンバデータを読み出す関数
MGAttribを再実装しています。
MGGLAttrib* MGAppearance::release_attrib | ( | long | tid | ) |
Release the attribute of specified type. Function's return value is the MGGLAttrib* that is released.
void MGAppearance::render | ( | mgVBO & | vbo | ) | const |
render GLAttributes process.
iterator MGAppearance::search | ( | const MGGLAttrib * | atr | ) |
Search the same type MGGLAttrib leaf class object in this list. Function's return value is the iterator found. If not found, end() will be returned.
const_iterator MGAppearance::search | ( | const MGGLAttrib * | atr | ) | const |
const_iterator MGAppearance::search_by_id | ( | MGGEL_TID | tid | ) | const |
void MGAppearance::set_attrib | ( | MGGLAttrib * | attr | ) |
Set the attribute in this list. attr must be a newed object, and the ownership will be transfered to this MGAppearance.
void MGAppearance::set_attrib | ( | MGGLAttribs & | attrs | ) |
MGGLAttrib* MGAppearance::set_attrib_with_old | ( | MGGLAttrib * | attr | ) |
Set the attribute in this list. attr must be a newed object, and the ownership will be transfered to this MGAppearance. When the appearance held an attribute, the old one will be returned as the function's return value. Users must delete it.
void MGAppearance::set_back_material | ( | const float | ambient[3], |
const float | diffuse[3], | ||
const float | specular[3], | ||
const float | emission[3], | ||
float | shininess = 0. , |
||
float | transparency = 0. |
||
) |
Set the back side material. Invoking set_back_material means two sided material and setting different material to the back side. Before use of set_back_material, set_material must be invoked first. set_back_material will set two sided material.
void MGAppearance::set_color | ( | const MGColor & | color | ) |
void MGAppearance::set_color | ( | const float | color[4] | ) |
void MGAppearance::set_color | ( | float | red, |
float | green, | ||
float | blue, | ||
float | alpha = 1. |
||
) |
|
inline |
void MGAppearance::set_light_disabled | ( | ) |
void MGAppearance::set_light_enabled | ( | ) |
void MGAppearance::set_material | ( | MGRenderAttr::RENDERSIDE | rs, |
const float | ambient[3], | ||
const float | diffuse[3], | ||
const float | specular[3], | ||
const float | emission[3], | ||
float | shininess = 0. , |
||
float | transparency = 0. |
||
) |
Set the material. When rs=FRONT_AND_BACK and different material for the back side is used, set_back_material must be invoked after invoking set_material. Else the same material will be appllied for the both sides.
|
inline |
void MGAppearance::setLineStipple | ( | short int | factor, |
unsigned short | pattern | ||
) |
Line stipple属性をセットする。 When factor=0 is input, line pattern is disabled. 実線となる When factor<0, the stipple attribute is undefined. This means the attribute is defined by the environment. When factor<=0, pattern is unnecessary.
void MGAppearance::setLineWidth | ( | float | width | ) |
|
inline |
|
inlinevirtual |
MGGelを実装しています。
|
protectedvirtual |
メンバデータを書き込む関数
MGAttribを再実装しています。
|
protected |
Attribute elements of this appearance.
|
protected |
True if not to display, false if to display.