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

MGRenderAttr defines the attributes of rendering attributes. [詳解]

MGRenderAttr の継承関係図
MGGLAttrib MGAttrib MGGel

公開型

enum  RENDERSIDE {
  UNDEFINED =MGGLAttrib::UNDEFINED, DISABLED =MGGLAttrib::DISABLED, FRONT =GL_FRONT, BACK =GL_BACK,
  FRONT_AND_BACK =GL_FRONT_AND_BACK
}
 
- 基底クラス MGGLAttrib に属する継承公開型
enum  FLAG { UNDEFINED =-3, DISABLED =-2 }
 
enum  ATTRIB_MASK {
  CURRENT_BIT = GL_CURRENT_BIT, POINT_BIT = GL_POINT_BIT, LINE_BIT = GL_LINE_BIT, POLYGON_BIT = GL_POLYGON_BIT,
  POLYGON_STIPPLE_BIT = GL_POLYGON_STIPPLE_BIT, PIXEL_MODE_BIT = GL_PIXEL_MODE_BIT, LIGHTING_BIT = GL_LIGHTING_BIT, FOG_BIT = GL_FOG_BIT,
  DEPTH_BUFFER_BIT = GL_DEPTH_BUFFER_BIT, ACCUM_BUFFER_BIT = GL_ACCUM_BUFFER_BIT, STENCIL_BUFFER_BIT = GL_STENCIL_BUFFER_BIT, VIEWPORT_BIT = GL_VIEWPORT_BIT,
  TRANSFORM_BIT = GL_TRANSFORM_BIT, ENABLE_BIT = GL_ENABLE_BIT, COLOR_BUFFER_BIT = GL_COLOR_BUFFER_BIT, HINT_BIT = GL_HINT_BIT,
  EVAL_BIT = GL_EVAL_BIT, LIST_BIT = GL_LIST_BIT, TEXTURE_BIT = GL_TEXTURE_BIT, SCISSOR_BIT = GL_SCISSOR_BIT
}
 

公開メンバ関数

 MGRenderAttr (RENDERSIDE rs=FRONT)
 Defines context solid color MGRenderAttr(that is, no texture mapping). [詳解]
 
 MGRenderAttr (const MGColor &solid_color)
 Defines a solid color MGRenderAttr(that is, no texture mapping) of solid_color. [詳解]
 
 MGRenderAttr (const MGRenderAttr &attr)
 copy constructor. [詳解]
 
 ~MGRenderAttr ()
 Destructor. [詳解]
 
MGRenderAttroperator= (const MGGel &gel2)
 Assignment. [詳解]
 
MGRenderAttroperator= (const MGRenderAttr &gel2)
 
bool operator< (const MGRenderAttr &gel2) const
 comparison [詳解]
 
bool operator< (const MGGel &gel2) const
 
MGRenderAttrclone () const
 Generate a newed clone object. [詳解]
 
void exec (mgVBO &vbo) const
 Invoke appropriate OpenGL fucntion to this attribute. [詳解]
 
bool is_color_shading () const
 Test if this defines color shading(returns true) or texture shading(returns false). [詳解]
 
bool is_highlight_attrib () const
 Test if this is highlight attrib or not. [詳解]
 
bool is_texture_shading () const
 Test if this defines texture shading(returns true) or color shading(returns false). [詳解]
 
bool material_defined () const
 Material. [詳解]
 
const MGMaterialmaterial () const
 
