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

MGColor defines the OpenGL color (R,G,B,A). [詳解]

MGColor の継承関係図
MGGLAttrib MGAttrib MGGel

公開型

enum  MODE { UNDEFINED =MGGLAttrib::UNDEFINED, DISABLED =MGGLAttrib::DISABLED, ENABLED =1 }
 
enum  ColorID {
  dummy = 0, Black = 1, Red = 2, Green = 3,
  Blue = 4, Yellow = 5, Magenta = 6, Cyan = 7,
  White = 8, AliceBlue, AntiqueWhite, Aqua,
  Aquamarine, Azure, Beige, Bisque,
  BlanchedAlmond, BlueViolet, Brown, BurlyWood,
  CadetBlue, Chartreuse, Chocolate, Coral,
  CornflowerBlue, Cornsilk, Crimson, DarkBlue,
  DarkCyan, DarkGoldenrod, DarkGray, DarkGreen,
  DarkKhaki, DarkMagenta, DarkOliveGreen, DarkOrange,
  DarkOrchid, DarkRed, DarkSalmon, DarkSeaGreen,
  DarkSlateBlue, DarkSlateGray, DarkTurquoise, DarkViolet,
  DeepPink, DeepSkyBlue, DimGray, DodgerBlue,
  Firebrick, FloralWhite, ForestGreen, Fuchsia,
  Gainsboro, GhostWhite, Gold, Goldenrod,
  Gray, GreenYellow, Honeydew, HotPink,
  IndianRed, Indigo, Ivory, Khaki,
  Lavender, LavenderBlush, LawnGreen, LemonChiffon,
  LightBlue, LightCoral, LightCyan, LightGoldenrodYellow,
  LightGray, LightGreen, LightPink, LightSalmon,
  LightSeaGreen, LightSkyBlue, LightSlateGray, LightSteelBlue,
  LightYellow, Lime, LimeGreen, Linen,
  Maroon, MediumAquamarine, MediumBlue, MediumOrchid,
  MediumPurple, MediumSeaGreen, MediumSlateBlue, MediumSpringGreen,
  MediumTurquoise, MediumVioletRed, MidnightBlue, MintCream,
  MistyRose, Moccasin, NavajoWhite, Navy,
  OldLace, Olive, OliveDrab, Orange,
  OrangeRed, Orchid, PaleGoldenrod, PaleGreen,
  PaleTurquoise, PaleVioletRed, PapayaWhip, PeachPuff,
  Peru, Pink, Plum, PowderBlue,
  Purple, RosyBrown, RoyalBlue, SaddleBrown,
  Salmon, SandyBrown, SeaGreen, SeaShell,
  Sienna, Silver, SkyBlue, SlateBlue,
  SlateGray, Snow, SpringGreen, SteelBlue,
  Tan, Teal, Thistle, Tomato,
  Transparent, Turquoise, Violet, Wheat,
  WhiteSmoke, YellowGreen, endID
}
 The color id from 1 to 8(black to white) is the id of IGES. [詳解]
 
- 基底クラス 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
}
 

公開メンバ関数

 MGColor (MODE m=UNDEFINED)
 
 MGColor (float red, float green, float blue, float alpha=1.)
 Construct a color from float values. [詳解]
 
 MGColor (const MGPixel &pixel)
 
 MGColor (unsigned int argb)
 
MGColoroperator= (const MGGel &gel2)
 Assignment. [詳解]
 
MGColoroperator= (const MGColor &gel2)
 
MGColoroperator*= (float scale)
 
MGColoroperator+= (float value)
 
bool operator< (const MGColor &gel2) const
 comparison [詳解]
 
bool operator< (const MGGel &gel2) const
 
void argb_to_float (unsigned int argb, float out[4]) const
 helper function [詳解]
 
MGColorclone () const
 Generate a newed clone object. [詳解]
 
void exec () const
 Invoke appropriate OpenGL fucntion to the drawing environment. [詳解]
 
void exec (mgVBO &vbo) const
 vboに対して色属性をセットする [詳解]
 
float * color ()
 
const float * color () const
 
int get_ColorID (int maxID) const
 
bool is_highlight_attrib () const
 Test if this is highlight attrib or not. [詳解]
 
unsigned int get_colorAsUInt ()
 
void set_color (const float color[4])
 
void set_color (float red, float green, float blue, float alpha=1.)
 
void get_color (float color[4]) const
 
void get_color (float &red, float &green, float &blue, float &alpha) const
 
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_enabled ()
 
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. [詳解]
 
