+/*
+ //Was used for debugging, obsolete function
+ DPatch* DPatch::TransposePatch(DPatch *p1)
+ {
+ globalOutputStream() << "Source patch ";
+ p1->DebugPrint();
+ p1->Transpose();
+ globalOutputStream() << "Transposed";
+ p1->DebugPrint();
+
+ DPatch* newPatch = new DPatch();
+ newPatch->height = p1->height;
+ newPatch->width = p1->width;
+ newPatch->SetTexture(p1->texture);
+
+ for(int x = 0; x < p1->height; x++)
+ {
+ for(int y = 0; y < p1->width; y++)
+ {
+ newPatch->points[x][y] = p1->points[x][y];
+ }
+ }
+ return newPatch;
+ }
+
+ //Function to figure out what is actually going wrong.
+ void DPatch::DebugPrint()
+ {
+ globalOutputStream() << "width: " << width << "\theight: " << height << "\n";
+ for(int x = 0; x < height; x++)
+ {
+ for(int y = 0; y < width; y++)
+ {
+ globalOutputStream() << "\t(" << points[x][y].xyz[0] << " " << points[x][y].xyz[1] << " " << points[x][y].xyz[2] << ")\t";
+ }
+ globalOutputStream() << "\n";
+ }
+ }
+ */