Creating classes and objects


show more Creating classes and objects provides you with in-depth training on Developer. Taught by Barton Poulson as part of the Interactive Data Visualization with Processing show less
please wait ...

Creating classes and objects

In the previous movie, we discussed how you could use custom functions, or blocks of code, to save time and to allow you to reuse code in later sketches. In this movie, I want to take that several steps further, by explaining to you classes and objects. Now, a function is usually something that you use in a static drawing, and every piece of information that you enter into it has to be of the same type, so all integer variables or all floats. In a class, however, you can throw in any kind of information you want, and more significantly, you can specify the operations that occur, the things that the drawing actually does with the class.

Now, a class is a template. It's a general category. And then when you instantiate something in a class, it becomes an object. So, you have a template and the realization. That's--the class is the template and the object is the realization of that class in your particular sketch. In this example, I'm not going to type the code in fr...

Creating classes and objects
Video duration: 9m 1s 7h 43m Beginner

Viewers:

Creating classes and objects provides you with in-depth training on Developer. Taught by Barton Poulson as part of the Interactive Data Visualization with Processing

Subjects:
Developer IT
Software:
Processing
Author:
please wait ...