Created
March 15, 2016 22:22
-
-
Save gatana/868a1034c357265c8107 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Circle.cpp | |
// Cathairs | |
// | |
// Created by Ana Sofia Remis on 3/15/16. | |
// | |
// | |
#include "Circle.hpp" | |
void Circle:: setup(){ | |
posx = ofGetWidth()/2 ; | |
posy = ofGetHeight()/2 ; | |
lastradius = 5; | |
newradius = lastradius++; | |
} | |
void Circle:: draw() { | |
void ofApp:: drawCircle(); | |
} | |
void Circle:: update(){ | |
lastradius++; | |
newradius; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Circle.hpp | |
// Cathairs | |
// | |
// Created by Ana Sofia Remis on 3/15/16. | |
// | |
// | |
#ifndef Circle_hpp | |
#define Circle_hpp | |
#include "ofMain.h" | |
#include <stdio.h> | |
#endif /* Circle_hpp */ | |
class Circle { | |
public: | |
void setup(); | |
void draw(); | |
void update(); | |
void drawCircle(); | |
int posx; | |
int posy; | |
int lastradius; | |
int newradius; //new radius = lastradius-3 | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofMain.h" | |
#include "ofApp.h" | |
//======================================================================== | |
int main( ){ | |
ofSetupOpenGL(1084,768,OF_WINDOW); // <-------- setup the GL context | |
// this kicks off the running of my app | |
// can be OF_WINDOW or OF_FULLSCREEN | |
// pass in width and height too: | |
ofRunApp(new ofApp()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ofApp::update(){ | |
//hairs.update(); | |
} | |
//-------------------------------------------------------------- | |
void ofApp::draw(){ | |
// hairs.draw() | |
// ofRect(45,45,45,45); | |
// ofEllipse (55, 566, 60, 45); | |
// ofLine(27.6, 67.5, 78.9, 467.9); | |
} | |
void ofApp:: drawCircle() { | |
// ofEllipse(); | |
if(radius > 2) { | |
radius *= 0.75f; | |
drawCircle(); | |
} | |
} | |
//-------------------------------------------------------------- | |
void ofApp::keyPressed(int key){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::keyReleased(int key){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::mouseMoved(int x, int y ){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::mouseDragged(int x, int y, int button){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::mousePressed(int x, int y, int button){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::mouseReleased(int x, int y, int button){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::mouseEntered(int x, int y){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::mouseExited(int x, int y){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::windowResized(int w, int h){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::gotMessage(ofMessage msg){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::dragEvent(ofDragInfo dragInfo){ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "ofMain.h" | |
#include "Circle.hpp" | |
#define CAT | |
#define NCAT 10; | |
class ofApp : public ofBaseApp{ | |
public: | |
void setup(); | |
void update(); | |
void draw(); | |
void drawCircle(); | |
void keyPressed(int key); | |
void keyReleased(int key); | |
void mouseMoved(int x, int y ); | |
void mouseDragged(int x, int y, int button); | |
void mousePressed(int x, int y, int button); | |
void mouseReleased(int x, int y, int button); | |
void mouseEntered(int x, int y); | |
void mouseExited(int x, int y); | |
void windowResized(int w, int h); | |
void dragEvent(ofDragInfo dragInfo); | |
void gotMessage(ofMessage msg); | |
int radius = 5; | |
int x= mouseX; | |
int y = mouseY; | |
// vector <drawCircle > circle; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment