MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
VBOElement.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 
6 #if !defined(_MGVBOELEMENT__INCLUDED_)
7 #define _MGVBOELEMENT__INCLUDED_
8 
9 #if _MSC_VER > 1000
10 #pragma once
11 #endif // _MSC_VER > 1000
12 
13 #include "MGCLStdAfx.h"
14 #include "mg/Pvector.h"
15 #include "mg/drawParam.h"
16 #include "mgGL/Color.h"
17 #include "mgGL/GLAttrib.h"
18 
19 class MGPosition;
20 class MGBox;
21 class MGBPointSeq;
22 class MGSPointSeq;
23 class MGCurve;
24 class MGSPointSeq;
25 class mgTL2Triangles;
26 class MGStl;
27 class MGColor;
28 class MGAttribedGel;
29 class MGComplex;
30 class MGCellBase;
31 class mgVBOLeafBuilder;
32 class mgVBOLeaf;
33 class mgTexture;
34 
40 // mgVBOElement
42 
44 class MG_DLL_DECLR mgVBOElement{
45 friend class mgVBO;
46 
47 public:
48 
50 
51 virtual ~mgVBOElement(){;};
52 
55 virtual bool is_made(MGCL::VIEWMODE viewMode=MGCL::DONTCARE)=0;
56 
58 virtual void make_display_list(MGCL::VIEWMODE vmode=MGCL::DONTCARE)=0;
59 
62 virtual void draw(MGCL::VIEWMODE viewMode=MGCL::DONTCARE)=0;
63 
66 virtual void redraw(MGCL::VIEWMODE viewMode)=0;
67 
71 virtual void selectionDraw(MGCL::VIEWMODE viewMode=MGCL::DONTCARE)=0;
72 
76 virtual unsigned getDName()const=0;
77 
81 virtual GLuint getSelectionName()const=0;
82 
84 virtual mgVBO* vboPointer(){return 0;};
85 
87 virtual const mgVBOLeaf* leafPointer(){return 0;};
88 
90 virtual void set_display(){ m_no_display=false;};
91 virtual void set_no_display(){ m_no_display=true;};
92 virtual bool getNoDisplayMode()const{return m_no_display;};
93 bool is_no_display()const{return getNoDisplayMode();};
94 bool is_display()const{return !is_no_display();};
95 
98 static void setDrawParam(const MGDrawParam& dpara){m_drawPara=dpara;};
99 static MGDrawParam& getDrawParam(){return m_drawPara;};
100 static void setHilightColor(const MGColor& hcolor){m_hilightColor=hcolor;};
101 static const MGColor& getHilightColor(){return m_hilightColor;};
102 static void setDefaultPointSize(GLfloat psize){m_pointSize=psize;};
103 static GLfloat getDefaultPointSize(){return m_pointSize;};
104 
105 protected:
106 
107  bool m_no_display:1;
108 
110 private:
111  static MGDrawParam m_drawPara;
112  static MGColor m_hilightColor;
113  static GLfloat m_pointSize;
114 
115 };
116  // end of DisplayHandling group
118 #endif // !defined(_MGVBOELEMENT__INCLUDED_)
Interface class to include an element in mgVBO class's.
Definition: VBOElement.h:44
Is an abstract class and the super class of MGPVertex and MGCellNB.
Definition: CellBase.h:38
virtual const mgVBOLeaf * leafPointer()
When this is a mgVBOLeaf, return the mgVBOLeaf pointer.
Definition: VBOElement.h:87
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
virtual GLuint getSelectionName() const
Definition: MGCL.h:272
virtual bool getNoDisplayMode() const
Definition: VBOElement.h:92
mgVBOElement()
Definition: VBOElement.h:49
virtual void set_display()
set_display/set_no_display controls if this mgVBO be displayed or not.
Definition: VBOElement.h:90
A vector of mgTL2Triangle's.
Definition: TL2Triangles.h:25
virtual void make_display_list(MGCL::VIEWMODE vmode=MGCL::DONTCARE)
static void setHilightColor(const MGColor &hcolor)
Definition: VBOElement.h:100
virtual void draw(MGCL::VIEWMODE viewMode=MGCL::DONTCARE)
Defines a Box of any space dimendion.
Definition: Box.h:34
MGColor defines the OpenGL color (R,G,B,A).
Definition: Color.h:26
Defines parameters to draw MGObject, maily to approximate by lines and facets.
Definition: drawParam.h:53
static const MGColor & getHilightColor()
Definition: VBOElement.h:101
virtual bool is_made(MGCL::VIEWMODE viewMode=MGCL::DONTCARE)
Is an abstract class which provides interfaces of MGGel that has MGAppearance.
Definition: AttribedGel.h:32
Represent a positional data.
Definition: Position.h:28
virtual ~mgVBOElement()
Definition: VBOElement.h:51
Texture definition class.
Definition: Texture.h:29
static GLfloat getDefaultPointSize()
Definition: VBOElement.h:103
static MGDrawParam & getDrawParam()
Definition: VBOElement.h:99
static void setDefaultPointSize(GLfloat psize)
Definition: VBOElement.h:102
Defines BPoint seq of a space dimension and of a capacity.
Definition: BPointSeq.h:38
VIEWMODE
Definition: MGCL.h:271
MGStl is a concrete class which represents an STL information.
Definition: MGStl.h:34
virtual void selectionDraw(MGCL::VIEWMODE viewMode=MGCL::DONTCARE)
virtual void set_no_display()
Definition: VBOElement.h:91
virtual mgVBO * vboPointer()
When this is a mgVBOPointer, return the vbo pointer referenced.
Definition: VBOElement.h:84
MGComplex is a container of parameter cells and binder cells.
Definition: Complex.h:25
mgVBOに対して描画データ作成後の情報を保持するためのクラス.
Definition: VBOLeaf.h:38
unsigned getDName() const
Definition: VBO.h:169
bool m_no_display
Definition: VBOElement.h:103
bool is_no_display() const
Definition: VBOElement.h:93
bool is_display() const
Definition: VBOElement.h:94
Defines Spoint seq of a space dimension and of a size.
Definition: SPointSeq.h:36
OpenGL 4 用描画のためのクラス, in other words, display list.
Definition: VBO.h:76
virtual void redraw(MGCL::VIEWMODE viewMode=MGCL::DONTCARE)
static void setDrawParam(const MGDrawParam &dpara)
Definition: VBOElement.h:98