openFrameworks基礎 - 新規プロジェクトの作成、図形を描く 芸大グラフィクスプログラミングB

8,048 views

Published on

0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
8,048
On SlideShare
0
From Embeds
0
Number of Embeds
5,015
Actions
Shares
0
Downloads
117
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • openFrameworks基礎 - 新規プロジェクトの作成、図形を描く 芸大グラフィクスプログラミングB

    1. 1. ‣‣‣ ‣‣‣
    2. 2.
    3. 3.
    4. 4.
    5. 5.
    6. 6. ‣ ‣‣ ‣
    7. 7. ‣‣‣‣‣‣
    8. 8. #pragma once#include "ofMain.h"#include "ofxiPhone.h"#include "ofxiPhoneExtras.h"class testApp : public ofxiPhoneApp {public: void setup(); void update(); void draw(); void exit(); void touchDown(ofTouchEventArgs &touch); void touchMoved(ofTouchEventArgs &touch); void touchUp(ofTouchEventArgs &touch); void touchDoubleTap(ofTouchEventArgs &touch); void lostFocus(); void gotFocus(); void gotMemoryWarning(); void deviceOrientationChanged(int newOrientation);
    9. 9. #pragma once#include "ofMain.h"#include "ofxiPhone.h"#include "ofxiPhoneExtras.h"class testApp : public ofxiPhoneApp {public: void setup(); void update(); void draw(); void exit(); void touchDown(ofTouchEventArgs &touch); void touchMoved(ofTouchEventArgs &touch); void touchUp(ofTouchEventArgs &touch); void touchDoubleTap(ofTouchEventArgs &touch); void lostFocus(); void gotFocus(); void gotMemoryWarning(); void deviceOrientationChanged(int newOrientation);
    10. 10. #pragma once#include "ofMain.h"#include "ofxiPhone.h"#include "ofxiPhoneExtras.h"class testApp : public ofxiPhoneApp {public: void setup(); void update(); void draw(); void exit(); void touchDown(ofTouchEventArgs &touch); void touchMoved(ofTouchEventArgs &touch); void touchUp(ofTouchEventArgs &touch); void touchDoubleTap(ofTouchEventArgs &touch); void lostFocus(); void gotFocus(); void gotMemoryWarning(); void deviceOrientationChanged(int newOrientation);
    11. 11. #include "testApp.h"//--------------------------------------------------------------void testApp::setup(){}//--------------------------------------------------------------void testApp::update(){}//--------------------------------------------------------------void testApp::draw(){}//--------------------------------------------------------------void testApp::keyPressed(int key){}//--------------------------------------------------------------void testApp::keyReleased(int key){}
    12. 12. #include "testApp.h"//--------------------------------------------------------------void testApp::setup(){}//--------------------------------------------------------------void testApp::update(){}//--------------------------------------------------------------void testApp::draw(){}//--------------------------------------------------------------void testApp::keyPressed(int key){}//--------------------------------------------------------------void testApp::keyReleased(int key){}
    13. 13. #include "testApp.h"//--------------------------------------------------------------void testApp::setup(){}//--------------------------------------------------------------void testApp::update(){}//--------------------------------------------------------------void testApp::draw(){}//--------------------------------------------------------------void testApp::keyPressed(int key){}//--------------------------------------------------------------void testApp::keyReleased(int key){}
    14. 14. ‣‣
    15. 15.
    16. 16. ‣‣‣‣ ‣
    17. 17. < >//--------------------------------------------------------------void testApp::update(){}//--------------------------------------------------------------void testApp::draw(){ ofCircle(512, 384, 200); Text}//--------------------------------------------------------------void testApp::exit(){}< >
    18. 18.
    19. 19. ‣‣‣‣
    20. 20. ‣‣‣
    21. 21. ‣‣‣ ‣ ‣ ‣‣ ‣
    22. 22. #include "testApp.h"//--------------------------------------------------------------void testApp::setup(){}//--------------------------------------------------------------void testApp::update(){}//--------------------------------------------------------------void testApp::draw(){ ofSetColor(0, 127, 255, 200); ofCircle(412, 384, 200); ofSetColor(255, 127, 0, 200); ofCircle(612, 384, 200);}< >
    23. 23.
    24. 24. ‣‣ ofEnableAlphaBlending();‣ ofSetCircleResolution( );‣ ofBackground(R, G, B);
    25. 25. #include "testApp.h"//--------------------------------------------------------------void testApp::setup(){ ofEnableAlphaBlending(); ofSetCircleResolution(64); ofBackground(0, 0, 0);}//--------------------------------------------------------------void testApp::update(){}//--------------------------------------------------------------void testApp::draw(){ ofSetColor(0, 127, 255, 200); ofCircle(412, 384, 200); ofSetColor(255, 127, 0, 200); ofCircle(612, 384, 200);}< >
    26. 26. ‣‣‣ http://www.openframeworks.cc/documentation
    27. 27. ‣‣‣‣‣ http://www.openframeworks.cc/documentation?detail=ofGraphics‣

    ×