xsi_vertexcolor.h Source File
 
 
 
xsi_vertexcolor.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_VERTEXCOLOR_H__
00018 #define __XSI_VERTEXCOLOR_H__
00019 
00020 #include "sicppsdk.h"
00021 #include "xsi_status.h"
00022 
00023 namespace XSI {
00024 
00025 //*************************************************************************
00033 //*************************************************************************
00034 struct CVertexColor
00035 {
00036         unsigned char r; 
00037         unsigned char g; 
00038         unsigned char b; 
00039         unsigned char a; 
00042         CVertexColor() : r(0),g(0),b(0),a(0) {}
00043 
00047         CVertexColor(const CVertexColor& in_color) : r(in_color.r),
00048                 g(in_color.g), b(in_color.b),a(in_color.a) {}
00049 
00056         CVertexColor(unsigned char in_rc, unsigned char in_gc,
00057                 unsigned char in_bc, unsigned char in_ac) : r(in_rc),g(in_gc),
00058                         b(in_bc),a(in_ac) {}
00059 
00064         bool operator==(const CVertexColor& in_vertexcolor)const
00065         {
00066                 return (r == in_vertexcolor.r) && (g == in_vertexcolor.g) &&
00067                            (b == in_vertexcolor.b) && (a == in_vertexcolor.a);
00068         }
00069 
00074         bool operator!=(const CVertexColor& in_vertexcolor)const
00075         {
00076                 return ! operator==(in_vertexcolor);
00077         }
00078 };
00079 
00080 
00081 //*************************************************************************
00091 //*************************************************************************
00092 class SICPPSDKDECL CVertexColorArray
00093 {
00094 public:
00098         CVertexColorArray( LONG in_size=0);
00099 
00103         CVertexColorArray(const CVertexColorArray& in_array );
00104 
00106         ~CVertexColorArray();
00107 
00112         CVertexColorArray& operator=( const CVertexColorArray& in_array );
00113 
00117         LONG GetCount() const;
00118 
00123         CStatus Add( const CVertexColor& in_item );
00124 
00128         CStatus Clear();
00129 
00135         CStatus Resize( LONG in_size);
00136 
00143         const CVertexColor& operator[]( LONG in_index ) const;
00144 
00150         CVertexColor& operator[](LONG in_index );
00151 
00157         bool operator==(const CVertexColorArray& in_array) const;
00158 
00164         bool operator!=(const CVertexColorArray& in_array) const;
00165 
00166 private:
00167         void* m_ptr;
00168 };
00169 
00170 
00171 };
00172 
00173 #endif //__XSI_COLOR_H__