• Main Page
  • Classes
  • Files
  • File List

T:/Eigene Dateien/Visual Studio 2008/Projects/VisLuFramework/src/BasicObjects.cpp

00001 #include "BasicObjects.h"
00002 
00003 #include "Colours.h"
00004 
00005 using namespace Colours;
00006 
00007 
00008 
00009 Lab_Colour::Lab_Colour(GLubyte R, GLubyte G, GLubyte B)
00010 {
00011         float X = toX(R,G,B);
00012         float Y = toY(R,G,B);
00013         float Z = toZ(R,G,B);
00014 
00015         L = toL(Y);
00016         a = toA(X, Y);
00017         b = toB(Y, Z);
00018 }
00019 
00020 
00021 void RGBA_Colour::setColour(RGB_Colour col, GLubyte alpha)
00022 {
00023         r = col.r;
00024         g = col.g;
00025         b = col.b;
00026         a = alpha;
00027 }
00028 
00029 void RGBA_Colour::setColour(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
00030 {
00031         r = red;
00032         g = green;
00033         b = blue;
00034         a = alpha;
00035 }
00036 
00037 void RGBA_Colour::setColour(int red, int green, int blue, int alpha)
00038 {
00039         r = (GLubyte)red;
00040         g = (GLubyte)green;
00041         b = (GLubyte)blue;
00042         a = (GLubyte)alpha;
00043 }
00044 

Generated on Tue Dec 14 2010 03:52:55 for VolVis by  doxygen 1.7.2