ColorRamp.h
上传用户:hcfgz168
上传日期:2011-09-11
资源大小:116k
文件大小:1k
源码类别:

OpenGL

开发平台:

WINDOWS

  1. //********************************************
  2. // ColorRamp.h
  3. //********************************************
  4. // pierre.alliez@cnet.francetelecom.fr
  5. // Created : 19/05/98
  6. // Modified : 19/05/98
  7. //********************************************
  8. #ifndef _COLOR_RAMP_
  9. #define _COLOR_RAMP_
  10. // Datas : 
  11. // Red Green Blue IsNode (0/1)
  12. class CColorRamp
  13. {
  14. private :
  15. unsigned char m_Color[4][256];
  16. unsigned char m_Node[256];
  17. int  m_Size;
  18. int  m_NbNode;
  19. public :
  20. // Constructor
  21. CColorRamp();
  22. ~CColorRamp();
  23. // Datas
  24. int GetSize() { return m_Size; }
  25. unsigned char Red(unsigned char index) { return m_Color[0][index]; }
  26. unsigned char Green(unsigned char index) { return m_Color[1][index]; }
  27. unsigned char Blue(unsigned char index) { return m_Color[2][index]; }
  28. // Misc
  29. int Build();
  30. void BuildDefault();
  31. int BuildNodes();
  32. void ResetNodes();
  33. void Trace();
  34. void BuildRainbow();
  35. };
  36. #endif // _COLOR_RAMP_