ConfigFile.h 2.61 KB
Newer Older
1
/*
2
# Copyright 2016-2018 Ruben Jesus Garcia Hernandez
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
 #
 #     http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
*/

17
18
19
#ifndef __CONFIGFILE_H
#define __CONFIGFILE_H
#include <vector>
20
#include "MyGL.h"
21
#include "polyhedron.h"
22
#include "ConfigFileAtoms.h"
23

24
25
extern char * PATH;
extern char * SCREENSHOT;
26
27
28
29
30
extern int ISOS;
extern float **isocolours; // [ISOS][4];
extern const char **plyfiles;
extern float **translations;
extern float userpos[3];
31
extern float scaling;
32
33

extern float BACKGROUND[3];
34

35
36
extern float atomScaling;
extern std::vector<float> *clonedAtoms;
37
38
extern std::vector<int> bonds;
extern int *numBonds;
39
extern bool displaybonds;
40
41
42
extern float bondscolours[4];
extern float atomtrajectorycolour[4];

43
44
45
46
47
48
49
extern int numClonedAtoms;
extern int *basisvectorreps;

extern bool showTrajectories;
extern std::vector<int> atomtrajectories;
extern std::vector<std::vector<int>> atomtrajectoryrestarts;

50
extern bool displayunitcell;
51

52
extern float markerscaling;
53
54
extern float unitcellcolour[4];
extern float supercellcolour[4];
55

56
57
extern float infolinecolour[4];

58
59
extern int repetitions[3];

60
61
extern Solid *solid;

62
63
64
extern bool saveStereo;
extern int screenshotdownscaling;

65
extern bool hapticFeedback;
66
extern bool showcontrollers;
67
68
69
70
extern bool gazenavigation;

extern int transparencyquality;
extern float nearclip, farclip;
71

72
73
extern float animationspeed; //how fast to change to next timestep
extern float movementspeed;  //how fast to move the user
74
extern int sidebuttontimestep; //clicking the second side button: timestep ++, -- or do nothing 
75

76
77
78
//markers such as hole positions and electron positions
extern float ** markers;
extern float ** markercolours;
79
#define MARKERSOLID Octahedron
80

81
82
extern const char * loadConfigFileErrors[];

83
void cleanConfig();
84
85
int loadConfigFile(const char * f);

86
87
88
89
90
//for multiuser
extern int secret;
extern const char * server;
extern int port;

91
92
extern bool resetTimestepOnReload;

93
94
95
96
struct information {
	float pos[3];
	float size;
	int atom; //-1=do not draw line
97
	char* filename;
98
99
100
	GLuint tex;
};

101
102
103
104
105
106
107
108
typedef enum {
	Record,
	Infobox,
	Nothing
} menubutton_t;

extern menubutton_t menubutton;

109
110
extern std::vector<information> info;

111

112
#endif //__CONFIGFILE_H