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

A directional light source. [詳解]

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

公開型

enum  { DIRECTION =1, EXPONENT, CUT_OFF_ANGLE }
 Field enums. [詳解]
 
- 基底クラス MGLight に属する継承公開型
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
}
 

公開メンバ関数

 MGSpotLight ()
 
 MGSpotLight (float intensity, float ambientIntensity, const float color[3], const MGPosition &location, float radius, const float attenuation[3], const MGVector &direction, float exponent, float cutOffAngle)
 
MGSpotLightoperator= (const MGGel &gel2)
 ~MGSpotLight(); [詳解]
 
MGSpotLightoperator= (const MGSpotLight &gel2)
 
bool operator< (const MGSpotLight &gel2) const
 comparison [詳解]
 
bool operator< (const MGGel &gel2) const
 
MGSpotLightclone () const
 Generate a newed clone object. [詳解]
 
void setDirection (const MGVector &direction)
 
void setDirection (const float direction[3])
 
void setDirection (float v0, float v1, float v2)
 
void getDirection (MGVector &direction)
 
void getDirection (float direction[3])
 
void getDirection (float &v0, float &v1, float &v2)
 
void setExponent (float exponent)
 
float getExponent ()
 
void setCutOffAngle (float cutOffAngle)
 
float getCutOffAngle ()
 
int exec () const
 
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. [詳解]
 
virtual void transform (const MGVector &v)
 
virtual void transform (double scale)
 scaling. [詳解]
 
virtual void transform (const MGMatrix &mat)
 matrix transformation. [詳解]
 
virtual void transform (const MGTransf &tr)
 general transformation. [詳解]
 
- 基底クラス MGPointLight に属する継承公開メンバ関数
 MGPointLight ()
 
 MGPointLight (float intensity, float ambientIntensity, const float color[3], const MGPosition &location, float radius, const float attenuation[3])
 
MGPointLightoperator= (const MGPointLight &gel2)
 
bool operator< (const MGPointLight &gel2) const
 comparison [詳解]
 
void setLocation (const MGPosition &location)
 
void setLocation (const float location[3])
 
void setLocation (float x, float y, float z)
 
void getLocation (MGPosition &location) const
 
void getLocation (float location[3]) const
 
void getLocation (float &x, float &y, float &z) const
 
void setRadius (float radius)
 
float getRadius () const
 
void setAttenuation (const float attenuation[3])
 
void setAttenuation (float const_att, float linear_att, float quadratic_att)
 
void getAttenuation (float attenuation[3]) const
 
void getAttenuation (float &const_att, float &linear_att, float &quadratic_att) const
 
- 基底クラス MGLight に属する継承公開メンバ関数
 MGLight ()
 
 MGLight (float intensity, float ambientIntensity, const float color[3])
 
virtual MGLightoperator= (const MGLight &gel2)
 
virtual bool operator< (const MGLight &gel2) const
 comparison [詳解]
 
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)
 
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). [詳解]
 
- 基底クラス 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. [詳解]
 
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
 
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
 

その他の継承メンバ

- 基底クラス MGLight に属する継承静的公開メンバ関数
static void ResetLight (GLint lightNo)
 
- 基底クラス MGLight に属する継承限定公開メンバ関数
MGLightset_light (const MGLight &gel2)
 assignment [詳解]
 
- 基底クラス MGGLAttrib に属する継承限定公開メンバ関数
MGGLAttribset_glattrib (const MGGLAttrib &gel2)
 Assignment. [詳解]
 
- 基底クラス MGLight に属する継承限定公開変数類
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
 

詳解

A directional light source.

Because MGSpotLight is subclassed from MGPointLight, MGSpotLight can be positioned in a world. The light emanates as a cone; the axis of the cone(m_direction) specifies the direction of the spot light.

構築子と解体子

MGSpotLight::MGSpotLight ( )
MGSpotLight::MGSpotLight ( float  intensity,
float  ambientIntensity,
const float  color[3],
const MGPosition location,
float  radius,
const float  attenuation[3],
const MGVector direction,
float  exponent,
float  cutOffAngle 
)
引数
intensityapplied to GL_DIFFUSE and GL_SPECULAR
ambientIntensityapplied to GL_AMBIENT
colorapplied to GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR
locationThe light position.
radiusThe light radius.
attenuation[0]=GL_CONSTANT_ATTENUATION, [1]=GL_LINEAR_ATTENUATION [2]=GL_QUADRATIC_ATTENUATION
directionGL_SPOT_DIRECTION
exponentGL_SPOT_EXPONENT
cutOffAngleGL_SPOT_CUTOFF

関数詳解

MGSpotLight* MGSpotLight::clone ( ) const
virtual

Generate a newed clone object.

MGPointLightを再実装しています。

int MGSpotLight::exec ( ) const
virtual

Invoke appropriate OpenGL fucntion to the drawing environment. Function's return value is the lightnumber of this light executed.

MGPointLightを再実装しています。

float MGSpotLight::getCutOffAngle ( )
inline
void MGSpotLight::getDirection ( MGVector direction)
void MGSpotLight::getDirection ( float  direction[3])
inline
void MGSpotLight::getDirection ( float &  v0,
float &  v1,
float &  v2 
)
inline
float MGSpotLight::getExponent ( )
inline
long MGSpotLight::identify_type ( ) const
inlinevirtual

Return This object's typeID.

MGPointLightを再実装しています。

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

comparison

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

MGPointLightを再実装しています。

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

~MGSpotLight();

Assignment

MGPointLightを再実装しています。

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

Output function.

MGPointLightを再実装しています。

void MGSpotLight::ReadMembers ( MGIfstream buf)
virtual

Read all member data.

MGPointLightを再実装しています。

void MGSpotLight::setCutOffAngle ( float  cutOffAngle)
inline
void MGSpotLight::setDirection ( const MGVector direction)
void MGSpotLight::setDirection ( const float  direction[3])
inline
void MGSpotLight::setDirection ( float  v0,
float  v1,
float  v2 
)
inline
void MGSpotLight::setExponent ( float  exponent)
inline
virtual void MGSpotLight::transform ( const MGVector v)
virtual

Transform the gel by the argument. translation

MGPointLightを再実装しています。

virtual void MGSpotLight::transform ( double  scale)
virtual

scaling.

MGPointLightを再実装しています。

virtual void MGSpotLight::transform ( const MGMatrix mat)
virtual

matrix transformation.

MGPointLightを再実装しています。

virtual void MGSpotLight::transform ( const MGTransf tr)
virtual

general transformation.

MGPointLightを再実装しています。

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

MGPointLightを再実装しています。

void MGSpotLight::WriteMembers ( MGOfstream buf) const
virtual

Write all member data.

MGPointLightを再実装しています。


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