Example of using "Canvas" form "Graphics" library to display 3D graphics.

Dependencies:   BSP_DISCO_F746NG Graphics mbed

Committer:
karpent
Date:
Fri Nov 11 17:06:53 2016 +0000
Revision:
3:aca7fe2d44b3
Parent:
1:4a5e329e617b
New 3d models added

Who changed what in which revision?

UserRevisionLine numberNew contents of line
karpent 0:8acbce46eede 1 //
karpent 0:8acbce46eede 2 // Square.h - example of usage graphics commands to create 3D graphics
karpent 0:8acbce46eede 3 //
karpent 0:8acbce46eede 4 // This example is based on code written by
karpent 0:8acbce46eede 5 // Fabio de Albuquerque Dela Antonio (fabio914 at gmail.com)
karpent 0:8acbce46eede 6 // See : https://github.com/fabio914/arduinogl/blob/master/examples
karpent 0:8acbce46eede 7 //
karpent 0:8acbce46eede 8 #pragma once
karpent 0:8acbce46eede 9
karpent 0:8acbce46eede 10 #include <ArduinoGL.h>
karpent 3:aca7fe2d44b3 11 #include "Model.h"
karpent 0:8acbce46eede 12
karpent 0:8acbce46eede 13 /**
karpent 0:8acbce46eede 14 * @brief 3D model of the square
karpent 0:8acbce46eede 15 */
karpent 3:aca7fe2d44b3 16 class Square : public Model
karpent 0:8acbce46eede 17 {
karpent 0:8acbce46eede 18 public:
karpent 1:4a5e329e617b 19
karpent 1:4a5e329e617b 20 Square(Display * display);
karpent 0:8acbce46eede 21
karpent 0:8acbce46eede 22 /**
karpent 0:8acbce46eede 23 * @brief Model setup.
karpent 0:8acbce46eede 24 * @retval None
karpent 0:8acbce46eede 25 */
karpent 3:aca7fe2d44b3 26 void virtual Setup();
karpent 0:8acbce46eede 27
karpent 0:8acbce46eede 28 /**
karpent 0:8acbce46eede 29 * @brief Renders a square for given view angle.
karpent 0:8acbce46eede 30 * Scale of the square changes for every frame.
karpent 0:8acbce46eede 31 * Single frame is rendered.
karpent 0:8acbce46eede 32 * @param None
karpent 0:8acbce46eede 33 * @retval None
karpent 0:8acbce46eede 34 */
karpent 3:aca7fe2d44b3 35 void virtual Render();
karpent 0:8acbce46eede 36 };