#include "color.h"
#include "common.h"
#include "light.h"
+#include "model.h"
#include "tri.h"
void raster_printstats(raster_t* p);
+/*
+ * Get the color value at a particular point.
+ */
+color_t raster_color(const raster_t* p, vec_t pt);
+
+
/*
* Set the viewport rectangle. This effectively sets up a clipping rectangle
* where nothing is drawn outside of the rectangle. The default viewport is
*/
void raster_eye(raster_t* p, vec_t eye);
+/*
+ * Set the ambient light for the scene.
+ */
+void raster_ambient(raster_t* p, color_t ambient);
+
/*
* Add a light to the scene.
*/
void raster_light(raster_t* p, light_t light);
+/*
+ * Set the material properties for the scene.
+ */
+void raster_material(raster_t* p, color_t specular, scal_t shininess);
+
/*
* Save the raster to a PPM file.
int raster_export_bmp(const raster_t* p, const char* filename);
+/*
+ * Load the raster from an image file. The file extension is used to
+ * determine which importer is actually called.
+ */
+raster_t* raster_import(const char* filename);
+
+/*
+ * Load the raster from a PPM file.
+ */
+raster_t* raster_import_ppm(const char* filename);
+
+/*
+ * Load the raster from a BMP file.
+ */
+raster_t* raster_import_bmp(const char* filename);
+
+
/*
* Fill the entire raster with a solid color and reset the raster statistics.
*/
void raster_clear(raster_t* p, color_t fill);
/*
- * Draw a smooth gradient triangle to the raster.
+ * Draw a model to the raster.
+ */
+void raster_draw_model(raster_t* p, const model_t* model);
+
+/*
+ * Draw a triangle to the raster.
*/
void raster_draw_tri(raster_t* p, const tri_t* triangle);