00001 // vim:set ts=4 sw=4 noet cin: 00002 00003 #ifndef ARENDER_H_ 00004 #define ARENDER_H_ 00005 00006 #include <vector> 00007 00008 #include "Color.h" 00009 #include "Size.h" 00010 00011 class TransferFunc; 00012 00021 class ARender { 00022 public: 00023 virtual ~ARender() {} 00024 00028 virtual Color getPixelColor(unsigned int x, unsigned int y) = 0; 00029 00034 virtual Size getImageSize() const = 0; 00035 00041 virtual void render(unsigned char* buffer) = 0; 00042 00046 void addTransferFunction(TransferFunc* aFunc); 00047 00051 void removeTransferFunction(TransferFunc* aFunc); 00052 00060 void transferFunctionsChanged(TransferFunc* aFunc); 00061 00062 protected: 00070 Color applyTransferFunctions(unsigned short aDataValue) const; 00071 00072 private: 00073 std::vector<TransferFunc*> mFunctions; 00074 }; 00075 00076 00077 #endif