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

Dependencies:   BSP_DISCO_F746NG Graphics mbed

Committer:
karpent
Date:
Sun Nov 06 02:14:34 2016 +0000
Revision:
0:8acbce46eede
Child:
2:ef3093a7a43e
Initial revision with square 3D model.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
karpent 0:8acbce46eede 1 /*
karpent 0:8acbce46eede 2 Scale.h - Calculate model scale
karpent 0:8acbce46eede 3
karpent 0:8acbce46eede 4 Copyright(c) 2016 karpent at gmail.com, MIT License
karpent 0:8acbce46eede 5
karpent 0:8acbce46eede 6 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"),
karpent 0:8acbce46eede 7 to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
karpent 0:8acbce46eede 8 and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
karpent 0:8acbce46eede 9
karpent 0:8acbce46eede 10 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
karpent 0:8acbce46eede 11
karpent 0:8acbce46eede 12 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
karpent 0:8acbce46eede 13 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
karpent 0:8acbce46eede 14 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
karpent 0:8acbce46eede 15 THE USE OR OTHER DEALINGS IN THE SOFTWARE.
karpent 0:8acbce46eede 16 */
karpent 0:8acbce46eede 17
karpent 0:8acbce46eede 18 #pragma once
karpent 0:8acbce46eede 19
karpent 0:8acbce46eede 20 /**
karpent 0:8acbce46eede 21 * @brief Calculate model scale.
karpent 0:8acbce46eede 22 */
karpent 0:8acbce46eede 23 class Scale
karpent 0:8acbce46eede 24 {
karpent 0:8acbce46eede 25 public :
karpent 0:8acbce46eede 26
karpent 0:8acbce46eede 27 Scale();
karpent 0:8acbce46eede 28
karpent 0:8acbce46eede 29 Scale(float min, float max);
karpent 0:8acbce46eede 30
karpent 0:8acbce46eede 31 float GetScale();
karpent 0:8acbce46eede 32
karpent 0:8acbce46eede 33 /// Read model scale from a potentiometer attached to pin A1
karpent 0:8acbce46eede 34 float ReadScale();
karpent 0:8acbce46eede 35
karpent 0:8acbce46eede 36 protected:
karpent 0:8acbce46eede 37 float scale;
karpent 0:8acbce46eede 38
karpent 0:8acbce46eede 39 private:
karpent 0:8acbce46eede 40 void Setup(float scale, float delts, float min, float max);
karpent 0:8acbce46eede 41
karpent 0:8acbce46eede 42 float delta;
karpent 0:8acbce46eede 43 float maxScale;
karpent 0:8acbce46eede 44 float minScale;
karpent 0:8acbce46eede 45 };