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

MGLight is an abstract base class for light sources. [詳解]

MGLight の継承関係図
MGGLAttrib MGAttrib MGGel MGDirectionalLight MGPointLight MGSpotLight

公開型

enum  LIGHT_MODE { UNDEFINED =MGGLAttrib::UNDEFINED, OFF =MGGLAttrib::DISABLED, ON =1 }
 
- 基底クラス 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
}
 

公開メンバ関数

 MGLight ()
 
 MGLight (float intensity, float ambientIntensity, const float color[3])
 
virtual MGLightoperator= (const MGGel &gel2)
 virtual ~MGLight(); [詳解]
 
virtual MGLightoperator= (const MGLight &gel2)
 
virtual bool operator< (const MGLight &gel2) const
 comparison [詳解]
 
virtual bool operator< (const MGGel &gel2) const
 
virtual MGLightclone () const
 Generate a newed clone object. [詳解]
 
virtual int exec () const
 
virtual void drawAttrib (mgVBO &vbo, bool no_color=false) const
 draw GLAttribute process. [詳解]
 
GLenum get_light_num () const
 Obtain the light number of this. [詳解]
 
bool light_is_on () const
 
virtual void render (mgVBO &vbo) const
 render GLAttribute process. [詳解]
 
virtual void set_draw_attrib_mask (unsigned int &mask) const
 Turn on the appropriate mask bit for this attribute. See glPushAttrib(). [詳解]
 
void set_light_number (int lnum)
 Set light number. [詳解]
 
virtual void reset_draw_attrib_mask (unsigned int &mask) const
 Turn off the appropriate mask bit for this attribute. See glPushAttrib(). [詳解]
 
virtual void set_render_attrib_mask (unsigned int &mask) const
 Turn on the appropriate mask bit for this attribute. See glPushAttrib(). [詳解]
 
virtual void reset_render_attrib_mask (unsigned int &mask) const
 Turn off the appropriate mask bit for this attribute. See glPushAttrib(). [詳解]
 
void setIntensity (float intensity)
 
float getIntensity () const
 
void setAmbientIntensity (float ambientIntensity)
 
float getAmbientIntensity () const
 
void setColor (const float color[3])
 
void getColor (float color[3])
 
void setColor (float v0, float v1, float v2)
 
void getColor (float &v0, float &v1, float &v2)
 
virtual std::string whoami () const
 
int turn_off ()
 Turn on this light, returned is the old state(UNDEFINED/OFF/ON). [詳解]
 
int turn_on ()
 Turn on this light, returned is the old state(UNDEFINED/OFF/ON). [詳解]
 
virtual void ReadMembers (MGIfstream &buf)
 Read all member data. [詳解]
 
virtual void WriteMembers (MGOfstream &buf) const
 Write all member data. [詳解]
 
virtual std::ostream & out (std::ostream &) const
 Output virtual 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 ()
 
virtual bool is_highlight_attrib () const
 Test if this is highlight attrib or not. [詳解]
 
virtual long identify_type () const
 Return This object's typeID. [詳解]
 
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
 

静的公開メンバ関数

static void ResetLight (GLint lightNo)
 

限定公開メンバ関数

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

限定公開変数類

unsigned int m_lightNum
 
float m_intensity
 Color number of this light. [詳解]
 
float m_ambientIntensity
 applied to GL_AMBIENT [詳解]
 
float m_color [3]
 applied to GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR [詳解]
 
- 基底クラス MGGLAttrib に属する継承限定公開変数類
int m_flag
 

フレンド

MG_DLL_DECLR friend std::ostream & operator<< (std::ostream &, const MGLight &)
 

詳解

MGLight is an abstract base class for light sources.

MGDirectionalLight,MGPointLight, or MGSpotLight are the inheritted classes.

構築子と解体子

MGLight::MGLight ( )
MGLight::MGLight ( float  intensity,
float  ambientIntensity,
const float  color[3] 
)
引数
intensityapplied to GL_DIFFUSE and GL_SPECULAR
ambientIntensityapplied to GL_AMBIENT
colorapplied to GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR

