Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BSP_DISCO_F746NG Graphics mbed
Diff: Models/Sphere.h
- Revision:
- 1:4a5e329e617b
- Child:
- 2:ef3093a7a43e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Models/Sphere.h Thu Nov 10 15:38:50 2016 +0000
@@ -0,0 +1,43 @@
+//
+// Sphere.h - example of usage graphics commands to create 3D graphics.
+//
+// This example is based on code written by
+// Fabio de Albuquerque Dela Antonio (fabio914 at gmail.com)
+// See : https://github.com/fabio914/arduinogl/blob/master/examples
+//
+
+#ifndef _SPHERE_H
+#define _SPHERE_H
+
+#include <ArduinoGL.h>
+#include "Angle.h"
+
+/**
+* @brief 3D model of the sphere
+*/
+class Sphere : public Angle
+{
+public:
+ Sphere(Display * display);
+
+ /**
+ * @brief Model setup.
+ * @retval None
+ */
+ void Setup();
+
+ /**
+ * @brief Renders model for given view angle.
+ * @param None
+ * @retval None
+ */
+ void Render();
+
+private:
+
+ void DrawModel(float radius, float p);
+
+ float _perspectiveAspect;
+};
+
+#endif
\ No newline at end of file