Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Decorator.hpp
00001 /* $Id$ */
00002 #ifndef _DECORATOR_HPP_
00003 #define _DECORATOR_HPP_
00004 
00005 namespace jafar {
00006   namespace image {
00007     class Image;
00008   }
00009   namespace viewer3d {
00015     class Decorator {
00016       public:
00017         struct Color
00018         {
00019           inline Color() : r(0.0), g(0.0), b(0.0), a(1.0) { }
00020           inline Color(double _r, double _g, double _b, double _a = 1.0) : r(_r), g(_g), b(_b), a(_a) { }
00021           double r, g, b, a;
00022         };
00023       public:
00024         Decorator();
00025         virtual ~Decorator();
00026         virtual Color colorFor( unsigned int id ) const;
00027         virtual bool hasTextureFor( unsigned int id ) const;
00028         virtual const image::Image* textureFor( unsigned int id ) const;
00029     };
00034     class RandomDecorator : public Decorator {
00035       public:
00036         RandomDecorator();
00037         virtual ~RandomDecorator();
00038         virtual Color colorFor( unsigned int id ) const;
00039       private:
00040         struct Private;
00041         Private* const d;
00042     };
00043     class PlainDecorator : public Decorator {
00044       public:
00045         PlainDecorator(double _r, double _g, double _b, double _a = 1.0);
00046         virtual ~PlainDecorator();
00047         virtual Color colorFor( unsigned int id ) const;
00048       private:
00049         struct Private;
00050         Private* const d;
00051     };
00052   }
00053 }
00054 
00055 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:29 for Jafar by doxygen 1.7.6.1
LAAS-CNRS