/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ #ifndef _MGStaticGLAttrib_HH_ #define _MGStaticGLAttrib_HH_ class MGColor; #include "mg/MGCL.h" // //Define mgStaticGLAttrib Class. ///mgStaticGLAttrib defines MGColor and line width data of OpenGL. class MG_DLL_DECLR mgStaticGLAttrib{ public: mgStaticGLAttrib(); mgStaticGLAttrib(const MGColor& color, float lineWidth); void setColor(const MGColor& color); void setColor(const float color[4]); void setLineWidth(float lineWidth){m_lineWidth=lineWidth;}; ///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 setLineStipple(short int factor, GLushort pattern); ///Set light mode. mode=-1:undefined, =0:disabled, =1:enabled. void setLightMode(int mode){m_lightMode=mode;}; const float* color()const{return m_color;}; void getColor(MGColor& color); float getLineWidth()const{return m_lineWidth;}; void getLineStipple(short int& factor, GLushort& pattern)const; int getLightMode()const{return m_lightMode;}; private: float m_color[4]; ///0:Light is enabled. }; #endif //#ifndef _MGStaticGLAttrib_HH_