09. ofxFlocking example


testApp.h

/*
 *  testApp.h
 *  openFrameworks
 *
 *  ofxFlocking created by Jeffrey Crouse on 3/30/10.
 *
 */
 
#ifndef TESTAPP_H
#define TESTAPP_H

#include "ofMain.h"
#include "ofxFlocking.h"

class testApp : public ofBaseApp{
public:
    void setup();
    void update();
    void draw();

    void mouseMoved(int x, int y );
    
    ofxFlocking flock;

};

#endif

testApp.cpp

/*
 *  testApp.cpp
 *  openFrameworks
 *
 *  ofxFlocking created by Jeffrey Crouse on 3/30/10.
 *
 */
 
 #include "testApp.h"

//--------------------------------------------------------------
void testApp::setup() {
    ofBackground(0,0,0);
}

//--------------------------------------------------------------
void testApp::update() {
    flock.update();
}

//--------------------------------------------------------------
void testApp::draw() {
    flock.draw();
}

//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y) {
    flock.addBoid();
}
Č
ċ
Rick Companje,
8 dec. 2011 05:17
ċ
Rick Companje,
8 dec. 2011 07:39
ċ
Rick Companje,
8 dec. 2011 08:03
ċ
letters2.zip
(3309k)
Rick Companje,
8 dec. 2011 08:34
Ć
pig.wav
(49k)
Rick Companje,
8 dec. 2011 08:26
Comments