ConfigFile.h 2.73 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
extern int ISOS;
extern float **isocolours; // [ISOS][4];
extern const char **plyfiles;
29
extern const char *** fullplyfiles; //explicit plyfiles for all timesteps
30 31
extern float **translations;
extern float userpos[3];
32
extern float scaling;
33 34

extern float BACKGROUND[3];
35

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

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

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

51
extern bool displayunitcell;
52

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

57 58
extern float infolinecolour[4];

59 60
extern int repetitions[3];

61 62
extern Solid *solid;

63 64 65
extern bool saveStereo;
extern int screenshotdownscaling;

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

extern int transparencyquality;
extern float nearclip, farclip;
72
extern float nearcut, farcut;
73

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

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

83 84
extern const char * loadConfigFileErrors[];

85
void cleanConfig();
86 87
int loadConfigFile(const char * f);

88 89
//for multiuser
extern int secret;
90
extern const char * server;
91 92
extern int port;

93 94
extern bool resetTimestepOnReload;

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

103 104 105
typedef enum {
	Record,
	Infobox,
106
	CuttingPlane,
107 108 109 110 111
	Nothing
} menubutton_t;

extern menubutton_t menubutton;

112 113
extern std::vector<information> info;

114

115
#endif //__CONFIGFILE_H