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 scoreLight_Advanced by
classRigidScafold.cpp@0:345b3bc7a0ea, 2012-03-28 (annotated)
- Committer:
- mbedalvaro
- Date:
- Wed Mar 28 14:40:01 2012 +0000
- Revision:
- 0:345b3bc7a0ea
- Child:
- 1:a4050fee11f7
This version (using rigid frame, base and child classes, etc) works, but the blob is strangely smaller. Need to check this.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbedalvaro | 0:345b3bc7a0ea | 1 | #include "classRigidScafold.h" |
mbedalvaro | 0:345b3bc7a0ea | 2 | |
mbedalvaro | 0:345b3bc7a0ea | 3 | RigidScafold::RigidScafold() { |
mbedalvaro | 0:345b3bc7a0ea | 4 | } |
mbedalvaro | 0:345b3bc7a0ea | 5 | |
mbedalvaro | 0:345b3bc7a0ea | 6 | RigidScafold::~RigidScafold() { |
mbedalvaro | 0:345b3bc7a0ea | 7 | } |
mbedalvaro | 0:345b3bc7a0ea | 8 | |
mbedalvaro | 0:345b3bc7a0ea | 9 | |
mbedalvaro | 0:345b3bc7a0ea | 10 | void RigidScafold::buildCircularScafold(float _radius, vector2D _pos,vector2D _vel, int _numScafoldPoints) { |
mbedalvaro | 0:345b3bc7a0ea | 11 | scafold.resize(_numScafoldPoints); |
mbedalvaro | 0:345b3bc7a0ea | 12 | radius=_radius; |
mbedalvaro | 0:345b3bc7a0ea | 13 | center=_pos; |
mbedalvaro | 0:345b3bc7a0ea | 14 | speed=_vel; |
mbedalvaro | 0:345b3bc7a0ea | 15 | for (int i = 0; i < scafold.size(); i++) { |
mbedalvaro | 0:345b3bc7a0ea | 16 | scafold[i].x= center.x + radius * cos ( (1.0*i / _numScafoldPoints) * 2 * PI); |
mbedalvaro | 0:345b3bc7a0ea | 17 | scafold[i].y =center.y + radius * sin ( (1.0*i / _numScafoldPoints) * 2 * PI); |
mbedalvaro | 0:345b3bc7a0ea | 18 | } |
mbedalvaro | 0:345b3bc7a0ea | 19 | } |
mbedalvaro | 0:345b3bc7a0ea | 20 | |
mbedalvaro | 0:345b3bc7a0ea | 21 | // Other functions to create letters, text, etc. |
mbedalvaro | 0:345b3bc7a0ea | 22 | // ... TO DO .... |
mbedalvaro | 0:345b3bc7a0ea | 23 | |
mbedalvaro | 0:345b3bc7a0ea | 24 |