MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
VBOPointer.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 
6 #if !defined(_MGVBOPOINTER__INCLUDED_)
7 #define _MGVBOPOINTER__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 #include "mgGL/VBO.h"
19 #include "mgGL/VBOLeaf.h"
20 
21 class MGPosition;
22 class MGBox;
23 class MGBPointSeq;
24 class MGSPointSeq;
25 class MGCurve;
26 class MGSPointSeq;
27 class mgTL2Triangles;
28 class MGStl;
29 class MGColor;
30 class MGAttribedGel;
31 class MGComplex;
32 class MGCellBase;
33 class mgVBOLeafBuilder;
34 class mgVBOLeaf;
35 class mgTexture;
36 
42 // mgVBOPointer
44 
46 
50 class MG_DLL_DECLR mgVBOPointer:public mgVBOElement{
51 public:
52 
55 mgVBOPointer(mgVBO& vbo):m_vbo(&vbo){;};
56 
58 
59 //mgVBOPointer* clone()const;
60 
63 bool is_made(MGCL::VIEWMODE viewMode=MGCL::DONTCARE){return m_vbo->is_made(viewMode);};
64 
65 
68  m_vbo->make_display_list(vmode);
69 };
70 
73 void draw(MGCL::VIEWMODE viewMode=MGCL::DONTCARE);
74 
77 void redraw(MGCL::VIEWMODE viewMode=MGCL::DONTCARE){m_vbo->redraw(viewMode);};
78 
82 virtual void selectionDraw(MGCL::VIEWMODE viewMode=MGCL::DONTCARE);
83 
87 unsigned getDName()const{return 0;};
88 
92 virtual GLuint getSelectionName()const{return m_vbo->getSelectionName();};
93 
94 mgVBO* vboPointer(){return m_vbo;};
95 
96 protected:
97 
98 private:
100  mgVBO* m_vbo;
101 };
102 
104 // mgVBOLeafPointer
105 
107 
111 class MG_DLL_DECLR mgVBOLeafPointer:public mgVBOElement{
112 public:
113 
116 mgVBOLeafPointer(const mgVBOLeaf& leaf);
117 
119 
120 //mgVBOLeafPointer* clone()const;
121 
124 bool is_made(MGCL::VIEWMODE viewMode=MGCL::DONTCARE){return true;};
125 
129 
132 void draw(MGCL::VIEWMODE viewMode=MGCL::DONTCARE);
133 
137 void redraw(MGCL::VIEWMODE viewMode=MGCL::DONTCARE){draw(viewMode);};
138 
143 
147 unsigned getDName()const{return 0;};
148 
152 GLuint getSelectionName()const{return 0;};
153 
154 const mgVBOLeaf* leafPointer()const{return m_VBOLeaf;};
155 mgVBOLeaf* leafPointer(){return m_VBOLeaf;};
156 
157 protected:
158 
159 private:
161  mgVBOLeaf* m_VBOLeaf;
162 };
163  // end of DisplayHandling group
165 #endif // !defined(_MGVBOPOINTER__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
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
Definition: MGCL.h:272
void redraw(MGCL::VIEWMODE viewMode=MGCL::DONTCARE)
Definition: VBOPointer.h:77
A vector of mgTL2Triangle's.
Definition: TL2Triangles.h:25
~mgVBOLeafPointer()
Definition: VBOPointer.h:118
Defines a Box of any space dimendion.
Definition: Box.h:34
MGColor defines the OpenGL color (R,G,B,A).
Definition: Color.h:26
virtual void draw(MGCL::VIEWMODE viewMode=MGCL::DONTCARE)=0
void make_display_list(MGCL::VIEWMODE vmode=MGCL::DONTCARE)
すでに作成済みであっても強制的に再作成を行う。
Definition: VBOPointer.h:67
mgVBO * vboPointer()
When this is a mgVBOPointer, return the vbo pointer referenced.
Definition: VBOPointer.h:94
Is an abstract class which provides interfaces of MGGel that has MGAppearance.
Definition: AttribedGel.h:32
Represent a positional data.
Definition: Position.h:28
unsigned getDName() const
Definition: VBOPointer.h:87
mgVBOPointer(mgVBO &vbo)
Definition: VBOPointer.h:55
unsigned getDName() const
Definition: VBOPointer.h:147
Texture definition class.
Definition: Texture.h:29
void redraw(MGCL::VIEWMODE viewMode=MGCL::DONTCARE)
Definition: VBOPointer.h:137
MGGroupなどでmemberのMGGelの描画をmgVBOのelementとするためのクラス.
Definition: VBOPointer.h:50
Defines BPoint seq of a space dimension and of a capacity.
Definition: BPointSeq.h:38
VIEWMODE
Definition: MGCL.h:271
bool is_made(MGCL::VIEWMODE viewMode=MGCL::DONTCARE)
Definition: VBOPointer.h:124
void make_display_list(MGCL::VIEWMODE vmode=MGCL::DONTCARE)
Definition: VBOPointer.h:128
MGStl is a concrete class which represents an STL information.
Definition: MGStl.h:34
GLuint getSelectionName() const
Definition: VBOPointer.h:152
すでに作成済みのmgVBOLeafをVBOのメンバー(element)として保持するためのクラス.
Definition: VBOPointer.h:111
virtual void selectionDraw(MGCL::VIEWMODE viewMode=MGCL::DONTCARE)=0
MGComplex is a container of parameter cells and binder cells.
Definition: Complex.h:25
mgVBOに対して描画データ作成後の情報を保持するためのクラス.
Definition: VBOLeaf.h:38
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
~mgVBOPointer()
Definition: VBOPointer.h:57
virtual GLuint getSelectionName() const
Definition: VBOPointer.h:92
const mgVBOLeaf * leafPointer() const
Definition: VBOPointer.h:154
mgVBOLeaf * leafPointer()
When this is a mgVBOLeaf, return the mgVBOLeaf pointer.
Definition: VBOPointer.h:155
bool is_made(MGCL::VIEWMODE viewMode=MGCL::DONTCARE)
Definition: VBOPointer.h:63