summaryrefslogtreecommitdiff
path: root/src/GLView.h
blob: 32e38985f4a14de749f9d2f974352f3f5ac14ea9 (plain)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef GLVIEW_H_
#define GLVIEW_H_

#include <Eigen/Core>
#include <Eigen/Geometry>
#include <string>
#ifndef _MSC_VER
#include <stdint.h>
#endif
#include "system-gl.h"
#include <iostream>
#include "renderer.h"

#define FAR_FAR_AWAY 100000.0

class GLView
{
public:
	GLView();
	void setRenderer(Renderer* r);
	virtual bool save(const char *filename) = 0;
	Renderer *renderer;
/*
	void initializeGL(); //
	void resizeGL(int w, int h); //

*/
	void setGimbalCamera(const Eigen::Vector3d &pos, const Eigen::Vector3d &rot, double distance);
	void setupGimbalPerspective();
	void setupGimbalOrtho(double distance, bool offset=false);

	void setCamera(const Eigen::Vector3d &pos, const Eigen::Vector3d &center);
	void setupPerspective();
	void setupOrtho(bool offset=false);


	double viewer_distance;//
  double w_h_ratio;//
  bool orthomode;//
  bool showaxes;//
  bool showfaces;//
  bool showedges;//
	Eigen::Vector3d object_trans;
	Eigen::Vector3d object_rot;
  Eigen::Vector3d camera_eye;
  Eigen::Vector3d camera_center;

/*
	void paintGL(); //
	bool save(const char *filename); //
	//bool save(std::ostream &output); // not implemented in qgl?
	std::string getRendererInfo(); //

	GLint shaderinfo[11];  //
*/



/*	double w_h_ratio;//

	bool orthomode;//
	bool showaxes;//
	bool showfaces;//
	bool showedges;//

	Eigen::Vector3d object_rot;//
	Eigen::Vector3d camera_eye;//
	Eigen::Vector3d camera_center;//
*/
};

#endif
contact: Jan Huwald // Impressum