-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathYSQuark.h
39 lines (28 loc) · 831 Bytes
/
YSQuark.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
//
// YSQuark.h
// a quark
//
// Created by Yves Schutz on 05/01/14.
// Copyright (c) 2014 Yves Schutz. All rights reserved.
//
#ifndef YSQUARK_H
#define YSQUARK_H
#include <QGLSphere>
#include <QGLView>
#include "YSNucleus.h"
class YSQuark : public QObject
{
Q_OBJECT
Q_PROPERTY(qreal QGLPos READ QGLPos WRITE SetQGLPos)
public:
explicit YSQuark(QObject *parent = 0);
QGLSphere QuarkView() const { return QGLSphere(YSNucleus::kgProtonRadius / 20.); } // the quark is in fact 1000 times smaller than the nucleon
qreal QGLPos() const { return mQpos; }
void SetQGLPos(qreal pos) { mQpos = pos; mView->update(); }
signals:
public slots:
private:
qreal mQpos; // needed ba Property Animation
QGLView *mView; // the view where the object will be displayed
};
#endif // YSQUARK_H