Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions examples/3d/3DPrimitivesExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "testApp.h"
#include "ofApp.h"

//--------------------------------------------------------------
int main(){
ofSetupOpenGL(1280, 720, OF_WINDOW);
ofRunApp(new testApp()); // start the app
ofRunApp(new ofApp()); // start the app
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "testApp.h"
#include "ofApp.h"

//--------------------------------------------------------------
void testApp::setup(){
void ofApp::setup(){

ofSetVerticalSync(true);
ofBackground(20);
Expand Down Expand Up @@ -54,7 +54,7 @@ void testApp::setup(){
}

//--------------------------------------------------------------
void testApp::update() {
void ofApp::update() {
pointLight.setPosition((ofGetWidth()*.5)+ cos(ofGetElapsedTimef()*.5)*(ofGetWidth()*.3), ofGetHeight()/2, 500);
pointLight2.setPosition((ofGetWidth()*.5)+ cos(ofGetElapsedTimef()*.15)*(ofGetWidth()*.3),
ofGetHeight()*.5 + sin(ofGetElapsedTimef()*.7)*(ofGetHeight()), -300);
Expand All @@ -72,7 +72,7 @@ void testApp::update() {
}

//--------------------------------------------------------------
void testApp::draw() {
void ofApp::draw() {

float spinX = sin(ofGetElapsedTimef()*.35f);
float spinY = cos(ofGetElapsedTimef()*.075f);
Expand Down Expand Up @@ -432,7 +432,7 @@ void testApp::draw() {
}

//--------------------------------------------------------------
void testApp::keyPressed(int key) {
void ofApp::keyPressed(int key) {

switch(key) {
case 'f':
Expand Down Expand Up @@ -608,42 +608,42 @@ void testApp::keyPressed(int key) {
}

//--------------------------------------------------------------
void testApp::keyReleased(int key){
void ofApp::keyReleased(int key){

}

//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y ){
void ofApp::mouseMoved(int x, int y ){

}

//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button){
void ofApp::mouseDragged(int x, int y, int button){


}

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){
void ofApp::mousePressed(int x, int y, int button){
bMousePressed = true;
}

//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){
void ofApp::mouseReleased(int x, int y, int button){
bMousePressed = false;
}

//--------------------------------------------------------------
void testApp::windowResized(int w, int h){
void ofApp::windowResized(int w, int h){

}

//--------------------------------------------------------------
void testApp::gotMessage(ofMessage msg){
void ofApp::gotMessage(ofMessage msg){

}

//--------------------------------------------------------------
void testApp::dragEvent(ofDragInfo dragInfo){
void ofApp::dragEvent(ofDragInfo dragInfo){

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "ofMain.h"

class testApp : public ofBaseApp{
class ofApp : public ofBaseApp{

public:
void setup();
Expand Down
4 changes: 2 additions & 2 deletions examples/3d/advanced3dExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "ofMain.h"
#include "testApp.h"
#include "ofApp.h"

//========================================================================
int main( ){
Expand All @@ -9,6 +9,6 @@ int main( ){
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new testApp());
ofRunApp( new ofApp());

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "testApp.h"
#include "ofApp.h"

//--------------------------------------------------------------
//
Expand Down Expand Up @@ -30,7 +30,7 @@


//--------------------------------------------------------------
void testApp::setup(){
void ofApp::setup(){

ofSetVerticalSync(true);
ofBackground(70, 70, 70);
Expand Down Expand Up @@ -91,7 +91,7 @@ void testApp::setup(){
}

//--------------------------------------------------------------
void testApp::setupViewports(){
void ofApp::setupViewports(){
//call here whenever we resize the window


Expand Down Expand Up @@ -119,13 +119,13 @@ void testApp::setupViewports(){
}

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

}


//--------------------------------------------------------------
void testApp::draw(){
void ofApp::draw(){

ofDrawBitmapString("test", 10, 10);

Expand Down Expand Up @@ -206,7 +206,7 @@ void testApp::draw(){
//--
}

void testApp::drawScene(int iCameraDraw){
void ofApp::drawScene(int iCameraDraw){

nodeSwarm.draw();
nodeGrid.draw();
Expand Down Expand Up @@ -335,7 +335,7 @@ void testApp::drawScene(int iCameraDraw){
}

//--------------------------------------------------------------
void testApp::updateMouseRay(){
void ofApp::updateMouseRay(){
// Define ray in screen space
ray[0] = ofVec3f(ofGetMouseX(), ofGetMouseY(), -1);
ray[1] = ofVec3f(ofGetMouseX(), ofGetMouseY(), 1);
Expand All @@ -346,7 +346,7 @@ void testApp::updateMouseRay(){
}

//--------------------------------------------------------------
void testApp::keyPressed(int key){
void ofApp::keyPressed(int key){

if(key >= '1' && key <= '4'){
iMainCamera = key - '1';
Expand Down Expand Up @@ -375,27 +375,27 @@ void testApp::keyPressed(int key){
}

//--------------------------------------------------------------
void testApp::keyReleased(int key){
void ofApp::keyReleased(int key){
}

//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y){
void ofApp::mouseMoved(int x, int y){
}

//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button){
void ofApp::mouseDragged(int x, int y, int button){
}

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){
void ofApp::mousePressed(int x, int y, int button){
}

//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){
void ofApp::mouseReleased(int x, int y, int button){
}

//--------------------------------------------------------------
void testApp::windowResized(int w, int h){
void ofApp::windowResized(int w, int h){
setupViewports();
}

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#define N_CAMERAS 4

class testApp : public ofBaseApp {
class ofApp : public ofBaseApp {

public:
void setup();
Expand Down
4 changes: 2 additions & 2 deletions examples/3d/cameraLensOffsetExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "testApp.h"
#include "ofApp.h"

int main() {
ofSetupOpenGL(1280, 720, OF_WINDOW);
ofRunApp(new testApp());
ofRunApp(new ofApp());
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "testApp.h"
#include "ofApp.h"

//--------------------------------------------------------------
void testApp::setup(){
void ofApp::setup(){
ofEnableSmoothing();
ofSetVerticalSync(true);

Expand Down Expand Up @@ -38,7 +38,7 @@ void testApp::setup(){
}

//--------------------------------------------------------------
void testApp::update(){
void ofApp::update(){
video.update();
finder.findHaarObjects(video.getPixelsRef());

Expand Down Expand Up @@ -78,7 +78,7 @@ void testApp::update(){
}

//--------------------------------------------------------------
void testApp::drawScene(bool isPreview){
void ofApp::drawScene(bool isPreview){

ofEnableDepthTest();

Expand Down Expand Up @@ -151,7 +151,7 @@ void testApp::drawScene(bool isPreview){
}

//--------------------------------------------------------------
void testApp::draw(){
void ofApp::draw(){

ofBackgroundGradient(ofColor(50), ofColor(0));
//------
Expand Down Expand Up @@ -210,47 +210,47 @@ void testApp::draw(){
}

//--------------------------------------------------------------
void testApp::keyPressed(int key){
void ofApp::keyPressed(int key){
if (key == ' ')
usePreview = !usePreview;
}

//--------------------------------------------------------------
void testApp::keyReleased(int key){
void ofApp::keyReleased(int key){

}

//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y ){
void ofApp::mouseMoved(int x, int y ){

}

//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button){
void ofApp::mouseDragged(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){
void ofApp::mousePressed(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){
void ofApp::mouseReleased(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::windowResized(int w, int h){
void ofApp::windowResized(int w, int h){

}

//--------------------------------------------------------------
void testApp::gotMessage(ofMessage msg){
void ofApp::gotMessage(ofMessage msg){

}

//--------------------------------------------------------------
void testApp::dragEvent(ofDragInfo dragInfo){
void ofApp::dragEvent(ofDragInfo dragInfo){

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "ofMain.h"
#include "ofxCvHaarFinder.h"

class testApp : public ofBaseApp{
class ofApp : public ofBaseApp{
public:
void setup();
void update();
Expand Down
4 changes: 2 additions & 2 deletions examples/3d/cameraParentingExample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "ofMain.h"
#include "testApp.h"
#include "ofApp.h"

//========================================================================
int main( ){
Expand All @@ -9,6 +9,6 @@ int main( ){
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new testApp());
ofRunApp( new ofApp());

}
Loading