TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/host/attribute/ParamRGB.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_HOST_CORE_ATTRIBUTE_PARAMRGB_HPP_
00002 #define _TUTTLE_HOST_CORE_ATTRIBUTE_PARAMRGB_HPP_
00003 
00004 #include "Param.hpp"
00005 
00006 #include "ParamDoubleMultiDim.hpp"
00007 
00008 #include <ofxPixels.h>
00009 
00010 namespace tuttle {
00011 namespace host {
00012 namespace attribute {
00013 
00014 class ParamRGB : public Param
00015         , public ParamDoubleMultiDim<3>
00016 {
00017 public:
00018         ParamRGB( INode& effect, const std::string& name, const ofx::attribute::OfxhParamDescriptor& descriptor );
00019         ParamRGB* clone() const { return new ParamRGB( *this ); }
00020 
00021         OfxRGBColourD getDefault() const;
00022         void          getValue( double& r, double& g, double& b ) const OFX_EXCEPTION_SPEC;
00023         void          getValueAtTime( const OfxTime time, double& r, double& g, double& b ) const OFX_EXCEPTION_SPEC;
00024         void          setValue( const double& r, const double& g, const double& b, const ofx::attribute::EChange change ) OFX_EXCEPTION_SPEC;
00025         void          setValueAtTime( const OfxTime time, const double& r, const double& g, const double& b, const ofx::attribute::EChange change ) OFX_EXCEPTION_SPEC;
00026         
00027         void setValue( const int& r, const int& g, const int& b, const ofx::attribute::EChange change ) OFX_EXCEPTION_SPEC
00028         {
00029                 setValue( (double)r, (double)g, (double)b, change );
00030         }
00031         void setValueAtTime( const OfxTime time, const int& r, const int& g, const int& b, const ofx::attribute::EChange change ) OFX_EXCEPTION_SPEC
00032         {
00033                 setValueAtTime( time, (double)r, (double)g, (double)b, change );
00034         }
00035 };
00036 
00037 }
00038 }
00039 }
00040 
00041 #endif