Projektordner für das Team Deutsches Museum (FORUM).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ofApp.h 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. #pragma once
  2. #include "ofxWarp.h"
  3. #include "particle.h"
  4. #include "drawableImage.h"
  5. #include "imageParticleSystem.h"
  6. #include "rainParticleSystem.h"
  7. #include "ofMain.h"
  8. #include "particleSystem.h"
  9. #include "avatar.h"
  10. #include "ofxOsc.h"
  11. #include "visitor.h"
  12. #include "objectPhysics.h"
  13. #include "particle.h"
  14. #include "ofxOpenCv.h"
  15. #include "ofTrueTypeFont.h"
  16. #include "ofxCv.h"
  17. //int WINDOWSIZE_WIDTH = 1000;
  18. //int WINDOWSIZE_HEIGHT = 1000;
  19. // *** SETUP OSC INFORMATION *** SETUP OSC INFORMATION ***
  20. #define PORT 12345
  21. #define HOST "xxx.xxx.xxx.xxx"
  22. class ofApp : public ofBaseApp {
  23. public:
  24. void setup();
  25. void update();
  26. void draw();
  27. void exit();
  28. void keyPressed(int key);
  29. void keyReleased(int key);
  30. void mouseMoved(int x, int y);
  31. void mouseDragged(int x, int y, int button);
  32. void mousePressed(int x, int y, int button);
  33. void mouseReleased(int x, int y, int button);
  34. void mouseEntered(int x, int y);
  35. void mouseExited(int x, int y);
  36. void windowResized(int w, int h);
  37. void dragEvent(ofDragInfo dragInfo);
  38. void gotMessage(ofMessage msg);
  39. int PARTICLE_COUNT;
  40. //+1 for every new Particle, -1 for every Particle that gets older than the defined maxLife
  41. int VISITOR_COUNT;
  42. //the visitor count will be fed with the nBlobs-value from incoming OSC messages
  43. int VISITOR_COUNT_LASTFRAME;
  44. private:
  45. // *** OSC *** OSC *** OSC ***
  46. string oscMsg;
  47. ofxOscReceiver receiver;
  48. float timeSent, timeReceived;
  49. //Information about what is going on in the scene
  50. int nBlobs; //count of the tracked visitors
  51. // *** warp *** warp
  52. ofxWarpController warpController;
  53. ofTexture tex;
  54. ofRectangle area;
  55. ofVec2f sceneSize;
  56. ofVec2f force;
  57. ofImage img;
  58. ofImage fileImageHex;
  59. ofImage imageToDraw;
  60. ofImage drawImage;
  61. ofColor color;
  62. ofFbo fbo;
  63. vector<ofVec2f>attractors;
  64. vector<Particle*> system;
  65. vector<ImageParticleSystem*> imageParticleSystems;
  66. vector<RainParticleSystem*> rainParticleSyst;
  67. int currentImage;
  68. int maxParticle;
  69. int picPix;
  70. int k;
  71. int ticksToMoveParticlesToRight;
  72. int counterToMoveParticlesToRight;
  73. bool rainIsActive;
  74. bool editingWarp;
  75. vector<Visitor*> visitors;
  76. vector<ParticleSystem*> particleSystems;
  77. };