]> Dogcows Code - chaz/rasterize/blobdiff - model.h
add opengl support
[chaz/rasterize] / model.h
diff --git a/model.h b/model.h
index b2b3eb48cde55113ebf948261933f3ccb5d8750b..8f05c7aff37281fda39016346fafdda5270010ce 100644 (file)
--- a/model.h
+++ b/model.h
@@ -8,15 +8,19 @@
 #ifndef _MODEL_H_
 #define _MODEL_H_
 
+#include "array.h"
 #include "color.h"
 #include "common.h"
-#include "list.h"
 #include "mat.h"
+#include "tri.h"
 
 
 #define MODEL_TYPE_RAW (1)
 #define MODEL_TYPE_OBJ (2)
 
+// create an interface for a vector array
+DEFINE_ARRAY_TYPE(tri);
+
 
 /*
  * A model is a group of geometry and its attributes.
@@ -43,9 +47,9 @@ void model_destroy(model_t* m);
 
 
 /*
- * Get the model's geometry as a list of triangles.
+ * Get the model's geometry as an array of triangles.
  */
-const list_t* model_geometry(const model_t* m);
+const array_t* model_geometry(const model_t* m);
 
 /*
  * Get the number of triangles that make up the model.
@@ -78,6 +82,12 @@ void model_transformation(const model_t* m, mat_t* transform);
  */
 color_t model_tcolor(const model_t* m, vec_t pt);
 
+/*
+ * Get a copy of the raw texture data.  It must be freed when not needed.
+ * Returns NULL if the model has no texture.
+ */
+void* model_tdata(const model_t* m, int* width, int* height);
+
 
 /*
  * Post-multiply a transformation matrix to the internal matrix representing
This page took 0.018995 seconds and 4 git commands to generate.