Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of skinGames_forktest by
text3D.h@47:199042980678, 2014-04-17 (annotated)
- Committer:
- mbedalvaro
- Date:
- Thu Apr 17 08:04:14 2014 +0000
- Revision:
- 47:199042980678
- Parent:
- 45:5ef809480c12
publishing for sharing with Ken Iwasaki
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbedalvaro | 40:3ba2b0ea9f33 | 1 | |
| mbedalvaro | 40:3ba2b0ea9f33 | 2 | // Class for creating 3d "flying" texts |
| mbedalvaro | 40:3ba2b0ea9f33 | 3 | // NOT USED FOR THE TIME BEING. |
| mbedalvaro | 40:3ba2b0ea9f33 | 4 | |
| mbedalvaro | 40:3ba2b0ea9f33 | 5 | #ifndef text3d_h |
| mbedalvaro | 40:3ba2b0ea9f33 | 6 | #define text3d_h |
| mbedalvaro | 40:3ba2b0ea9f33 | 7 | |
| mbedalvaro | 40:3ba2b0ea9f33 | 8 | #include "Scene.h" // in fact, we want to include BaseObject.h (separate the files?) |
| mbedalvaro | 40:3ba2b0ea9f33 | 9 | |
| mbedalvaro | 40:3ba2b0ea9f33 | 10 | #include <string> |
| mbedalvaro | 40:3ba2b0ea9f33 | 11 | using namespace std; |
| mbedalvaro | 40:3ba2b0ea9f33 | 12 | |
| mbedalvaro | 45:5ef809480c12 | 13 | class Text3D : public BaseObject { |
| mbedalvaro | 40:3ba2b0ea9f33 | 14 | |
| mbedalvaro | 40:3ba2b0ea9f33 | 15 | public: |
| mbedalvaro | 40:3ba2b0ea9f33 | 16 | |
| mbedalvaro | 40:3ba2b0ea9f33 | 17 | // Constructor & destructor: |
| mbedalvaro | 40:3ba2b0ea9f33 | 18 | letter3D(char letter, float width, float height); |
| mbedalvaro | 40:3ba2b0ea9f33 | 19 | //~letter3D(); |
| mbedalvaro | 40:3ba2b0ea9f33 | 20 | |
| mbedalvaro | 40:3ba2b0ea9f33 | 21 | weight(float with, float height); // resizing factor for the letter (note: this could be done using the lsr object, but this provides an easier more |
| mbedalvaro | 40:3ba2b0ea9f33 | 22 | // direct method when creating letters). |
| mbedalvaro | 40:3ba2b0ea9f33 | 23 | |
| mbedalvaro | 40:3ba2b0ea9f33 | 24 | // A letter is just like a normal BaseObject, but provides methods to create it with a certain size (in the future.. font?) |
| mbedalvaro | 40:3ba2b0ea9f33 | 25 | char ascii; // the ascii code (for identifying it if required, not necessarily the object ID) |
| mbedalvaro | 40:3ba2b0ea9f33 | 26 | float width, height; |
| mbedalvaro | 40:3ba2b0ea9f33 | 27 | // ==================================== |
| mbedalvaro | 40:3ba2b0ea9f33 | 28 | |
| mbedalvaro | 40:3ba2b0ea9f33 | 29 | private: |
| mbedalvaro | 40:3ba2b0ea9f33 | 30 | void fillLetter(char ch); |
| mbedalvaro | 40:3ba2b0ea9f33 | 31 | }; |
| mbedalvaro | 40:3ba2b0ea9f33 | 32 | |
| mbedalvaro | 40:3ba2b0ea9f33 | 33 | #endif |
| mbedalvaro | 40:3ba2b0ea9f33 | 34 |
