incorporate drawable and annotations
[mussa.git] / alg / color.hpp
index 78b13cf99db4c5b671f19667de3b6a23c98bef29..0c4f3c76759c0c07f1580dcb868ac7f08925a65c 100644 (file)
@@ -1,12 +1,17 @@
 #ifndef _GLCOLOR_H_
 #define _GLCOLOR_H_
 
+#include <boost/shared_ptr.hpp>
+
 #include <boost/serialization/export.hpp>
 #include <boost/serialization/nvp.hpp>
 #include <boost/serialization/version.hpp>
 
 #include <ostream>
 
+class Color;
+typedef boost::shared_ptr<Color> ColorRef;
+
 //! convienece class for handling opengl colors
 class Color
 {
@@ -14,10 +19,11 @@ public:
   Color();
   Color(const Color &);
   //! initialize with red, green, blue, alpha
-  Color(float r, float g, float b, float a=0.0);
+  Color(float r, float g, float b, float a=1.0);
+  Color(const ColorRef);
 
   //! set all channels simultaneously 
-  void set(float r, float g, float b, float a=0.0);
+  void set(float r, float g, float b, float a=1.0);
   //! return an array of 4 colors (stored by class)
   const float* const get() const;
   void setR(float);
@@ -47,6 +53,5 @@ private:
   }
 };
 BOOST_CLASS_EXPORT(Color)
-
 #endif