////////////////////////////////////////////////////////////////////////// // // // object.h // // // Michael Boland // 2 September 1995 // // ////////////////////////////////////////////////////////////////////////// #ifndef OBJECT_H #define OBJECT_H #define MAX_COLORS 5 #include "list.h" struct Pixel { int x, y, z ; int intensity[MAX_COLORS + 1] ; } ; struct COM { float x, y, z ; } ; // // Class Object // class Object { private: friend class Cell ; List>>>>pixels ; int obj_num_pixels ; double obj_intensity[MAX_COLORS + 1] ; int obj_num_colors ; public: Object() ; Object(int num_colors) ; ~Object() ; int object_add_pixel(int x, int y, int z, int intensity[]) ; int object_number_pixels() ; int object_number_colors() ; int object_set_num_colors(int num_colors) ; double object_color_intensity(int color) ; Pixel* object_pixel_array() ; } ; inline int Object::object_number_pixels() { return(obj_num_pixels) ; } inline int Object::object_number_colors() { return(obj_num_colors) ; } inline int Object::object_set_num_colors(int num_colors) { return(obj_num_colors = num_colors) ; } inline double Object::object_color_intensity(int color) { return(obj_intensity[color]) ; } #endif
>>