00001 /**************************************************************************************** 00002 THIS CODE IS PUBLISHED AS A SAMPLE ONLY AND IS PROVIDED "AS IS". 00003 IN NO EVENT SHALL SOFTIMAGE, AVID TECHNOLOGY, INC. AND/OR THEIR RESPECTIVE 00004 SUPPLIERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 00005 DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 00006 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 00007 CONNECTION WITH THE USE OR PERFORMANCE OF THIS CODE . 00008 00009 COPYRIGHT NOTICE. Copyright © 1999-2002 Avid Technology Inc. . All rights reserved. 00010 00011 SOFTIMAGE is a registered trademark of Avid Technology Inc. or its subsidiaries 00012 or divisions. Windows NT is a registered trademark of Microsoft Corp. All other 00013 trademarks contained herein are the property of their respective owners. 00014 ****************************************************************************************/ 00015 /******************************************************************************\ 00016 * 00017 * File: TriangleStrip.h 00018 * Creation date: January 15, 2002 00019 * Purpose: Declaration of class 'CSLTriangleStrip' 00020 * 00021 \******************************************************************************/ 00022 #ifndef _TRIANGLESTRIP_H 00023 #define _TRIANGLESTRIP_H 00024 00025 #include "Template.h" 00026 00027 class CSLTriangleStripList; 00028 00029 #ifndef _SL_INT_ARRAY_PROXY_EXPORT_ 00030 #define _SL_INT_ARRAY_PROXY_EXPORT_ 00031 #endif 00032 00046 class XSIEXPORT CSLTriangleStrip 00047 : public CSLTemplate 00048 { 00049 public: 00053 typedef CSLArrayProxy<SI_Int, SI_Int, 1> CSLIntArray; 00054 00055 CSLTriangleStrip(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate, CSLTriangleStripList* in_pTriStripList); 00056 virtual ~CSLTriangleStrip(); 00057 00061 SI_Int GetVertexCount () { return m_VertexIndices.GetUsed(); } 00062 00066 CSLIntArray* GetVertexIndices() { return &m_VertexIndices; } 00067 00071 SI_Int* GetVertexIndicesPtr() { return m_VertexIndices.ArrayPtr(); } 00072 00076 CSLIntArray* CreateNormalIndices(); 00077 00081 CSLIntArray* GetNormalIndices() { return m_NormalIndices; } 00082 00086 SI_Int* GetNormalIndicesPtr(); 00087 00091 SI_Error DestroyNormalIndices(); 00092 00096 CSLIntArray* CreateColorIndices(); 00097 00101 CSLIntArray* GetColorIndices() { return m_ColorIndices; } 00102 00106 SI_Int* GetColorIndicesPtr(); 00107 00111 SI_Error DestroyColorIndices(); 00112 00116 CSLIntArray* AddUVArray(); 00117 00121 CSLIntArray* GetUVIndices(SI_Int in_nId); 00122 00127 SI_Int* GetUVIndicesPtr(SI_Int in_nId); 00128 00133 SI_Error RemoveUVArray(); 00134 00138 SI_Error ClearUVArrays(); 00139 00143 SI_Int GetUVArrayCount(); 00144 00145 virtual ETemplateType Type() { return SI_TRIANGLE_STRIP; } 00146 virtual SI_Error Synchronize(); 00147 00148 private: 00149 CSLIntArray m_VertexIndices; 00150 00151 CSLIntArray* m_NormalIndices; 00152 CSIBCArray<CSLIntArray* > m_UVIndices; 00153 CSLIntArray* m_ColorIndices; 00154 00155 SI_Bool m_bSingleUV; 00156 SI_Int m_iArrayCount; 00157 00158 void *m_pReserved; // reserved for future extension 00159 }; 00160 00161 #endif