include/material.h
branchpyrit
changeset 88 f7edb3b90816
parent 82 930a2d3ecaed
child 91 9d66d323c354
--- a/include/material.h	Sun Apr 27 22:55:17 2008 +0200
+++ b/include/material.h	Mon Apr 28 11:44:11 2008 +0200
@@ -29,6 +29,7 @@
 
 #include "common.h"
 #include "vector.h"
+#include "pixmap.h"
 
 /**
  * perlin noise
@@ -225,24 +226,6 @@
 };
 
 /**
- * pixmap for image texture
- */
-class Pixmap
-{
-	Colour *data;
-	int w,h;
-public:
-	Pixmap(): data(NULL), w(0), h(0) {};
-	Pixmap(Float *adata, int aw, int ah):
-		data((Colour*)(adata)), w(aw), h(ah) {};
-	void setData(Float *adata, int aw, int ah)
-		{ data = (Colour*)adata; w = aw; h = ah; };
-	Colour get(int x, int y) { return data[y*w + x]; };
-	int getWidth() { return w; };
-	int getHeight() { return h; };
-};
-
-/**
  * 2D image texture
  */
 class ImageTexture: public Texture2D