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.cpp 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #include "ofApp.h"
  2. //--------------------------------------------------------------
  3. void ofApp::setup(){
  4. cout <<"setup methode()" <<endl;
  5. cam.listDevices(); //listet alle kameras auf
  6. cam.setDeviceID(0); //wählt eine Kamera aus der Liste aus
  7. resolution.x=640;
  8. resolution.y=480;
  9. cam.setup(resolution.x,resolution.y); // int h und int w werden übergeben
  10. }
  11. //--------------------------------------------------------------
  12. void ofApp::update(){
  13. cam.update();
  14. }
  15. //--------------------------------------------------------------
  16. void ofApp::draw(){
  17. cam.draw(0,0, resolution.x, resolution.y);
  18. }
  19. //--------------------------------------------------------------
  20. void ofApp::keyPressed(int key){
  21. }
  22. //--------------------------------------------------------------
  23. void ofApp::keyReleased(int key){
  24. switch(key){
  25. case 'f':
  26. ofToggleFullscreen();
  27. default:
  28. break;
  29. }
  30. }
  31. //--------------------------------------------------------------
  32. void ofApp::mouseMoved(int x, int y ){
  33. }
  34. //--------------------------------------------------------------
  35. void ofApp::mouseDragged(int x, int y, int button){
  36. }
  37. //--------------------------------------------------------------
  38. void ofApp::mousePressed(int x, int y, int button){
  39. }
  40. //--------------------------------------------------------------
  41. void ofApp::mouseReleased(int x, int y, int button){
  42. }
  43. //--------------------------------------------------------------
  44. void ofApp::mouseEntered(int x, int y){
  45. }
  46. //--------------------------------------------------------------
  47. void ofApp::mouseExited(int x, int y){
  48. }
  49. //--------------------------------------------------------------
  50. void ofApp::windowResized(int w, int h){
  51. }
  52. //--------------------------------------------------------------
  53. void ofApp::gotMessage(ofMessage msg){
  54. }
  55. //--------------------------------------------------------------
  56. void ofApp::dragEvent(ofDragInfo dragInfo){
  57. }