-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpenGLGraphGrid.hpp
More file actions
52 lines (41 loc) · 1.09 KB
/
OpenGLGraphGrid.hpp
File metadata and controls
52 lines (41 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// OpenGLGraphGrid.hpp
// OpenGLTutorial
//
// Created by Robby Tong on 1/27/19.
// Copyright © 2019 Robby Tong. All rights reserved.
//
#ifndef OpenGLGraphGrid_hpp
#define OpenGLGraphGrid_hpp
#include <stdio.h>
#include "OpenGLGraph.hpp"
#include "OpenGLText.hpp"
class OpenGLGraphGrid
{
private:
struct TitleLocation
{
float origin_x;
float origin_y;
float height;
float max_width;
};
size_t mRows;
size_t mCols;
float mWindowWidth;
float mWindowHeight;
typedef OpenGLGraph* OpenGLGraphRef;
OpenGLGraphRef * mGraphs;
TitleLocation * mTitleLocations;
OpenGLText * mTextDrawer;
size_t mGraphsLen;
glm::mat4 * mGraphTransforms;
glm::mat4 mProjection;
public:
OpenGLGraphGrid(size_t rows, size_t cols, float window_width, float window_height);
~OpenGLGraphGrid();
void windowResizedTo(float size_x, float size_y);
void setGraphWithRowAndCol(OpenGLGraph * graph, int row, int col);
void drawWithTransform(glm::mat4 transform);
};
#endif /* OpenGLGraphGrid_hpp */