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

Dependencies:   BSP_DISCO_F746NG Graphics mbed

Models/Cube.h

Committer:
karpent
Date:
2016-11-11
Revision:
3:aca7fe2d44b3
Parent:
1:4a5e329e617b

File content as of revision 3:aca7fe2d44b3:

//
// 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 "Model.h"

/**
 * @brief 3D model of the cube
 */
class Cube : public Model
{
public:

    Cube(Display* display);

    /**
    * @brief  Model setup.
    * @retval None
    */
    void virtual Setup();

    /**
    * @brief  Render single frame on the display.
    * @retval None
    */
    void virtual Render();

private:

    void DrawCube();
    
    float _perspectiveAspect;
};