MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
VBOByScreen.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #if !defined( __VBOBYSCREEN_H__)
6 #define __VBOBYSCREEN_H__
7 
8 #include "mgGL/VBO.h"
9 
10 class MGPosition;
11 
17 
26 class MG_DLL_DECLR mgVBOByScreen:public mgVBO{
27 
28 public:
29 
31 mgVBOByScreen(float z=-1.f):m_z(z){m_coordinateType = mgGLSL::NdcScreen;};
32 
34 void convert2NormalizedWorld(
35  const int xyS[2],
36  float& x,
37  float& y
38 );
39 
41 void convert2NormalizedWorld(
42  float x0,
43  float y0,
44  float& x,
45  float& y
46 );
47 
48 float getHeight()const{return m_heightHalf*2.f;};
49 float getWidth()const{return m_widthHalf*2.f;};
50 
52 void set_viewport(const int vport[4]);
53 
54 //Set the ormalized device coordinates z value (in NDC) to control depth test.
57 void set_ZValue(float z){m_z=z;};
58 
60 void Vertex(const int v[2]);
61 void Vertex(int x, int y);
62 
63 void Vertex(const MGPosition& v);
64 void Vertex(float x, float y, float z=0.0f);
65 void Vertex3d(double x, double y, double z=0.0);
66 void Vertex2fv(const float v[2]);
67 void Vertex3fv(const float v[3]);
68 void Vertex2dv(const double v[2]);
69 void Vertex3dv(const double v[3]);
70 
71 protected:
72 
73  float m_centerX, m_centerY;
74  float m_widthHalf, m_heightHalf;
75  float m_z;
76 
77 };
78  // end of DisplayHandling group
80 #endif //__VBOBYSCREEN_H__
float getHeight() const
Definition: VBOByScreen.h:48
virtual void Vertex3d(double x, double y, double z=0.0)
float getWidth() const
Definition: VBOByScreen.h:49
Represent a positional data.
Definition: Position.h:28
mgVBOByScreen is a VBO to draw pictures in screen coordinates of a constant z value.
Definition: VBOByScreen.h:26
virtual void Vertex(const MGPosition &v)
頂点の座標値を指定する
mgVBOByScreen(float z=-1.f)
construct given z(in NDC).
Definition: VBOByScreen.h:31
float m_z
Definition: VBOByScreen.h:75
float m_widthHalf
Definition: VBOByScreen.h:74
virtual void Vertex2fv(const float v[2])
void set_ZValue(float z)
Definition: VBOByScreen.h:57
OpenGL 4 用描画のためのクラス, in other words, display list.
Definition: VBO.h:76
virtual void Vertex2dv(const double v[2])
virtual void Vertex3dv(const double v[3])
Definition: glslprogram.h:48
float m_centerY
Viewport data of the screen.
Definition: VBOByScreen.h:73
virtual void Vertex3fv(const float v[3])