-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbeeworld.h
More file actions
71 lines (58 loc) · 1.71 KB
/
beeworld.h
File metadata and controls
71 lines (58 loc) · 1.71 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef BEEWORLD_H
#define BEEWORLD_H
// This is a simple raytracer that uses a sherical backplane for the camera rather than a flat one.
// This avoids the issue of pinhole cameras only being useful up to about 90 degrees and allows
// panaoramic vision.
#include <QObject>
#include <QPixmap>
#include <vector>
#include "sceneobject.h"
using namespace std;
class beethreadOld;
class beeworld : public QObject
{
Q_OBJECT
public:
explicit beeworld(QObject *parent = 0);
float scale_factor_for_one_wall;
float contrast_factor_for_one_wall;
float offset_for_one_wall;
int x_walls;
int y_walls;
float contrast;
virtual QImage * getImage(float x, float y, float z, float dir, float pitch, float roll, float curr_t, float scale);
virtual QImage * getImage(float x, float y, float z, float dir, float pitch, float roll, float curr_t);
int numElements();
void setWorldSize(int size);
void setFOVScale(double fov_scale);
void setFOV(float vert, float horiz);
void setWorldSize(int vert, int horiz);
void setLighting(bool onOff);
void setBlur(bool onOff);
void addObject(sceneObject * object);
void clearObjects();
sceneObject * getObject(int i);
int objectCount();
QVector3D drawnBeeLoc;
QVector3D drawnBeeRot;
bool drawBee;
float jitterSize;
protected:
int N_ROWS;
int N_COLS;
float H_EXTENT;
float V_EXTENT;
QVector < sceneObject * > objects;
float t2;
bool lighting;
bool blur;
QVector <float> jitterX;
QVector <float> jitterY;
int jitterSeed;
void setJitter(float amount);
QVector < beethreadOld * > threads;
int n_threads;
signals:
public slots:
};
#endif // BEEWORLD_H