xsi_iceattributedataarray2D.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 __XSIICEATTRIBUTEDATAARRAY2D_H__
00018 #define __XSIICEATTRIBUTEDATAARRAY2D_H__
00019 
00020 #include <sicppsdk.h>
00021 #include <xsi_iceattributedataarray.h>
00022 #include <xsi_vector2f.h>
00023 #include <xsi_vector3f.h>
00024 #include <xsi_vector4f.h>
00025 #include <xsi_quaternionf.h>
00026 #include <xsi_rotationf.h>
00027 #include <xsi_matrix3f.h>
00028 #include <xsi_matrix4f.h>
00029 #include <xsi_color4f.h>
00030 
00031 namespace XSI {
00032 
00033 class ICEAttribute;
00034 
00035 //*****************************************************************************
00388 //*****************************************************************************
00389 template<class T>
00390 class CICEAttributeDataArray2D : public CBaseICEAttributeDataArray
00391 {
00392 public:
00394     CICEAttributeDataArray2D( ) : CBaseICEAttributeDataArray( GetDefaultType( ), XSI::siICENodeStructureArray ) {}
00395 
00397     ~CICEAttributeDataArray2D( ) {}
00398 
00406     CStatus GetSubArray( ULONG in_index, CICEAttributeDataArray<T>& out_dataArray ) const
00407     {
00408         return GetSubDataArray( in_index, (CBaseICEAttributeDataArray&)out_dataArray );
00409     }
00410 
00420     CStatus ResizeSubArray( ULONG in_index, ULONG in_size, CICEAttributeDataArray<T>& out_dataArray )
00421     {
00422         return ResizeSubDataArray( *this, in_index, in_size, (CBaseICEAttributeDataArray&)out_dataArray );
00423     }
00424 
00434     CStatus SetSubArray( ULONG in_index, const T* in_pArray, ULONG in_count );
00435 
00517     CStatus SetArray2D( const T** in_ppArray, ULONG in_nbSubArrays, ULONG* in_pSubArraySizes );
00518 
00519 private:
00520     static SICPPSDK_INLINE XSI::siICENodeDataType GetDefaultType( )
00521     {
00522         return siICENodeDataCustomType;
00523     }
00524 };
00525 
00526 //*****************************************************************************
00567 //*****************************************************************************
00568 
00569 class SICPPSDKDECL CICEAttributeDataArray2DCustomType : public CBaseICEAttributeDataArray
00570 {
00571 public:
00573     CICEAttributeDataArray2DCustomType( ) : CBaseICEAttributeDataArray( GetDefaultType( ), XSI::siICENodeStructureArray ) {}
00574 
00576     ~CICEAttributeDataArray2DCustomType( )
00577     {
00578         SetParent( NULL );
00579     }
00580 
00588     CStatus GetSubArray( ULONG in_index, CBaseICEAttributeDataArray& out_dataArray ) const
00589     {
00590         return GetSubDataArray( in_index, out_dataArray );
00591     }
00592 
00604     CStatus SetSubArray( ULONG in_index, const unsigned char** in_ppData, ULONG in_count, ULONG* in_pElemSizes );
00605     
00617     CStatus SetSubArray( ULONG in_index, const unsigned char** in_ppData, ULONG in_count, ULONG in_fixedElemSize );
00618 
00619 private:
00620     static SICPPSDK_INLINE XSI::siICENodeDataType GetDefaultType( )
00621     {
00622         return XSI::siICENodeDataCustomType;
00623     }
00624 };
00625 
00626 //*****************************************************************************
00668 //*****************************************************************************
00669 
00670 class SICPPSDKDECL CICEAttributeDataArray2DString : public CBaseICEAttributeDataArray
00671 {
00672 public:
00674     CICEAttributeDataArray2DString( ) : CBaseICEAttributeDataArray( GetDefaultType( ), XSI::siICENodeStructureArray ) {}
00675 
00677     ~CICEAttributeDataArray2DString( )
00678     {
00679         SetParent( NULL );
00680     }
00681 
00689     CStatus GetSubArray( ULONG in_index, CBaseICEAttributeDataArray& out_dataArray ) const
00690     {
00691         return GetSubDataArray( in_index, out_dataArray );
00692     }
00693 
00703     CStatus ResizeSubArray( ULONG in_index, ULONG in_size, CBaseICEAttributeDataArray& out_dataArray )
00704     {
00705         return ResizeSubDataArray( *this, in_index, in_size, out_dataArray );
00706     }
00707 
00708 
00823     CStatus SetSubArray( ULONG in_index, const wchar_t** in_ppData, ULONG in_count );
00824 
00825 private:
00826     static SICPPSDK_INLINE XSI::siICENodeDataType GetDefaultType( )
00827     {
00828         return XSI::siICENodeDataString;
00829     }
00830 };
00831 
00909 typedef XSI::CICEAttributeDataArray2D< float > CICEAttributeDataArray2DFloat;
00910 typedef XSI::CICEAttributeDataArray2D< LONG > CICEAttributeDataArray2DLong;
00911 typedef XSI::CICEAttributeDataArray2D< bool > CICEAttributeDataArray2DBool;
00912 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CVector2f > CICEAttributeDataArray2DVector2f;
00913 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CVector3f > CICEAttributeDataArray2DVector3f;
00914 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CVector4f > CICEAttributeDataArray2DVector4f;
00915 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CQuaternionf > CICEAttributeDataArray2DQuaternionf;
00916 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CRotationf > CICEAttributeDataArray2DRotationf;
00917 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CMatrix3f > CICEAttributeDataArray2DMatrix3f;
00918 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CMatrix4f > CICEAttributeDataArray2DMatrix4f;
00919 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CColor4f > CICEAttributeDataArray2DColor4f;
00920 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CShape > CICEAttributeDataArray2DShape;
00921 
00922 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DFloat::GetDefaultType( ){return siICENodeDataFloat;}
00923 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DLong::GetDefaultType( ){return siICENodeDataLong;}
00924 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DBool::GetDefaultType( ){return siICENodeDataBool;}
00925 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DVector2f::GetDefaultType( ){return siICENodeDataVector2;}
00926 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DVector3f::GetDefaultType( ){return siICENodeDataVector3;}
00927 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DVector4f::GetDefaultType( ){return siICENodeDataVector4;}
00928 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DQuaternionf::GetDefaultType( ){return siICENodeDataQuaternion;}
00929 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DMatrix3f::GetDefaultType( ){return siICENodeDataMatrix33;}
00930 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DMatrix4f::GetDefaultType( ){return siICENodeDataMatrix44;}
00931 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DColor4f::GetDefaultType( ){return siICENodeDataColor4;}
00932 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DRotationf::GetDefaultType( ){return siICENodeDataRotation;}
00933 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DShape::GetDefaultType( ){return siICENodeDataShape;}
00934 };
00935 
00936 #endif // __XSIICEATTRIBUTEDATAARRAY2D_H__