xsi_color.h Source File
 
 
 
xsi_color.h
Go to the documentation of this file.
00001 //*****************************************************************************
00011 //*****************************************************************************
00012 
00013 #if (_MSC_VER > 1000) || defined(SGI_COMPILER)
00014 #pragma once
00015 #endif
00016 
00017 #ifndef __XSI_COLOR_H__
00018 #define __XSI_COLOR_H__
00019 
00020 #include "sicppsdk.h"
00021 #include "xsi_status.h"
00022 
00023 namespace XSI {
00024 
00025 //*************************************************************************
00055 //*************************************************************************
00056 struct CColor
00057 {
00058         double r; 
00059         double g; 
00060         double b; 
00061         double a; 
00064         CColor() : r(0),g(0),b(0),a(0) {}
00065 
00069         CColor(const CColor& in_color) : r(in_color.r),g(in_color.g),
00070                 b(in_color.b),a(in_color.a) {}
00071 
00078         CColor(double in_rc, double in_gc, double in_bc, double in_ac) :
00079                 r(in_rc),g(in_gc),b(in_bc),a(in_ac) {}
00080 
00085         bool operator==(const CColor& in_color)const
00086         {
00087                 return (r == in_color.r) && (g == in_color.g) &&
00088                            (b == in_color.b) && (a == in_color.a);
00089         }
00090 
00095         bool operator!=(const CColor& in_color)const
00096         {
00097                 return !operator==(in_color);
00098         }
00099 };
00100 
00101 //*************************************************************************
00107 //*************************************************************************
00108 class SICPPSDKDECL CColorArray
00109 {
00110 public:
00114         CColorArray( LONG in_size=0);
00115 
00119         CColorArray(const CColorArray& in_array );
00120 
00122         ~CColorArray();
00123 
00128         CColorArray& operator=( const CColorArray& in_array );
00129 
00133         LONG GetCount() const;
00134 
00139         CStatus Add( const CColor& in_item );
00140 
00144         CStatus Clear();
00145 
00152         CStatus Resize( LONG in_size);
00153 
00160         const CColor& operator[]( LONG in_index ) const;
00161 
00167         CColor& operator[]( LONG in_index );
00168 
00174         bool operator==(const CColorArray& in_array) const;
00175 
00180         bool operator!=(const CColorArray& in_array) const;
00181 
00182 private:
00183         void* m_ptr;
00184 };
00185 
00186 
00187 };
00188 
00189 #endif //__XSI_COLOR_H__