関数詳解

virtual MGLight* MGLight::clone ( ) const
virtual

Generate a newed clone object.

MGGLAttribを実装しています。

MGSpotLight, MGPointLight, MGDirectionalLightで再実装されています。

virtual void MGLight::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を実装しています。

virtual int MGLight::exec ( ) const
virtual

render process. Function's return value is the lightnumber of this light executed.

MGPointLight, MGSpotLight, MGDirectionalLightで再実装されています。

GLenum MGLight::get_light_num ( ) const

Obtain the light number of this.

float MGLight::getAmbientIntensity ( ) const
inline
void MGLight::getColor ( float  color[3])
inline
void MGLight::getColor ( float &  v0,
float &  v1,
float &  v2 
)
inline
float MGLight::getIntensity ( ) const
inline
bool MGLight::light_is_on ( ) const
inline

Test if this light is on, or off. True: light is on, false light is off or undefined.

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

comparison

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

MGGelを再実装しています。

MGSpotLight, MGPointLight, MGDirectionalLightで再実装されています。

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

virtual ~MGLight();

Assignment Assignment

MGGelを再実装しています。

MGSpotLight, MGPointLight, MGDirectionalLightで再実装されています。

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

Output virtual function.

MGGLAttribを再実装しています。

MGPointLight, MGSpotLight, MGDirectionalLightで再実装されています。

virtual void MGLight::ReadMembers ( MGIfstream buf)
virtual

Read all member data.

MGGLAttribを再実装しています。

MGPointLight, MGSpotLight, MGDirectionalLightで再実装されています。

virtual void MGLight::render ( mgVBO vbo) const
inlinevirtual

render GLAttribute process.

MGGLAttribを実装しています。

virtual void MGLight::reset_draw_attrib_mask ( unsigned int &  mask) const
inlinevirtual

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

MGGLAttribを実装しています。

virtual void MGLight::reset_render_attrib_mask ( unsigned int &  mask) const
inlinevirtual

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

MGGLAttribを実装しています。

static void MGLight::ResetLight ( GLint  lightNo)
static
virtual void MGLight::set_draw_attrib_mask ( unsigned int &  mask) const
inlinevirtual

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

MGGLAttribを実装しています。

MGLight& MGLight::set_light ( const MGLight gel2)
protected

assignment

void MGLight::set_light_number ( int  lnum)
inline

Set light number.

virtual void MGLight::set_render_attrib_mask ( unsigned int &  mask) const
inlinevirtual

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

MGGLAttribを実装しています。

void MGLight::setAmbientIntensity ( float  ambientIntensity)
inline
void MGLight::setColor ( const float  color[3])
inline
void MGLight::setColor ( float  v0,
float  v1,
float  v2 
)
inline
void MGLight::setIntensity ( float  intensity)
inline
int MGLight::turn_off ( )

Turn on this light, returned is the old state(UNDEFINED/OFF/ON).

int MGLight::turn_on ( )

Turn on this light, returned is the old state(UNDEFINED/OFF/ON).

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

MGGelを実装しています。

MGPointLight, MGSpotLight, MGDirectionalLightで再実装されています。

virtual void MGLight::WriteMembers ( MGOfstream buf) const
virtual

Write all member data.

MGGLAttribを再実装しています。

MGPointLight, MGSpotLight, MGDirectionalLightで再実装されています。

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

MG_DLL_DECLR friend std::ostream& operator<< ( std::ostream &  ,
const MGLight  
)
friend

メンバ詳解

float MGLight::m_ambientIntensity
protected

applied to GL_AMBIENT

float MGLight::m_color[3]
protected

applied to GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR

float MGLight::m_intensity
protected

Color number of this light.

applied to GL_DIFFUSE and GL_SPECULAR

unsigned int MGLight::m_lightNum
protected

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