官术网_书友最值得收藏!

openFrameworks' folders

Till now we have installed openFrameworks and checked its working. Let's explore the contents of its folder. It consists of a number of folders, including addons, apps, examples, libs, projectGenerator, and text files such as license.md and readme.txt.

Note

It is a good idea to read the license file license.md carefully before using openFrameworks.

Let's consider some of the most important folders in detail.

The examples folder

This folder contains simple examples covering almost all the aspects of openFrameworks, sorted by the following topics:

  • 3d: This folder demonstrates the basics of 3D graphics and 3D math (see Chapter 7, Drawing in 3D, for more information on the topic)
  • addons: This folder contains examples of using various addons, which are extensions of openFrameworks' core (see Appendix A, Working with Addons, for more information on the topic)
  • communication: This folder contains examples of communicating with peripherals using serial port (most often via USB), for example, for connecting with Arduino
  • empty: This folder contains emptyExample, the simplest project for openFrameworks, which we will use as a starting point for developing most of the examples across the book
  • events: This folder demonstrates built-in openFrameworks' event system usage, like key pressing and timing, and also working with custom event objects
  • gl: This folder contains advanced examples on 2D and 3D graphics, including FBO, VBO, and shaders (see Chapter 2, Drawing in 2D, Chapter 7, Drawing in 3D, and Chapter 8, Using Shaders, for detailed information on these topics)
  • graphics: This folder demonstrates basic 2D graphics capabilities and working with images (see Chapter 2, Drawing in 2D, and Chapter 4, Images and Textures, for more information on these topics)
  • gui: This folder exposes how to add graphical user interface, containing buttons, sliders, and checkboxes to an openFrameworks project
  • math: This folder has examples on working with Perlin noise, simple particle system, and also with vector mathematics (see Appendix B, Perlin noise, and Chapter 3, Building a Simple Particle System, for more information on these topics)
  • sound: This folder contains examples that demonstrate how to play, generate at low-level, and record sounds (see Chapter 6, Working with Sounds, for more information on the topic)
  • utils: This folder demonstrates working with small but important topics such as converting values between different types (for example, converting int to string), working with directories, and using threads
  • video: This folder demonstrates how to play videos, process video frames, and grab live video from camera (see Chapter 5, Working with Videos, for more information on the topic)

Though most of the topics will be covered in this book, we highly recommend that you run and see as many examples of the code as you can. It is very helpful for dipping into the openFrameworks world.

The apps folder

This is a folder, in which all your projects should live. More specifically, you should place the projects inside some subfolder of the apps folder. By now this folder contains the myApps folder, and you can use it for your projects. Also you can create new folders, like Performances2014, and place corresponding projects there.

Note, if you will try to compile a project placed outside a subfolder of the apps folder, the compiler can give an error that it can not find the openFrameworks library.

The addons folder

This folder contains addons. These are the extensions of the basic openFrameworks capabilities. When you need to add some extension to openFrameworks, you will install it into this folder. We discuss the addons in detail in Appendix A, Working with Addons.

主站蜘蛛池模板: 乌兰县| 祁连县| 大埔区| 鹤峰县| 棋牌| 郸城县| 武功县| 石门县| 阿巴嘎旗| 陵川县| 克东县| 南靖县| 昭通市| 共和县| 五原县| 易门县| 綦江县| 洛阳市| 珲春市| 平泉县| 汉阴县| 屯留县| 呼伦贝尔市| 固阳县| 抚远县| 嘉义县| 建昌县| 上虞市| 南召县| 通江县| 永善县| 成都市| 凤山市| 神池县| 苍溪县| 离岛区| 江安县| 涟源市| 文成县| 建瓯市| 虞城县|