void set_material (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 set_render_side (RENDERSIDE side=FRONT)
 Set the render side. [詳解]
 
const MGMaterialback_material () const
 
RENDERSIDE render_side () const
 
GLenum GLrender_side () const
 
void set_color_shading (const MGColor &colr)
 
void drawAttrib (mgVBO &vbo, bool no_color=false) const
 draw GLAttribute process. [詳解]
 
void render (mgVBO &vbo) const
 render GLAttribute process. [詳解]
 
void set_draw_attrib_mask (unsigned int &mask) const
 Turn on the appropriate mask bit for this attribute. See glPushAttrib(). [詳解]
 
void reset_draw_attrib_mask (unsigned int &mask) const
 Turn off the appropriate mask bit for this attribute. See glPushAttrib(). [詳解]
 
void set_render_attrib_mask (unsigned int &mask) const
 Turn on the appropriate mask bit for this attribute. See glPushAttrib(). [詳解]
 
void reset_render_attrib_mask (unsigned int &mask) const
 Turn off the appropriate mask bit for this attribute. See glPushAttrib(). [詳解]
 
long identify_type () const
 Return This object's typeID. [詳解]
 
std::string whoami () const
 
void ReadMembers (MGIfstream &buf)
 Read all member data. [詳解]
 
void WriteMembers (MGOfstream &buf) const
 Write all member data. [詳解]
 
std::ostream & out (std::ostream &) const
 Output function. [詳解]
 
- 基底クラス MGGLAttrib に属する継承公開メンバ関数
 MGGLAttrib (int flag=UNDEFINED)
 
virtual MGGLAttriboperator= (const MGGLAttrib &gel2)
 
bool undefined () const
 
bool defined () const
 
bool disabled () const
 
bool enabled () const
 
void set_undefined ()
 
void set_disabled ()
 
int data () const
 retrieve the data. [詳解]
 
int & data ()
 
bool same_type (const MGGLAttrib &at2) const
 Compare if this and at2 are the same leaf MGGLAttrib class. [詳解]
 
- 基底クラス 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 mgVBOdlist_name () const
 Obtain display list name. 0(null) means this gel need not to be displayed. [詳解]
 
virtual void make_display_list (MGCL::VIEWMODE vmode=MGCL::DONTCARE) const
 Make a display list of this gel. [詳解]
 
virtual int manifold_dimension () const
 
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
 
virtual bool no_display () 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
 

フレンド

MG_DLL_DECLR friend GLenum GLrender_side (RENDERSIDE rs)
 

その他の継承メンバ

- 基底クラス MGGLAttrib に属する継承限定公開メンバ関数
MGGLAttribset_glattrib (const MGGLAttrib &gel2)
 Assignment. [詳解]
 
- 基底クラス MGGLAttrib に属する継承限定公開変数類
int m_flag
 

詳解

MGRenderAttr defines the attributes of rendering attributes.

These attrubutes are not used for drawing(line drawing mode). Regarding to m_material, m_back_material, MGRenderAttr behaves just like auto_ptr. That is, these three pointers are newed object pointers, and when used in copy constructor or assignment, the ownerships are transfered to the new MGRenderAttr object.

構築子と解体子

MGRenderAttr::MGRenderAttr ( RENDERSIDE  rs = FRONT)
inline

Defines context solid color MGRenderAttr(that is, no texture mapping).

MGRenderAttr::MGRenderAttr ( const MGColor solid_color)
inline

Defines a solid color MGRenderAttr(that is, no texture mapping) of solid_color.

MGRenderAttr::MGRenderAttr ( const MGRenderAttr attr)

copy constructor.

MGRenderAttr::~MGRenderAttr ( )

Destructor.

関数詳解

const MGMaterial* MGRenderAttr::back_material ( ) const

Return the material pointer of the back side when this has the two sided rendering (FRONT_AND_BACK) and the different materials are applied to each side. NULL will be returned when render_side()!=FRONT_AND_BACK. Even when render_side()==FRONT_AND_BACK, if m_back_material==null(the same material is applied to both side), null will be returned.

MGRenderAttr* MGRenderAttr::clone ( ) const
virtual

Generate a newed clone object.

MGGLAttribを実装しています。

void MGRenderAttr::drawAttrib ( mgVBO vbo,
bool  no_color = false 
) const
inlinevirtual

draw GLAttribute process.

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

MGGLAttribを実装しています。

void MGRenderAttr::exec ( mgVBO vbo) const

Invoke appropriate OpenGL fucntion to this attribute.

GLenum MGRenderAttr::GLrender_side ( ) const
inline
long MGRenderAttr::identify_type ( ) const
inlinevirtual

Return This object's typeID.

MGGLAttribを再実装しています。

bool MGRenderAttr::is_color_shading ( ) const

Test if this defines color shading(returns true) or texture shading(returns false).

bool MGRenderAttr::is_highlight_attrib ( ) const
inlinevirtual

Test if this is highlight attrib or not.

MGGLAttribを再実装しています。

bool MGRenderAttr::is_texture_shading ( ) const

Test if this defines texture shading(returns true) or color shading(returns false).

const MGMaterial* MGRenderAttr::material ( ) const
inline
bool MGRenderAttr::material_defined ( ) const

Material.

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

comparison

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

MGGelを再実装しています。

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

Assignment.

MGGelを再実装しています。

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

Output function.

MGGLAttribを再実装しています。

void MGRenderAttr::ReadMembers ( MGIfstream buf)
virtual

Read all member data.

MGGLAttribを再実装しています。

void MGRenderAttr::render ( mgVBO vbo) const
inlinevirtual

render GLAttribute process.

MGGLAttribを実装しています。

RENDERSIDE MGRenderAttr::render_side ( ) const
inline

Get the render side. FRONT:render front side, BACK:render back side, FRONT_AND_BACK: render both sides.

void MGRenderAttr::reset_draw_attrib_mask ( unsigned int &  mask) const
inlinevirtual

Turn off the appropriate mask bit for this attribute. See glPushAttrib().

MGGLAttribを実装しています。

void MGRenderAttr::reset_render_attrib_mask ( unsigned int &  mask) const
virtual

Turn off the appropriate mask bit for this attribute. See glPushAttrib().

MGGLAttribを実装しています。

void MGRenderAttr::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 MGRenderAttr::set_color_shading ( const MGColor colr)

Set this attribute as color shading and set the color. When colr.disabled(), will be changed to undefined().

void MGRenderAttr::set_draw_attrib_mask ( unsigned int &  mask) const
virtual

Turn on the appropriate mask bit for this attribute. See glPushAttrib().

MGGLAttribを実装しています。

void MGRenderAttr::set_material ( 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 MGRenderAttr::set_render_attrib_mask ( unsigned int &  mask) const
virtual

Turn on the appropriate mask bit for this attribute. See glPushAttrib().

MGGLAttribを実装しています。

void MGRenderAttr::set_render_side ( RENDERSIDE  side = FRONT)
inline

Set the render side.

std::string MGRenderAttr::whoami ( ) const
inlinevirtual

MGGelを実装しています。

void MGRenderAttr::WriteMembers ( MGOfstream buf) const
virtual

Write all member data.

MGGLAttribを再実装しています。

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

MG_DLL_DECLR friend GLenum GLrender_side ( RENDERSIDE  rs)
friend

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