Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vuColourSpec.h

Go to the documentation of this file.
00001 #ifndef _VUCOLOURSPEC_H_
00002 #define  _VUCOLOURSPEC_H_
00003 
00004 #include "vuColour.h"
00005 
00006 static float CXFSPECtoRGB[3][3] = {
00007   {-4.6760940e-01,   1.0060528e+01,   1.1281898e+00},
00008   {-5.9800888e-01,   1.1977012e+01,  -6.7873892e-01},
00009   { 1.4143822e+01,  -2.1922645e+00,  -1.1837713e+00}
00010 };
00011 
00012 static float CXF31toSPEC[3][31] = {
00013   { 0.0541431830, 0.0696043380, 0.0829170700, 0.0812685130, 0.0779988200, 0.0754269200,
00014     0.0686281460, 0.0626345010, 0.0567715030, 0.0516375260, 0.0468861630, 0.0412096450,
00015     0.0352371240, 0.0292843220, 0.0237363350, 0.0190178730, 0.0153168740, 0.0121851310,
00016     0.0091389738, 0.0059823567, 0.0030550486, 0.0010715114, 0.0000000000, 0.0000000000,
00017     0.0011662298, 0.0028120398, 0.0041195874, 0.0059418486, 0.0095421422, 0.0177941700,
00018     0.0354721050},
00019   { 0.0045373550, 0.0038672286, 0.0045760626, 0.0083305753, 0.0084972093, 0.0069630723,
00020     0.0132399280, 0.0199838480, 0.0264692940, 0.0323835440, 0.0376300620, 0.0430715800,
00021     0.0478926310, 0.0522457800, 0.0565191060, 0.0609287620, 0.0647395090, 0.0676024980,
00022     0.0685679850, 0.0683325430, 0.0680913760, 0.0661959880, 0.0601914540, 0.0489260240,
00023     0.0332863660, 0.0177013260, 0.0067872261, 0.0016522580, 0.0003958713, 0.0003935389,
00024     0.0000000000},
00025   { 0.0067372441, 0.0038336965, 0.0013962379, 0.0023528823, 0.0021141319, 0.0005430682,
00026     0.0005084253, 0.0003048210, 0.0000000000, 0.0000405677, 0.0004394436, 0.0014394717,
00027     0.0028841940, 0.0047926311, 0.0067491122, 0.0084706897, 0.0101763450, 0.0127504460,
00028     0.0169259910, 0.0223156120, 0.0278259060, 0.0343945960, 0.0440122970, 0.0577456230,
00029     0.0747252390, 0.0914706190, 0.1044597200, 0.1122024000, 0.1161866000, 0.1172151600,
00030     0.1149868300}
00031 };
00032 
00033 
00034 class vuColourRGBa;
00035 class vuColour31a;
00036 
00041 class vuColourSpecial : public vuColour<4>
00042 {
00043  public:
00045   vuColourSpecial() : vuColour<4>() {};
00047   vuColourSpecial(const vuColourSpecial& inst) : vuColour<4>(inst) {};
00049   vuColourSpecial(const vuColour<4>& inst) : vuColour<4>(inst) {};
00052   vuColourSpecial(const float *f) : vuColour<4>(f) {};
00055   vuColourSpecial(const float f) : vuColour<4>(f) {};
00056 
00059   vuColourSpecial(const vuColour31a& inst) { from(inst); };
00060 
00062   void from(const vuColourRGBa& rgba)
00063     {
00064       fromColourN((vuColour<4>&)rgba, (float*)CXFRGBtoXYZ);
00065     };
00066 
00068   void From(const vuColour31a& c31a)
00069     {
00070       fromColourN((vuColour<32>&)c31a, (float*)CXF31toSPEC);
00071     };
00072 
00074   void to(vuColourRGBa& rgba) const
00075     {
00076       toColourN((vuColour<4>&)rgba, (float*)CXFSPECtoRGB);
00077     };
00078 };
00079 
00080 #endif

Generated on Wed Dec 15 21:20:33 2004 for vuVolume by  doxygen 1.3.9.1