|
|
@ -2,59 +2,47 @@ |
|
|
|
|
|
|
|
namespace ofx { |
|
|
|
namespace piMapper { |
|
|
|
SurfaceManager::SurfaceManager() |
|
|
|
{ |
|
|
|
SurfaceManager::SurfaceManager() {} |
|
|
|
|
|
|
|
} |
|
|
|
SurfaceManager::~SurfaceManager() { clear(); } |
|
|
|
|
|
|
|
SurfaceManager::~SurfaceManager() |
|
|
|
{ |
|
|
|
clear(); |
|
|
|
} |
|
|
|
|
|
|
|
void SurfaceManager::draw() |
|
|
|
{ |
|
|
|
void SurfaceManager::draw() { |
|
|
|
for (int i = 0; i < surfaces.size(); i++) { |
|
|
|
surfaces[i]->draw(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void SurfaceManager::addSurface(int surfaceType) |
|
|
|
{ |
|
|
|
void SurfaceManager::addSurface(int surfaceType) { |
|
|
|
if (surfaceType == SurfaceType::TRIANGLE_SURFACE) { |
|
|
|
surfaces.push_back(new TriangleSurface()); |
|
|
|
} |
|
|
|
else if (surfaceType == SurfaceType::QUAD_SURFACE ) { |
|
|
|
} else if (surfaceType == SurfaceType::QUAD_SURFACE) { |
|
|
|
surfaces.push_back(new QuadSurface()); |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
throw std::runtime_error("Attempt to add non-existing surface type."); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void SurfaceManager::addSurface(int surfaceType, ofTexture* texturePtr) |
|
|
|
{ |
|
|
|
void SurfaceManager::addSurface(int surfaceType, ofTexture* texturePtr) { |
|
|
|
if (surfaceType == SurfaceType::TRIANGLE_SURFACE) { |
|
|
|
surfaces.push_back(new TriangleSurface()); |
|
|
|
surfaces.back()->setTexture(texturePtr); |
|
|
|
} |
|
|
|
else if (surfaceType == SurfaceType::QUAD_SURFACE ) { |
|
|
|
} else if (surfaceType == SurfaceType::QUAD_SURFACE) { |
|
|
|
surfaces.push_back(new QuadSurface()); |
|
|
|
surfaces.back()->setTexture(texturePtr); |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
throw std::runtime_error("Attempt to add non-existing surface type."); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void SurfaceManager::addSurface(int surfaceType, vector<ofVec2f> vertices, vector<ofVec2f> texCoords) |
|
|
|
{ |
|
|
|
void SurfaceManager::addSurface(int surfaceType, vector<ofVec2f> vertices, |
|
|
|
vector<ofVec2f> texCoords) { |
|
|
|
if (surfaceType == SurfaceType::TRIANGLE_SURFACE) { |
|
|
|
|
|
|
|
if (vertices.size() < 3) { |
|
|
|
throw std::runtime_error("There must be 3 vertices for a triangle surface."); |
|
|
|
throw std::runtime_error( |
|
|
|
"There must be 3 vertices for a triangle surface."); |
|
|
|
} else if (texCoords.size() < 3) { |
|
|
|
throw std::runtime_error("There must be 3 texture coordinates for a triangle surface."); |
|
|
|
throw std::runtime_error( |
|
|
|
"There must be 3 texture coordinates for a triangle surface."); |
|
|
|
} |
|
|
|
|
|
|
|
surfaces.push_back(new TriangleSurface()); |
|
|
@ -64,12 +52,12 @@ void SurfaceManager::addSurface(int surfaceType, vector<ofVec2f> vertices, vecto |
|
|
|
surfaces.back()->setTexCoord(i, texCoords[i]); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else if (surfaceType == SurfaceType::QUAD_SURFACE ) { |
|
|
|
} else if (surfaceType == SurfaceType::QUAD_SURFACE) { |
|
|
|
if (vertices.size() < 4) { |
|
|
|
throw std::runtime_error("There must be 4 vertices for a quad surface."); |
|
|
|
} else if (texCoords.size() < 4) { |
|
|
|
throw std::runtime_error("There must be 4 texture coordinates for a quad surface."); |
|
|
|
throw std::runtime_error( |
|
|
|
"There must be 4 texture coordinates for a quad surface."); |
|
|
|
} |
|
|
|
|
|
|
|
surfaces.push_back(new QuadSurface()); |
|
|
@ -78,21 +66,21 @@ void SurfaceManager::addSurface(int surfaceType, vector<ofVec2f> vertices, vecto |
|
|
|
surfaces.back()->setVertex(i, vertices[i]); |
|
|
|
surfaces.back()->setTexCoord(i, texCoords[i]); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
throw std::runtime_error("Attempt to add non-existing surface type."); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void SurfaceManager::addSurface(int surfaceType, ofTexture* texturePtr, vector<ofVec2f> vertices, vector<ofVec2f> texCoords) |
|
|
|
{ |
|
|
|
void SurfaceManager::addSurface(int surfaceType, ofTexture* texturePtr, |
|
|
|
vector<ofVec2f> vertices, |
|
|
|
vector<ofVec2f> texCoords) { |
|
|
|
if (surfaceType == SurfaceType::TRIANGLE_SURFACE) { |
|
|
|
|
|
|
|
if (vertices.size() < 3) { |
|
|
|
throw std::runtime_error("There must be 3 vertices for a triangle surface."); |
|
|
|
throw std::runtime_error( |
|
|
|
"There must be 3 vertices for a triangle surface."); |
|
|
|
} else if (texCoords.size() < 3) { |
|
|
|
throw std::runtime_error("Thre must be 3 texture coordinates for a triangle surface."); |
|
|
|
throw std::runtime_error( |
|
|
|
"Thre must be 3 texture coordinates for a triangle surface."); |
|
|
|
} |
|
|
|
|
|
|
|
surfaces.push_back(new TriangleSurface()); |
|
|
@ -103,12 +91,12 @@ void SurfaceManager::addSurface(int surfaceType, ofTexture* texturePtr, vector<o |
|
|
|
surfaces.back()->setTexCoord(i, texCoords[i]); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else if (surfaceType == SurfaceType::QUAD_SURFACE ) { |
|
|
|
} else if (surfaceType == SurfaceType::QUAD_SURFACE) { |
|
|
|
if (vertices.size() < 4) { |
|
|
|
throw std::runtime_error("There must be 4 vertices for a quad surface."); |
|
|
|
} else if (texCoords.size() < 4) { |
|
|
|
throw std::runtime_error("Thre must be 4 texture coordinates for a quad surface."); |
|
|
|
throw std::runtime_error( |
|
|
|
"Thre must be 4 texture coordinates for a quad surface."); |
|
|
|
} |
|
|
|
|
|
|
|
surfaces.push_back(new QuadSurface()); |
|
|
@ -118,14 +106,12 @@ void SurfaceManager::addSurface(int surfaceType, ofTexture* texturePtr, vector<o |
|
|
|
surfaces.back()->setVertex(i, vertices[i]); |
|
|
|
surfaces.back()->setTexCoord(i, texCoords[i]); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
throw std::runtime_error("Attempt to add non-existing surface type."); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void SurfaceManager::removeSelectedSurface() |
|
|
|
{ |
|
|
|
void SurfaceManager::removeSelectedSurface() { |
|
|
|
if (selectedSurface == NULL) return; |
|
|
|
|
|
|
|
for (int i = 0; i < surfaces.size(); i++) { |
|
|
@ -138,14 +124,14 @@ void SurfaceManager::removeSelectedSurface() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void SurfaceManager::manageMemory() |
|
|
|
{ |
|
|
|
void SurfaceManager::manageMemory() { |
|
|
|
// check if each of the sources is assigned to a surface or not
|
|
|
|
for (int i = 0; i < loadedImageSources.size(); i++) { |
|
|
|
bool bAssigned = false; |
|
|
|
|
|
|
|
for (int j = 0; j < surfaces.size(); j++) { |
|
|
|
if ( surfaces[j]->getTexture() == &loadedImageSources[i]->getTextureReference() ) { |
|
|
|
if (surfaces[j]->getTexture() == |
|
|
|
&loadedImageSources[i]->getTextureReference()) { |
|
|
|
bAssigned = true; |
|
|
|
break; |
|
|
|
} |
|
|
@ -162,8 +148,7 @@ void SurfaceManager::manageMemory() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void SurfaceManager::clear() |
|
|
|
{ |
|
|
|
void SurfaceManager::clear() { |
|
|
|
// delete all extra allocations from the heap
|
|
|
|
while (surfaces.size()) { |
|
|
|
delete surfaces.back(); |
|
|
@ -190,15 +175,13 @@ void SurfaceManager::clear() |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
void SurfaceManager::saveXmlSettings(string fileName) |
|
|
|
{ |
|
|
|
void SurfaceManager::saveXmlSettings(string fileName) { |
|
|
|
xmlSettings.clear(); |
|
|
|
|
|
|
|
// save surfaces
|
|
|
|
xmlSettings.addTag("surfaces"); |
|
|
|
xmlSettings.pushTag("surfaces"); |
|
|
|
for (int i = 0; i < surfaces.size(); i++) { |
|
|
|
|
|
|
|
xmlSettings.addTag("surface"); |
|
|
|
xmlSettings.pushTag("surface", i); |
|
|
|
BaseSurface* surface = surfaces[i]; |
|
|
@ -240,7 +223,6 @@ void SurfaceManager::saveXmlSettings(string fileName) |
|
|
|
// xmlSettings.addValue("source-path", "/root/etc/image.jpg");
|
|
|
|
xmlSettings.popTag(); // source
|
|
|
|
|
|
|
|
|
|
|
|
// xmlSettings.addTag("type");
|
|
|
|
// xmlSettings.pushTag("type");
|
|
|
|
// // surfaceType == SurfaceType::TRIANGLE_SURFACE
|
|
|
@ -255,10 +237,7 @@ void SurfaceManager::saveXmlSettings(string fileName) |
|
|
|
xmlSettings.save(fileName); |
|
|
|
} |
|
|
|
|
|
|
|
void SurfaceManager::loadXmlSettings(string fileName) |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
void SurfaceManager::loadXmlSettings(string fileName) { |
|
|
|
if (!xmlSettings.loadFile(fileName)) { |
|
|
|
ofLog(OF_LOG_WARNING, "Could not load XML settings."); |
|
|
|
return; |
|
|
@ -289,30 +268,31 @@ void SurfaceManager::loadXmlSettings(string fileName) |
|
|
|
// // attempt to load surface type
|
|
|
|
// ofLog(OF_LOG_WARNING, "Attempt to load surface type.");
|
|
|
|
// xmlSettings.pushTag("type");
|
|
|
|
// string surfaceType = xmlSettings.getValue("surface-type", "TRIANGLE_SURFACE");
|
|
|
|
// string surfaceType = xmlSettings.getValue("surface-type",
|
|
|
|
// "TRIANGLE_SURFACE");
|
|
|
|
// xmlSettings.popTag(); // type
|
|
|
|
|
|
|
|
|
|
|
|
xmlSettings.pushTag("vertices"); |
|
|
|
vector<ofVec2f> vertices; |
|
|
|
|
|
|
|
int vertexCount = xmlSettings.getNumTags("vertex"); |
|
|
|
|
|
|
|
|
|
|
|
// it's a triangle ?
|
|
|
|
if (vertexCount == 3) |
|
|
|
{ |
|
|
|
if (vertexCount == 3) { |
|
|
|
ofLog(OF_LOG_NOTICE, "create Triangle"); |
|
|
|
xmlSettings.pushTag("vertex", 0); |
|
|
|
vertices.push_back( ofVec2f( xmlSettings.getValue("x", 0.0f), xmlSettings.getValue("y", 0.0f) ) ); |
|
|
|
vertices.push_back(ofVec2f(xmlSettings.getValue("x", 0.0f), |
|
|
|
xmlSettings.getValue("y", 0.0f))); |
|
|
|
xmlSettings.popTag(); |
|
|
|
|
|
|
|
xmlSettings.pushTag("vertex", 1); |
|
|
|
vertices.push_back( ofVec2f( xmlSettings.getValue("x", 100.0f), xmlSettings.getValue("y", 0.0f) ) ); |
|
|
|
vertices.push_back(ofVec2f(xmlSettings.getValue("x", 100.0f), |
|
|
|
xmlSettings.getValue("y", 0.0f))); |
|
|
|
xmlSettings.popTag(); |
|
|
|
|
|
|
|
xmlSettings.pushTag("vertex", 2); |
|
|
|
vertices.push_back( ofVec2f( xmlSettings.getValue("x", 0.0f), xmlSettings.getValue("y", 100.0f) ) ); |
|
|
|
vertices.push_back(ofVec2f(xmlSettings.getValue("x", 0.0f), |
|
|
|
xmlSettings.getValue("y", 100.0f))); |
|
|
|
xmlSettings.popTag(); |
|
|
|
|
|
|
|
xmlSettings.popTag(); // vertices
|
|
|
@ -322,24 +302,27 @@ void SurfaceManager::loadXmlSettings(string fileName) |
|
|
|
vector<ofVec2f> texCoords; |
|
|
|
|
|
|
|
xmlSettings.pushTag("texCoord", 0); |
|
|
|
texCoords.push_back( ofVec2f( xmlSettings.getValue("x", 0.0f), xmlSettings.getValue("y", 0.0f) ) ); |
|
|
|
texCoords.push_back(ofVec2f(xmlSettings.getValue("x", 0.0f), |
|
|
|
xmlSettings.getValue("y", 0.0f))); |
|
|
|
xmlSettings.popTag(); |
|
|
|
|
|
|
|
xmlSettings.pushTag("texCoord", 1); |
|
|
|
texCoords.push_back( ofVec2f( xmlSettings.getValue("x", 1.0f), xmlSettings.getValue("y", 0.0f) ) ); |
|
|
|
texCoords.push_back(ofVec2f(xmlSettings.getValue("x", 1.0f), |
|
|
|
xmlSettings.getValue("y", 0.0f))); |
|
|
|
xmlSettings.popTag(); |
|
|
|
|
|
|
|
xmlSettings.pushTag("texCoord", 2); |
|
|
|
texCoords.push_back( ofVec2f( xmlSettings.getValue("x", 0.0f), xmlSettings.getValue("y", 1.0f) ) ); |
|
|
|
texCoords.push_back(ofVec2f(xmlSettings.getValue("x", 0.0f), |
|
|
|
xmlSettings.getValue("y", 1.0f))); |
|
|
|
xmlSettings.popTag(); |
|
|
|
|
|
|
|
xmlSettings.popTag(); // texCoords
|
|
|
|
|
|
|
|
|
|
|
|
// now we have variables sourceName and sourceTexture
|
|
|
|
// by checking those we can use one or another addSurface method
|
|
|
|
if (sourceName != "none" && sourceTexture != NULL) { |
|
|
|
addSurface(SurfaceType::TRIANGLE_SURFACE, sourceTexture, vertices, texCoords); |
|
|
|
addSurface(SurfaceType::TRIANGLE_SURFACE, sourceTexture, vertices, |
|
|
|
texCoords); |
|
|
|
} else { |
|
|
|
addSurface(SurfaceType::TRIANGLE_SURFACE, vertices, texCoords); |
|
|
|
} |
|
|
@ -349,19 +332,23 @@ void SurfaceManager::loadXmlSettings(string fileName) |
|
|
|
// if (surface-type == QUAD_SURFACE)
|
|
|
|
{ |
|
|
|
xmlSettings.pushTag("vertex", 0); |
|
|
|
vertices.push_back( ofVec2f( xmlSettings.getValue("x", 0.0f), xmlSettings.getValue("y", 0.0f) ) ); |
|
|
|
vertices.push_back(ofVec2f(xmlSettings.getValue("x", 0.0f), |
|
|
|
xmlSettings.getValue("y", 0.0f))); |
|
|
|
xmlSettings.popTag(); |
|
|
|
|
|
|
|
xmlSettings.pushTag("vertex", 1); |
|
|
|
vertices.push_back( ofVec2f( xmlSettings.getValue("x", 100.0f), xmlSettings.getValue("y", 0.0f) ) ); |
|
|
|
vertices.push_back(ofVec2f(xmlSettings.getValue("x", 100.0f), |
|
|
|
xmlSettings.getValue("y", 0.0f))); |
|
|
|
xmlSettings.popTag(); |
|
|
|
|
|
|
|
xmlSettings.pushTag("vertex", 2); |
|
|
|
vertices.push_back( ofVec2f( xmlSettings.getValue("x", 100.0f), xmlSettings.getValue("y", 100.0f) ) ); |
|
|
|
vertices.push_back(ofVec2f(xmlSettings.getValue("x", 100.0f), |
|
|
|
xmlSettings.getValue("y", 100.0f))); |
|
|
|
xmlSettings.popTag(); |
|
|
|
|
|
|
|
xmlSettings.pushTag("vertex", 3); |
|
|
|
vertices.push_back( ofVec2f( xmlSettings.getValue("x", 0.0f), xmlSettings.getValue("y", 100.0f) ) ); |
|
|
|
vertices.push_back(ofVec2f(xmlSettings.getValue("x", 0.0f), |
|
|
|
xmlSettings.getValue("y", 100.0f))); |
|
|
|
xmlSettings.popTag(); |
|
|
|
|
|
|
|
xmlSettings.popTag(); // vertices
|
|
|
@ -371,33 +358,35 @@ void SurfaceManager::loadXmlSettings(string fileName) |
|
|
|
vector<ofVec2f> texCoords; |
|
|
|
|
|
|
|
xmlSettings.pushTag("texCoord", 0); |
|
|
|
texCoords.push_back( ofVec2f( xmlSettings.getValue("x", 0.0f), xmlSettings.getValue("y", 0.0f) ) ); |
|
|
|
texCoords.push_back(ofVec2f(xmlSettings.getValue("x", 0.0f), |
|
|
|
xmlSettings.getValue("y", 0.0f))); |
|
|
|
xmlSettings.popTag(); |
|
|
|
|
|
|
|
xmlSettings.pushTag("texCoord", 1); |
|
|
|
texCoords.push_back( ofVec2f( xmlSettings.getValue("x", 1.0f), xmlSettings.getValue("y", 0.0f) ) ); |
|
|
|
texCoords.push_back(ofVec2f(xmlSettings.getValue("x", 1.0f), |
|
|
|
xmlSettings.getValue("y", 0.0f))); |
|
|
|
xmlSettings.popTag(); |
|
|
|
|
|
|
|
xmlSettings.pushTag("texCoord", 2); |
|
|
|
texCoords.push_back( ofVec2f( xmlSettings.getValue("x", 1.0f), xmlSettings.getValue("y", 1.0f) ) ); |
|
|
|
texCoords.push_back(ofVec2f(xmlSettings.getValue("x", 1.0f), |
|
|
|
xmlSettings.getValue("y", 1.0f))); |
|
|
|
xmlSettings.popTag(); |
|
|
|
|
|
|
|
xmlSettings.pushTag("texCoord", 3); |
|
|
|
texCoords.push_back( ofVec2f( xmlSettings.getValue("x", 0.0f), xmlSettings.getValue("y", 1.0f) ) ); |
|
|
|
texCoords.push_back(ofVec2f(xmlSettings.getValue("x", 0.0f), |
|
|
|
xmlSettings.getValue("y", 1.0f))); |
|
|
|
xmlSettings.popTag(); |
|
|
|
|
|
|
|
xmlSettings.popTag(); // texCoords
|
|
|
|
|
|
|
|
|
|
|
|
// now we have variables sourceName and sourceTexture
|
|
|
|
// by checking those we can use one or another addSurface method
|
|
|
|
if (sourceName != "none" && sourceTexture != NULL) { |
|
|
|
addSurface(SurfaceType::QUAD_SURFACE, sourceTexture, vertices, texCoords); |
|
|
|
addSurface(SurfaceType::QUAD_SURFACE, sourceTexture, vertices, |
|
|
|
texCoords); |
|
|
|
} else { |
|
|
|
addSurface(SurfaceType::QUAD_SURFACE, vertices, texCoords); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
xmlSettings.popTag(); // surface
|
|
|
@ -406,8 +395,7 @@ void SurfaceManager::loadXmlSettings(string fileName) |
|
|
|
xmlSettings.popTag(); // surfaces
|
|
|
|
} |
|
|
|
|
|
|
|
BaseSurface* SurfaceManager::selectSurface(int index) |
|
|
|
{ |
|
|
|
BaseSurface* SurfaceManager::selectSurface(int index) { |
|
|
|
if (index >= surfaces.size()) { |
|
|
|
throw std::runtime_error("Surface index out of bounds."); |
|
|
|
} |
|
|
@ -418,18 +406,11 @@ BaseSurface* SurfaceManager::selectSurface(int index) |
|
|
|
ofSendMessage("surfaceSelected"); |
|
|
|
} |
|
|
|
|
|
|
|
BaseSurface* SurfaceManager::getSelectedSurface() |
|
|
|
{ |
|
|
|
return selectedSurface; |
|
|
|
} |
|
|
|
BaseSurface* SurfaceManager::getSelectedSurface() { return selectedSurface; } |
|
|
|
|
|
|
|
void SurfaceManager::deselectSurface() |
|
|
|
{ |
|
|
|
selectedSurface = NULL; |
|
|
|
} |
|
|
|
void SurfaceManager::deselectSurface() { selectedSurface = NULL; } |
|
|
|
|
|
|
|
ofTexture* SurfaceManager::loadImageSource(string name, string path) |
|
|
|
{ |
|
|
|
ofTexture* SurfaceManager::loadImageSource(string name, string path) { |
|
|
|
// check if it is loaded
|
|
|
|
for (int i = 0; i < loadedImageSourceNames.size(); i++) { |
|
|
|
if (loadedImageSourceNames[i] == name) { |
|
|
@ -448,8 +429,7 @@ ofTexture* SurfaceManager::loadImageSource(string name, string path) |
|
|
|
return &image->getTextureReference(); |
|
|
|
} |
|
|
|
|
|
|
|
string SurfaceManager::getSelectedSurfaceSourceName() |
|
|
|
{ |
|
|
|
string SurfaceManager::getSelectedSurfaceSourceName() { |
|
|
|
if (selectedSurface == NULL) { |
|
|
|
return "none"; |
|
|
|
} |
|
|
@ -457,8 +437,7 @@ string SurfaceManager::getSelectedSurfaceSourceName() |
|
|
|
return getSurfaceSourceName(selectedSurface); |
|
|
|
} |
|
|
|
|
|
|
|
string SurfaceManager::getSurfaceSourceName(BaseSurface *surface) |
|
|
|
{ |
|
|
|
string SurfaceManager::getSurfaceSourceName(BaseSurface* surface) { |
|
|
|
ofTexture* tex = surface->getTexture(); |
|
|
|
for (int i = 0; i < loadedImageSources.size(); i++) { |
|
|
|
if (tex == &loadedImageSources[i]->getTextureReference()) { |
|
|
@ -469,8 +448,7 @@ string SurfaceManager::getSurfaceSourceName(BaseSurface *surface) |
|
|
|
return "none"; |
|
|
|
} |
|
|
|
|
|
|
|
BaseSurface* SurfaceManager::getSurface(int index) |
|
|
|
{ |
|
|
|
BaseSurface* SurfaceManager::getSurface(int index) { |
|
|
|
if (index >= surfaces.size()) { |
|
|
|
throw std::runtime_error("Surface index out of bounds."); |
|
|
|
return NULL; |
|
|
@ -479,10 +457,6 @@ BaseSurface* SurfaceManager::getSurface(int index) |
|
|
|
return surfaces[index]; |
|
|
|
} |
|
|
|
|
|
|
|
int SurfaceManager::size() |
|
|
|
{ |
|
|
|
return surfaces.size(); |
|
|
|
int SurfaceManager::size() { return surfaces.size(); } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|