![](/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
Models/Model.h@2:ef3093a7a43e, 2016-11-11 (annotated)
- Committer:
- karpent
- Date:
- Fri Nov 11 15:30:07 2016 +0000
- Revision:
- 2:ef3093a7a43e
Base Model class improved
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
karpent | 2:ef3093a7a43e | 1 | // |
karpent | 2:ef3093a7a43e | 2 | // Model.h - abstract class for 3D demo models |
karpent | 2:ef3093a7a43e | 3 | // |
karpent | 2:ef3093a7a43e | 4 | |
karpent | 2:ef3093a7a43e | 5 | #pragma once |
karpent | 2:ef3093a7a43e | 6 | |
karpent | 2:ef3093a7a43e | 7 | #include "Angle.h" |
karpent | 2:ef3093a7a43e | 8 | #include "Scale.h" |
karpent | 2:ef3093a7a43e | 9 | |
karpent | 2:ef3093a7a43e | 10 | class Model |
karpent | 2:ef3093a7a43e | 11 | { |
karpent | 2:ef3093a7a43e | 12 | public: |
karpent | 2:ef3093a7a43e | 13 | |
karpent | 2:ef3093a7a43e | 14 | Model(); |
karpent | 2:ef3093a7a43e | 15 | |
karpent | 2:ef3093a7a43e | 16 | void SetShamAngleMode(); |
karpent | 2:ef3093a7a43e | 17 | |
karpent | 2:ef3093a7a43e | 18 | void SetRealAngleMode(float initialValue); |
karpent | 2:ef3093a7a43e | 19 | |
karpent | 2:ef3093a7a43e | 20 | float GetAngleValue(); |
karpent | 2:ef3093a7a43e | 21 | |
karpent | 2:ef3093a7a43e | 22 | |
karpent | 2:ef3093a7a43e | 23 | void SetFixedScaleMode(float scale); |
karpent | 2:ef3093a7a43e | 24 | |
karpent | 2:ef3093a7a43e | 25 | void SetShamScaleMode(float initialValue, float minValue, float maxValue, float delta); |
karpent | 2:ef3093a7a43e | 26 | |
karpent | 2:ef3093a7a43e | 27 | void SetRealScaleMode(float minValue, float maxValue, float delta); |
karpent | 2:ef3093a7a43e | 28 | |
karpent | 2:ef3093a7a43e | 29 | float GetScaleValue(); |
karpent | 2:ef3093a7a43e | 30 | |
karpent | 2:ef3093a7a43e | 31 | void virtual Setup() = 0; |
karpent | 2:ef3093a7a43e | 32 | |
karpent | 2:ef3093a7a43e | 33 | void virtual Render() = 0; |
karpent | 2:ef3093a7a43e | 34 | |
karpent | 2:ef3093a7a43e | 35 | private: |
karpent | 2:ef3093a7a43e | 36 | Angle _angle; |
karpent | 2:ef3093a7a43e | 37 | Scale _scale; |
karpent | 2:ef3093a7a43e | 38 | }; |