MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
StaticGLAttrib.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 
6 #ifndef _MGStaticGLAttrib_HH_
7 #define _MGStaticGLAttrib_HH_
8 
9 class MGColor;
10 #include "mg/MGCL.h"
11 
12 //
13 //Define mgStaticGLAttrib Class.
14 
16 class MG_DLL_DECLR mgStaticGLAttrib{
17 
18 public:
20  mgStaticGLAttrib(const MGColor& color, float lineWidth);
21  void setColor(const MGColor& color);
22  void setColor(const float color[4]);
23  void setLineWidth(float lineWidth){m_lineWidth=lineWidth;};
24 
30  void setLineStipple(short int factor, GLushort pattern);
31 
33  void setLightMode(int mode){m_lightMode=mode;};
34 
35  const float* color()const{return m_color;};
36  void getColor(MGColor& color);
37  float getLineWidth()const{return m_lineWidth;};
38  void getLineStipple(short int& factor, GLushort& pattern)const;
39  int getLightMode()const{return m_lightMode;};
40 
41 private:
42 
43  float m_color[4];
44  float m_lineWidth;
45  short int m_stippleFactor;
46  GLushort m_LineStipplePattern;
47 
49  int m_lightMode;
50 
51 };
52 
53 #endif //#ifndef _MGStaticGLAttrib_HH_
mgStaticGLAttrib defines MGColor and line width data of OpenGL.
Definition: StaticGLAttrib.h:16
float getLineWidth() const
Definition: StaticGLAttrib.h:37
MGColor defines the OpenGL color (R,G,B,A).
Definition: Color.h:26
const float * color() const
Definition: StaticGLAttrib.h:35
void setLineWidth(float lineWidth)
Definition: StaticGLAttrib.h:23
int getLightMode() const
Definition: StaticGLAttrib.h:39
void setLightMode(int mode)
Set light mode. mode=-1:undefined, =0:disabled, =1:enabled.
Definition: StaticGLAttrib.h:33