Working with classes and arrays

At last I could figure out how classes work in OpenFrameworks (c++), and the different types of arrays that can be used.

I found a really good tutorial about classes in c++ on the OF wiki, that was very useful. Here it goes:
http://wiki.openframeworks.cc/index.php?title=Ooops!_%3D_Object_Oriented_Programming_%2B_Classes

I also had a problem using arrays, because I wanted to use the resiazable ones and I didn»t know how to do it. Here I found the solution, using vectors:
http://www.openframeworks.cc/forum/viewtopic.php?t=563.
http://www.cplusplus.com/reference/stl/vector/

I don»t know what I will do without these resources…

So, in order to learning how to use these new things, I wanted to do an exercise where I could create new shapes from the previous drawing tool, and be able to modify each one of these new shapes.
This will be very useful for the deveopment of my future thesis.

Here is a video that shows the exercise finished:

Learning OpenFrameworks: classes and arrays from berio on Vimeo.

And here you can see the code:

The resolution of the shape that is created once the draw is finished can be modified. I mean, the program can create more or less points within the shape. Sometimes it wouldn»t be necessary have a good resolution of the shape and the possibility of putting down the number of points needed for drawing the shape will increase the performance.

The next exercise will be moving these shapes. And later on, this drawing tool will be used as a selection tool working with video.