Catégories
Liens
Ceci est une ancienne révision du document !
OpenFrameworks est une boîte à outil (framework) écrite en C + + pour le code créatif. http://openframeworks.cc
Tiré du livre “Programming Interactivity”, page 153
Why 2 functions update & draw ?
Exemple de code (essayer sur http://ideone.com) :
#include <iostream> using namespace std; int main() { cout << "Hello World" << endl; return 0; }
Mots clés : fichier .h (déclaration), fichier .cpp (implémentation), conventions de nommage, fonctions (signature, paramètres, appel, retour), variables, objets (attributs, méthodes), namespace, types de données, casting, structure de données (pointeur, tableau, …), structure de contrôle (if, else, for, while, switch, …), conditions, …
Vecteur
vector<float> nums; // create an empty vector of floats nums.push_back(10.5); // add a float with value 10.5 to the end of vector cout << nums[0] << endl; // print out the value of element at position 0 nums.erase( nums.begin() ); // erase the first element in the vector cout << nums.size() << endl; // print the number of elements in the vector vector<float>:: iterator it = nums.begin(); // create an iterator that points to first element cout << *it << end; // print out the value of the element pointed to by the iterator // loop for( int i = 0; i < names.size(); i=i+1){ cout << names[i] << endl; }
<blockquote> When you write code, your end goal is a compiled application - an .exe or .app that you can click on an run. The job of the compiler is to make that executable for you, to turn text into compiled binary files.
</blockquote>
Mots clés : Vertex, Vecteur, Mesh, Face, OpenGl, Shader, Matrices, VBO, Vertex Array, OpenGl Pipeline, Transformations, … Voir : terminologie-3d