![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Example of using "Canvas" form "Graphics" library to display 3D graphics.
Dependencies: BSP_DISCO_F746NG Graphics mbed
Diff: Models/Cube.h
- Revision:
- 1:4a5e329e617b
- Child:
- 3:aca7fe2d44b3
diff -r 8acbce46eede -r 4a5e329e617b Models/Cube.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Models/Cube.h Thu Nov 10 15:38:50 2016 +0000 @@ -0,0 +1,40 @@ +// +// Cube.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 +// + +#pragma once + +#include <ArduinoGL.h> +#include "Angle.h" + +/** + * @brief 3D model of the cube + */ +class Cube : public Angle +{ +public: + + Cube(Display* display); + + /** + * @brief Model setup. + * @retval None + */ + void Setup(); + + /** + * @brief Render single frame on the display. + * @retval None + */ + void Render(); + +private: + + void DrawCube(); + + float _perspectiveAspect; +}; \ No newline at end of file