Skip to content

Commit

Permalink
added '019_ofEasyCam'
Browse files Browse the repository at this point in the history
  • Loading branch information
Lewis Lepton committed Sep 3, 2019
1 parent 0eb3c1e commit 3af4de4
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 0 deletions.
13 changes: 13 additions & 0 deletions 019_ofEasyCam/src/main.cpp
@@ -0,0 +1,13 @@
#include "ofMain.h"
#include "ofApp.h"

//========================================================================
int main( ){
ofSetupOpenGL(1024,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());

}
75 changes: 75 additions & 0 deletions 019_ofEasyCam/src/ofApp.cpp
@@ -0,0 +1,75 @@
#include "ofApp.h"

//--------------------------------------------------------------
void ofApp::setup(){
cam.setDistance(200);
}

//--------------------------------------------------------------
void ofApp::update(){

}

//--------------------------------------------------------------
void ofApp::draw(){
cam.begin();
ofNoFill();
ofDrawSphere(64);
ofDrawCircle(0, 0, 72);
cam.end();
}

//--------------------------------------------------------------
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){

}
26 changes: 26 additions & 0 deletions 019_ofEasyCam/src/ofApp.h
@@ -0,0 +1,26 @@
#pragma once

#include "ofMain.h"

class ofApp : public ofBaseApp{

public:
void setup();
void update();
void draw();

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);

ofEasyCam cam;

};

0 comments on commit 3af4de4

Please sign in to comment.