-
Notifications
You must be signed in to change notification settings - Fork 0
/
pointtransfer.h
50 lines (41 loc) · 1009 Bytes
/
pointtransfer.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
49
50
#ifndef POINTTRANSFER_H
#define POINTTRANSFER_H
#include <Box2D/Box2D.h>
#include <QGraphicsPixmapItem>
#include <QPainter>
#include <QTransform>
#include <QtMath>
#include <QSizeF>
#include <QGraphicsScene>
#include <QList>
#include <QTimer>
#include <QPixmap>
#include <QDebug>
#include <QMouseEvent>
#include <QVector>
#include <QtMultimedia/QMediaPlayer>
#define pi 3.14159
#define BIRD_DENSITY 20.0
#define BIRD_FRICTION 1.0
#define BIRD_RESTITUTION 0.4
#define BIRD_RADIUS 1.0
#define WOOD_DENSITY 10.0
#define WOOD_FRICTION 1.0
#define WOOD_RESTITUTION 0.3
#define MID_WOOD_HP 48000.0
#define BALL_WOOD_HP 96000.0
#define PIG_HP 40000.0
# define start_X -34
#define start_Y -7.5
class pointTransfer
{
public:
pointTransfer();
static QPointF toPixel(b2Vec2 bodyPos, QSizeF bodySize);
static QPointF toMeter(QPointF);
static void setSize(QSizeF worldsize, QSizeF pixelsize);
private:
static QSizeF db2_worldSize;
static QSizeF db2_pixelSize;
};
#endif // POINTTRANSFER_H