-
Notifications
You must be signed in to change notification settings - Fork 0
/
tinput.h
48 lines (43 loc) · 1.03 KB
/
tinput.h
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
#ifndef TINPUT_H
#define TINPUT_H
#include "cmdline.h"
#include "tmodel.h"
#include "tvector4d.h"
#include <boost/math/constants/constants.hpp>
#include <iostream>
struct viewport {
TPoint p1;
TPoint p2;
};
class TInput {
public:
TInput();
void getInput(int argc, char **argv, TModel &model);
std::string in_filename;
std::string out_filename;
TPoint resolution;
bool rotate_given;
bool scale_given;
bool scale_x_given;
bool scale_y_given;
bool scale_z_given;
bool translate_given;
bool viewport_given;
bool rasterWireframe;
struct viewport view;
TVector3D rotate_vector;
TVector3D scale_vector;
TVector3D translate_vector;
private:
static constexpr const float pi = boost::math::constants::pi<float>();
struct gengetopt_args_info args_info;
void error(const std::string &s) const;
void getRotate();
void getScale();
void getTranslate();
void getViewport();
void getResolution();
void getBezierSurface(std::string &file, TModel &model);
float toRad(float degree) const;
};
#endif // TINPUT_H