Browse Source

Merge branch 'release-v0.2.1' into develop

master
Krisjanis Rijnieks 11 years ago
parent
commit
4d12bc2c0d
  1. 30
      README.md
  2. 152
      example/bin/data/defaultSurfaces.xml
  3. 34
      example/src/main.cpp
  4. 2
      example/src/ofApp.cpp

30
README.md

@ -5,11 +5,18 @@ ofxPiMapper
This project is an attempt to create optimized version of an openFrameworks projection mapping addon for the Raspberry Pi. It is also my master thesis project at Aalto University, School of Arts, Design and Architecture (Helsinki Media Lab).
ofxPiMapper is mainly for people who want to use the Raspberry Pi as a cheaper way to create standalone mapping installations. Let's say someone has 10 generative mapping pieces and gets an offer to exhibit them in an art gallery, museum or any other kind of place. 10 Mac computers? No! PiMapper is here to save you!
ofxPiMapper is mainly for people who want to use the Raspberry Pi as a cheaper way to create standalone mapping installations. Let's say someone has 10 generative mapping pieces and gets an offer to exhibit them in an art gallery, museum or any other kind of place. 10 expensive computers? No! PiMapper is here to save you!
The addon itself is intended to be flexible as the separate components of it can be reusable. The main example of the addon can be used as a standalone application for experimenting, testing as well as production state of a project. If you need to save memory and processing power, reusing ofxPiMapper classes without adding the GUI layer can help you.
ofxPiMapper features FBO sources that allow you to create generative openFrameworks patches to be used with ofxPiMapper. Extend the `FboSource` class, override `setup()`, `update()` and `draw()` methods and then create an instance of your custom source to add it to your ofxPiMapper object.
As ofxPiMapper is optimized for the Pi, there is no doubt that it will run smoothly on other machines. It has been tested on OS X so far.
```
ofxPiMapper* mapper = new ofxPiMapper();
CustomSource* source = new CustomSource();
mapper.addFboSource(source);
mapper.setup(); // Setup must be run after adding the FBO source
```
Since version 0.2.0 ofxPiMapper supports video sources.
Development
-----------
@ -107,10 +114,7 @@ Dependencies
To install dependencies, `cd` into `openFrameworks/addons` directory and execute the following:
```
git clone https://github.com/jvcleave/ofxOMXPlayer.git
... many lines inbetween
git clone https://github.com/bakercp/ofxIO.git
... many lines here as well
git clone https://github.com/jvcleave/ofxOMXPlayer.git && git clone https://github.com/bakercp/ofxIO.git
```
And you are good to go!
@ -157,7 +161,17 @@ A short wishlist for the next releases:
- Refined directoryWatcher mechanism, source lists should react on added and removed files
- OSC remote control module
- Webserver with simple interface for remote mapping
- Syphon source for Mac
- Spout source for Win
- Streaming source for RPi (fb sharing, network streams...)
- Even better structure
### Version 0.2.1 (2014-11-05):
- Added single instance feature. Now you can use ofxPiMapper as single object for your project.
- Added FBO source. You can create a custom openFrameworks application for piMapper by extending the FboSource class. Add/register your custom object as source in piMapper and you will be able to select it in the source editor. Source is saved and loaded from the settings as well.
- Fixed issue #15
- Added -f (fullscreen) flag for the Raspberry Pi version. Use `./yourApp -f` to launch it fullscreen on start.
### Version 0.2.0 (2014-10-18):
- Added logo (thanks [Irina Spicaka](http://irina.spicaka.info/))
@ -171,7 +185,7 @@ A short wishlist for the next releases:
### Version 0.1.4 (2014-07-10):
- Added fbo texture example
- Replaced the main example with the fbo texture one
- Added simple quad surface
- Added simple quad surface (thanks [sebllll](https://github.com/sebllll))
- Fixed a couple of bugs
- Introduced new branching model
- Added joint snapping

152
example/bin/data/defaultSurfaces.xml

@ -2,137 +2,179 @@
<surface>
<vertices>
<vertex>
<x>250.000000000</x>
<y>34.000000000</y>
<x>26.396118164</x>
<y>223.170288086</y>
</vertex>
<vertex>
<x>374.000000000</x>
<y>201.000000000</y>
<x>241.000000000</x>
<y>118.000000000</y>
</vertex>
<vertex>
<x>535.000000000</x>
<y>35.000000000</y>
<x>213.630920410</x>
<y>352.926849365</y>
</vertex>
</vertices>
<texCoords>
<texCoord>
<x>0.101999998</x>
<y>0.335999995</y>
<x>0.251666665</x>
<y>0.090000004</y>
</texCoord>
<texCoord>
<x>0.328000009</x>
<y>0.689999998</y>
<x>0.449999988</x>
<y>0.696666658</y>
</texCoord>
<texCoord>
<x>0.705999970</x>
<y>0.393999994</y>
<x>0.870000005</x>
<y>0.173333332</y>
</texCoord>
</texCoords>
<source>
<source-type>image</source-type>
<source-name>image1.jpg</source-name>
<source-name>image5.jpg</source-name>
</source>
</surface>
<surface>
<vertices>
<vertex>
<x>24.396121979</x>
<y>259.170288086</y>
<x>84.709846497</x>
<y>462.636596680</y>
</vertex>
<vertex>
<x>250.000000000</x>
<y>34.000000000</y>
<x>293.630920410</x>
<y>228.926849365</y>
</vertex>
<vertex>
<x>214.630920410</x>
<y>282.926849365</y>
<x>33.396121979</x>
<y>271.170288086</y>
</vertex>
</vertices>
<texCoords>
<texCoord>
<x>0.251666665</x>
<y>0.090000004</y>
<x>0.981523871</x>
<y>0.471785098</y>
</texCoord>
<texCoord>
<x>0.449999988</x>
<y>0.696666658</y>
<x>0.245601788</x>
<y>0.110941604</y>
</texCoord>
<texCoord>
<x>0.870000005</x>
<y>0.173333332</y>
<x>0.662217021</x>
<y>0.714698017</y>
</texCoord>
</texCoords>
<source>
<source-type>image</source-type>
<source-name>image5.jpg</source-name>
<source-type>fbo</source-type>
<source-name>Custom FBO Source</source-name>
</source>
</surface>
<surface>
<vertices>
<vertex>
<x>75.709846497</x>
<y>450.636596680</y>
<x>510.148498535</x>
<y>97.815002441</y>
</vertex>
<vertex>
<x>214.630920410</x>
<y>282.926849365</y>
<x>372.000000000</x>
<y>434.000000000</y>
</vertex>
<vertex>
<x>24.396121979</x>
<y>259.170288086</y>
<x>159.000000000</x>
<y>158.000000000</y>
</vertex>
</vertices>
<texCoords>
<texCoord>
<x>0.981523871</x>
<y>0.471785098</y>
<x>0.331067860</x>
<y>0.732035518</y>
</texCoord>
<texCoord>
<x>0.245601788</x>
<y>0.110941604</y>
<x>0.782209992</x>
<y>0.181442097</y>
</texCoord>
<texCoord>
<x>0.662217021</x>
<y>0.714698017</y>
<x>0.877761841</x>
<y>0.894570410</y>
</texCoord>
</texCoords>
<source>
<source-type>image</source-type>
<source-name>image4.jpg</source-name>
<source-type>video</source-type>
<source-name>test.mov</source-name>
</source>
</surface>
<surface>
<vertices>
<vertex>
<x>527.148498535</x>
<y>277.815002441</y>
<x>152.000000000</x>
<y>343.000000000</y>
</vertex>
<vertex>
<x>377.000000000</x>
<y>246.000000000</y>
</vertex>
<vertex>
<x>320.170959473</x>
<y>461.102355957</y>
<x>538.000000000</x>
<y>490.000000000</y>
</vertex>
<vertex>
<x>285.250427246</x>
<y>209.424682617</y>
<x>160.000000000</x>
<y>551.000000000</y>
</vertex>
</vertices>
<texCoords>
<texCoord>
<x>0.031067841</x>
<y>0.511202157</y>
<x>0.172656253</x>
<y>0.134333342</y>
</texCoord>
<texCoord>
<x>0.450178742</x>
<y>0.116164304</y>
<x>0.480374992</x>
<y>0.134333342</y>
</texCoord>
<texCoord>
<x>0.543386877</x>
<y>0.609848201</y>
<x>0.480374992</x>
<y>0.570833325</y>
</texCoord>
<texCoord>
<x>0.172656253</x>
<y>0.570833325</y>
</texCoord>
</texCoords>
<source>
<source-type>image</source-type>
<source-name>none</source-name>
<source-type>video</source-type>
<source-name>test.mov</source-name>
</source>
</surface>
<surface>
<vertices>
<vertex>
<x>509.000000000</x>
<y>50.000000000</y>
</vertex>
<vertex>
<x>629.000000000</x>
<y>383.000000000</y>
</vertex>
<vertex>
<x>276.000000000</x>
<y>358.000000000</y>
</vertex>
</vertices>
<texCoords>
<texCoord>
<x>0.500000000</x>
<y>0.000000000</y>
</texCoord>
<texCoord>
<x>1.000000000</x>
<y>1.000000000</y>
</texCoord>
<texCoord>
<x>0.000000000</x>
<y>1.000000000</y>
</texCoord>
</texCoords>
<source>
<source-type>fbo</source-type>
<source-name>Custom FBO Source</source-name>
</source>
</surface>
</surfaces>

34
example/src/main.cpp

@ -1,12 +1,34 @@
#include "ofMain.h"
#include "ofApp.h"
#include <string>
int main()
{
#ifdef TARGET_RASPBERRY_PI
ofSetupOpenGL(600, 500, OF_FULLSCREEN);
// Accept arguments in the Pi version
int main(int argc, char* argv[]) {
bool fullscreen = false;
if (argc > 0) {
std::string fullscreenFlag = "-f";
for (int i = 0; i < argc; i++) {
if (strcmp(argv[i], fullscreenFlag.c_str()) == 0) {
fullscreen = true;
break;
}
}
}
if (fullscreen) {
ofSetupOpenGL(600, 500, OF_FULLSCREEN);
} else {
ofSetupOpenGL(800, 450, OF_WINDOW);
}
ofRunApp(new ofApp());
}
#else
ofSetupOpenGL(600, 500, OF_WINDOW);
int main() {
ofSetupOpenGL(800, 600, OF_WINDOW);
ofRunApp(new ofApp());
}
#endif
ofRunApp(new ofApp());
}

2
example/src/ofApp.cpp

@ -11,7 +11,7 @@ void ofApp::setup() {
piMapper.setup();
// The info layer is hidden by default, press <i> to toggle
piMapper.showInfo();
// piMapper.showInfo();
}
void ofApp::draw() {

Loading…
Cancel
Save