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_ulSize, CICEAttributeDataArray<T>& out_dataArray )
00421     {
00422         return ResizeSubDataArray( in_index, in_ulSize, (CBaseICEAttributeDataArray&)out_dataArray );
00423     }
00424 private:
00425     static SICPPSDK_INLINE XSI::siICENodeDataType GetDefaultType( )
00426     {
00427         return siICENodeDataCustomType;
00428     }
00429 };
00430 
00431 //*****************************************************************************
00472 //*****************************************************************************
00473 
00474 class CICEAttributeDataArray2DCustomType : public CBaseICEAttributeDataArray
00475 {
00476 public:
00478     CICEAttributeDataArray2DCustomType( ) : CBaseICEAttributeDataArray( GetDefaultType( ), XSI::siICENodeStructureArray ) {}
00479 
00481     ~CICEAttributeDataArray2DCustomType( )
00482     {
00483         SetParent( NULL );
00484     }
00485 
00493     CStatus GetSubArray( ULONG in_index, CBaseICEAttributeDataArray& out_dataArray ) const
00494     {
00495         return GetSubDataArray( in_index, out_dataArray );
00496     }
00497 
00498 private:
00499     static SICPPSDK_INLINE XSI::siICENodeDataType GetDefaultType( )
00500     {
00501         return XSI::siICENodeDataCustomType;
00502     }
00503 };
00504 
00505 //*****************************************************************************
00547 //*****************************************************************************
00548 
00549 class CICEAttributeDataArray2DString : public CBaseICEAttributeDataArray
00550 {
00551 public:
00553     CICEAttributeDataArray2DString( ) : CBaseICEAttributeDataArray( GetDefaultType( ), XSI::siICENodeStructureArray ) {}
00554 
00556     ~CICEAttributeDataArray2DString( )
00557     {
00558         SetParent( NULL );
00559     }
00560 
00568     CStatus GetSubArray( ULONG in_index, CBaseICEAttributeDataArray& out_dataArray ) const
00569     {
00570         return GetSubDataArray( in_index, out_dataArray );
00571     }
00572 
00582     CStatus ResizeSubArray( ULONG in_index, ULONG in_ulSize, CBaseICEAttributeDataArray& out_dataArray )
00583     {
00584         return ResizeSubDataArray( in_index, in_ulSize, out_dataArray );
00585     }
00586 
00587 
00588 private:
00589     static SICPPSDK_INLINE XSI::siICENodeDataType GetDefaultType( )
00590     {
00591         return XSI::siICENodeDataString;
00592     }
00593 };
00594 
00672 typedef XSI::CICEAttributeDataArray2D< float > CICEAttributeDataArray2DFloat;
00673 typedef XSI::CICEAttributeDataArray2D< LONG > CICEAttributeDataArray2DLong;
00674 typedef XSI::CICEAttributeDataArray2D< bool > CICEAttributeDataArray2DBool;
00675 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CVector2f > CICEAttributeDataArray2DVector2f;
00676 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CVector3f > CICEAttributeDataArray2DVector3f;
00677 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CVector4f > CICEAttributeDataArray2DVector4f;
00678 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CQuaternionf > CICEAttributeDataArray2DQuaternionf;
00679 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CRotationf > CICEAttributeDataArray2DRotationf;
00680 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CMatrix3f > CICEAttributeDataArray2DMatrix3f;
00681 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CMatrix4f > CICEAttributeDataArray2DMatrix4f;
00682 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CColor4f > CICEAttributeDataArray2DColor4f;
00683 typedef XSI::CICEAttributeDataArray2D< XSI::MATH::CShape > CICEAttributeDataArray2DShape;
00684 
00685 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DBool::GetDefaultType( ){return siICENodeDataBool;}
00686 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DFloat::GetDefaultType( ){return siICENodeDataFloat;}
00687 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DLong::GetDefaultType( ){return siICENodeDataLong;}
00688 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DVector2f::GetDefaultType( ){return siICENodeDataVector2;}
00689 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DVector3f::GetDefaultType( ){return siICENodeDataVector3;}
00690 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DVector4f::GetDefaultType( ){return siICENodeDataVector4;}
00691 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DQuaternionf::GetDefaultType( ){return siICENodeDataQuaternion;}
00692 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DMatrix3f::GetDefaultType( ){return siICENodeDataMatrix33;}
00693 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DMatrix4f::GetDefaultType( ){return siICENodeDataMatrix44;}
00694 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DColor4f::GetDefaultType( ){return siICENodeDataColor4;}
00695 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DRotationf::GetDefaultType( ){return siICENodeDataRotation;}
00696 template<> SICPPSDK_INLINE XSI::siICENodeDataType CICEAttributeDataArray2DShape::GetDefaultType( ){return siICENodeDataShape;}
00697 
00698 };
00699 
00700 #endif // __XSIICEATTRIBUTEDATAARRAY2D_H__