ofxPiMapper fixed for C++17 & oF 12.0
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.
 
 

46 lines
1.3 KiB

#ifndef H_OFX_SURFACE_MANAGER
#define H_OFX_SURFACE_MANAGER
#include "ofxBaseSurface.h"
#include "ofxTriangleSurface.h"
#include "ofxSurfaceType.h"
#include "ofEvents.h"
#include "ofxXmlSettings.h"
using namespace std;
class ofxSurfaceManager
{
public:
ofxSurfaceManager();
~ofxSurfaceManager();
void draw();
void addSurface(int surfaceType);
void addSurface(int surfaceType, ofTexture* texturePtr);
void addSurface(int surfaceType, vector<ofVec2f> vertices, vector<ofVec2f> texCoords);
void addSurface(int surfaceType, ofTexture* texturePtr, vector<ofVec2f> vertices, vector<ofVec2f> texCoords);
void manageMemory(); // deletes unasigned sources
void clear();
void saveXmlSettings(string fileName);
void loadXmlSettings(string fileName);
ofxBaseSurface* getSurface(int index);
int size();
ofxBaseSurface* selectSurface(int index);
ofxBaseSurface* getSelectedSurface();
void deselectSurface();
ofTexture* loadImageSource(string name, string path);
string getSelectedSurfaceSourceName();
string getSurfaceSourceName( ofxBaseSurface* surface );
private:
vector<ofxBaseSurface*> surfaces;
ofxBaseSurface* selectedSurface;
vector<string> loadedImageSourceNames;
vector<ofImage*> loadedImageSources;
ofxXmlSettings xmlSettings;
};
#endif