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

A container class to hold MGGLAttrib objects. [詳解]

MGAppearance の継承関係図
MGAttrib MGGel

公開型

typedef MGGroup::iterator iterator
 
typedef MGGroup::const_iterator const_iterator
 

公開メンバ関数

 MGAppearance ()
 
MGAppearanceoperator= (const MGGel &gel2)
 
MGAppearanceoperator= (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. [詳解]
 
MGAttribback ()
 
const MGAttribback () const
 
iterator begin ()
 
const_iterator begin () const
 
void clear ()
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
MGAttribfront ()
 
const MGAttribfront () 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. [詳解]
 
MGAppearanceclone () const
 
void drawAttrib (mgVBO &vbo, bool no_color=false) const
 draw GLAttributes process. [詳解]
 
virtual mgVBOdlist_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. [詳解]
 
MGGLAttribrelease_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)
 
MGGLAttribset_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 MGAttriboperator= (const MGAttrib &gel2)
 
MGAttribattrib ()
 Return MGAttrib pointer if this MGGel is an MGAttrib, else return null. [詳解]
 
const MGAttribattrib () const
 
const MGObjectincludes_object () const
 Test if this gel includes an object. [詳解]
 
MGObjectincludes_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 MGGroupgroup ()
 Return MGGroup pointer if this MGGel is an MGGroup, else return null. [詳解]
 
virtual const MGGroupgroup () 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
 
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.

型定義メンバ詳解

構築子と解体子

MGAppearance::MGAppearance ( )
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.

MGAttrib* MGAppearance::back ( )
inline
const MGAttrib* MGAppearance::back ( ) const
inline
iterator MGAppearance::begin ( )
inline
const_iterator MGAppearance::begin ( ) const
inline
bool MGAppearance::can_be_removed ( ) const

Test if this MGAppearance can be removed or not.

void MGAppearance::clear ( )
inline
MGAppearance* MGAppearance::clone ( ) const
virtual

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

MGGelを実装しています。

bool MGAppearance::displayList_is_made ( MGCL::VIEWMODE  vmode) const
inline

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

virtual mgVBO* MGAppearance::dlist_name ( ) const
inlinevirtual

Obtain display list name of the curren rendering context(MGOpenGLView). 0(null) means the current MGOpenGLView=null or MGAppearance..

MGGelを再実装しています。

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

draw GLAttributes process.

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

MGGelを再実装しています。

bool MGAppearance::empty ( ) const
inline
iterator MGAppearance::end ( )
inline
const_iterator MGAppearance::end ( ) const
inline
iterator MGAppearance::erase ( iterator  i)
inline

Erase the specified attribute. Function's return value is the iterator after the erased data.

MGAttrib* MGAppearance::front ( )
inline
const MGAttrib* MGAppearance::front ( ) const
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
long MGAppearance::identify_type ( ) const
inlinevirtual

Return This object's typeID.

MGAttribを再実装しています。

int MGAppearance::manifold_dimension ( ) const
inlinevirtual

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

MGGelを再実装しています。

bool MGAppearance::no_display ( ) const
inlinevirtual

Test this is no_display MGAppearance.

MGGelを再実装しています。

bool MGAppearance::operator< ( const MGAppearance gel2) const

comparison

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

MGGelを再実装しています。

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

Assignment. When the leaf objects of this and gel2 are not equal, this assignment does nothing.

MGGelを再実装しています。

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

Output virtual function.

MGAttribを実装しています。

void MGAppearance::pop_back ( )
inline
void MGAppearance::pop_front ( )
inline
void MGAppearance::ReadMembers ( MGIfstream buf)
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
iterator MGAppearance::search_by_id ( MGGEL_TID  tid)
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. 
)
void MGAppearance::set_display ( )
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.

void MGAppearance::set_no_display ( )
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)
int MGAppearance::size ( ) const
inline
virtual std::string MGAppearance::whoami ( ) const
inlinevirtual

MGGelを実装しています。

void MGAppearance::WriteMembers ( MGOfstream buf) const
protectedvirtual

メンバデータを書き込む関数

MGAttribを再実装しています。

メンバ詳解

MGGroup MGAppearance::m_glattribs
protected

Attribute elements of this appearance.

bool MGAppearance::m_no_display
protected

True if not to display, false if to display.


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