summaryrefslogtreecommitdiffstats
path: root/src/glsphere.h
diff options
context:
space:
mode:
authorStefan Suhren <suhren.stefan@fh-swf.de>2015-11-13 12:15:53 +0100
committerStefan Suhren <suhren.stefan@fh-swf.de>2015-11-13 12:15:53 +0100
commit735f71d208ef91a2f5cb64c8865446fa7a46de35 (patch)
treed445f1d37fd77b061d3f9ec92fcfd032fbeeac08 /src/glsphere.h
parent0f8ceacadd3190123cd736260a0401baa8130239 (diff)
downloadMultimedia-735f71d208ef91a2f5cb64c8865446fa7a46de35.tar.gz
Multimedia-735f71d208ef91a2f5cb64c8865446fa7a46de35.zip
Add GLSphere with a points cloud
Diffstat (limited to 'src/glsphere.h')
-rw-r--r--src/glsphere.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/glsphere.h b/src/glsphere.h
new file mode 100644
index 0000000..9aae032
--- /dev/null
+++ b/src/glsphere.h
@@ -0,0 +1,29 @@
+#ifndef GLSPHERE_H
+#define GLSPHERE_H
+
+#include <cmath>
+
+#include "glbody.h"
+
+
+class GLSphere : public GLBody
+{
+public:
+ GLSphere(double radius = 1.0, int stacks = 10, int slices = 10);
+ virtual void makeSurface(QVector<GLPoint> *pointContainer,
+ QVector<GLshort> *indexContainer);
+
+private:
+ /**
+ * @brief calculatePoint
+ * @param zRotation
+ * @param yRotation
+ * @return
+ */
+ QVector3D calculatePoint(double sliceRotation, double stackRotation);
+
+ int m_stacks;
+ int m_slices;
+};
+
+#endif // GLSPHERE_H