int out_to_IGES (MGIgesOfstream &igesfile, int SubordinateEntitySwitch=0) const
 
- 基底クラス 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 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 const MGColorget_instance (ColorID id)
 Get the color instance reference by the color id. [詳解]
 
static int get_ARGBinstance (MGColor::ColorID id)
 

その他の継承メンバ

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

詳解

MGColor defines the OpenGL color (R,G,B,A).

構築子と解体子

MGColor::MGColor ( MODE  m = UNDEFINED)
inline
MGColor::MGColor ( float  red,
float  green,
float  blue,
float  alpha = 1. 
)

Construct a color from float values.

MGColor::MGColor ( const MGPixel pixel)
MGColor::MGColor ( unsigned int  argb)
explicit

Construct a color from ARGB value. In argb, each 8bits of (a,r,g,b) is the value of the range 0 to 255 .

関数詳解

void MGColor::argb_to_float ( unsigned int  argb,
float  out[4] 
) const

helper function

MGColor* MGColor::clone ( ) const
virtual

Generate a newed clone object.

MGGLAttribを実装しています。

float* MGColor::color ( )
inline
const float* MGColor::color ( ) const
inline
void MGColor::drawAttrib ( mgVBO vbo,
bool  no_color = false 
) const
virtual

draw GLAttribute process.

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

MGGLAttribを実装しています。

void MGColor::exec ( ) const

Invoke appropriate OpenGL fucntion to the drawing environment.

void MGColor::exec ( mgVBO vbo) const

vboに対して色属性をセットする

static int MGColor::get_ARGBinstance ( MGColor::ColorID  id)
static

Get unsigned integer valur of a color id. Function's return value is (A, R, G, B) data of GDI+.

void MGColor::get_color ( float  color[4]) const
void MGColor::get_color ( float &  red,
float &  green,
float &  blue,
float &  alpha 
) const
unsigned int MGColor::get_colorAsUInt ( )

get unsigned integer value of this color return 0xAARRGGBB

int MGColor::get_ColorID ( int  maxID) const

get the color id of GDI+ color enumeration. If not found, 0 will be returned. maxID is the max id of ColorID enumeration.

static const MGColor& MGColor::get_instance ( ColorID  id)
static

Get the color instance reference by the color id.

long MGColor::identify_type ( ) const
inlinevirtual

Return This object's typeID.

MGGLAttribを再実装しています。

bool MGColor::is_highlight_attrib ( ) const
inlinevirtual

Test if this is highlight attrib or not.

MGGLAttribを再実装しています。

MGColor& MGColor::operator*= ( float  scale)

Scaling the color values by the factor scale. All of the elements except trancparency element will be multiplied by the scale and be clamped between 0. and 1.

MGColor& MGColor::operator+= ( float  value)

Add a color values to RGB data.. All of the elements except trancparency element will be added by value and be clamped between 0. and 1.

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

comparison

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

MGGelを再実装しています。

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

Assignment.

MGGelを再実装しています。

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

Output function.

MGGLAttribを再実装しています。

int MGColor::out_to_IGES ( MGIgesOfstream igesfile,
int  SubordinateEntitySwitch = 0 
) const
virtual

Output to IGES stream file(Color=PD314). Function's return value is the directory entry id created.

MGGelを再実装しています。

void MGColor::ReadMembers ( MGIfstream buf)
virtual

Read all member data.

MGGLAttribを再実装しています。

void MGColor::render ( mgVBO vbo) const
inlinevirtual

render GLAttribute process.

MGGLAttribを実装しています。

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

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

MGGLAttribを実装しています。

void MGColor::reset_render_attrib_mask ( unsigned int &  mask) const
inlinevirtual

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

MGGLAttribを実装しています。

void MGColor::set_color ( const float  color[4])
void MGColor::set_color ( float  red,
float  green,
float  blue,
float  alpha = 1. 
)
void MGColor::set_draw_attrib_mask ( unsigned int &  mask) const
inlinevirtual

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

MGGLAttribを実装しています。

void MGColor::set_enabled ( )
inline

Set this color be enabled. set_disabled() is provided by MGGLAttrib. This can be used display/undisplay.

void MGColor::set_render_attrib_mask ( unsigned int &  mask) const
inlinevirtual

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

MGGLAttribを実装しています。

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

MGGelを実装しています。

void MGColor::WriteMembers ( MGOfstream buf) const
virtual

Write all member data.

MGGLAttribを再実装しています。


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