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.
64 lines
1.9 KiB
64 lines
1.9 KiB
// ofxPiMapper
|
|
// Author: Krisjanis Rijnieks
|
|
|
|
// On using prefixes like m or p (mMemberVariable, pMyPointer)
|
|
// http://stackoverflow.com/questions/1228161/why-use-prefixes-on-member-variables-in-c-classes
|
|
|
|
#pragma once
|
|
|
|
#include "ofMain.h"
|
|
#include "SurfaceManager.h"
|
|
#include "SurfaceManagerGui.h"
|
|
#include "MediaServer.h"
|
|
#include "FboSource.h"
|
|
|
|
// Command design pattern includes
|
|
#include "BaseCmd.h"
|
|
#include "CmdManager.h"
|
|
#include "RmSurfaceCmd.h"
|
|
#include "SetGuiModeCmd.h"
|
|
|
|
#define PIMAPPER_DEF_SURFACES_XML_FILE "defaultSurfaces.xml"
|
|
#define PIMAPPER_USER_SURFACES_XML_FILE "surfaces.xml"
|
|
|
|
class ofxPiMapper{
|
|
|
|
public:
|
|
ofxPiMapper();
|
|
~ofxPiMapper();
|
|
|
|
void setup();
|
|
void draw();
|
|
void keyPressed(ofKeyEventArgs& args);
|
|
|
|
void addFboSource(ofx::piMapper::FboSource& fboSource);
|
|
|
|
// Discussion:
|
|
// Maybe it makes more sense to use create prefix instead of add
|
|
// in addTriangleSurface and so on, so we get createTriangleSurface.
|
|
// TODO: Copy/move these methods to SurfaceManager (not sure)
|
|
void addTriangleSurface();
|
|
void addQuadSurface();
|
|
|
|
// Toggle help / info
|
|
void showInfo() { bShowInfo = true; };
|
|
void hideInfo() { bShowInfo = false; };
|
|
|
|
// Discussion:
|
|
// Maybe these should be static as this would allow to access them
|
|
// from anywhere within ofxPiMapper.
|
|
ofx::piMapper::MediaServer& getMediaServer();
|
|
ofx::piMapper::SurfaceManager& getSurfaceManager();
|
|
|
|
ofx::piMapper::CmdManager cmdManager;
|
|
ofx::piMapper::SurfaceManager surfaceManager;
|
|
|
|
private:
|
|
bool isSetUp;
|
|
bool bShowInfo;
|
|
ofx::piMapper::MediaServer mediaServer;
|
|
|
|
// Discussion: Here now the GUI points only to surface manager,
|
|
// maybe it should be as a separate layer?
|
|
ofx::piMapper::SurfaceManagerGui gui;
|
|
};
|