FBX SDK Reference Guide: kfbxnodefinderduplicatename.h Source File
Go to the documentation of this file.
00001 
00004 #ifndef _FBXSDK_NODE_FINDER_DUPLICATE_NAME_H_
00005 #define _FBXSDK_NODE_FINDER_DUPLICATE_NAME_H_
00006 
00007 /**************************************************************************************
00008 
00009  Copyright © 2001 - 2008 Autodesk, Inc. and/or its licensors.
00010  All Rights Reserved.
00011 
00012  The coded instructions, statements, computer programs, and/or related material 
00013  (collectively the "Data") in these files contain unpublished information 
00014  proprietary to Autodesk, Inc. and/or its licensors, which is protected by 
00015  Canada and United States of America federal copyright law and by international 
00016  treaties. 
00017  
00018  The Data may not be disclosed or distributed to third parties, in whole or in
00019  part, without the prior written consent of Autodesk, Inc. ("Autodesk").
00020 
00021  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00022  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
00023  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR ARISING
00024  BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES OF TITLE, 
00025  NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR USE. 
00026  WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT THAT THE OPERATION
00027  OF THE DATA WILL BE UNINTERRUPTED OR ERROR FREE. 
00028  
00029  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
00030  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR EXPENSES
00031  OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE DAMAGES OR OTHER
00032  SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS OF PROFITS, REVENUE
00033  OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR DAMAGES OF ANY KIND),
00034  HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF LIABILITY, WHETHER DERIVED
00035  FROM CONTRACT, TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE), OR OTHERWISE,
00036  ARISING OUT OF OR RELATING TO THE DATA OR ITS USE OR ANY OTHER PERFORMANCE,
00037  WHETHER OR NOT AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS
00038  OR DAMAGE. 
00039 
00040 **************************************************************************************/
00041 
00042 #include <kaydaradef.h>
00043 #ifndef KFBX_DLL 
00044     #define KFBX_DLL K_DLLIMPORT
00045 #endif
00046 
00047 #include <kfbxplugins/kfbxnodefinder.h>
00048 
00049 #include <fbxfilesdk_nsbegin.h>
00050 
00051 class KFbxScene;
00052 class KFbxGeometry;
00053 class KFbxSurfaceMaterial;
00054 class KFbxTexture;
00055 class KFbxVideo;
00056 class KFbxGenericNode;
00057 class KFbxLayerElementTexture;
00058 
00059 //
00060 //  CLASS KFbxNodeFinderDuplicateName
00061 //
00062 
00064 class KFBX_DLL KFbxNodeFinderDuplicateName : public KFbxNodeFinder
00065 {
00066 public:
00067 
00076     typedef enum 
00077     {
00078         eCHECK_NODE_NAME,
00079         eCHECK_MATERIAL_NAME,
00080         eCHECK_TEXTURE_NAME,
00081         eCHECK_VIDEO_NAME,
00082         eCHECK_GENERIC_NODE_NAME,
00083         eSTATE_COUNT
00084     } EState;
00085 
00090     KFbxNodeFinderDuplicateName(KFbxScene* pDestinationScene = NULL);
00091 
00093     virtual ~KFbxNodeFinderDuplicateName();
00094 
00096     virtual void Reset();
00097 
00102     bool GetState(int pStateIndex);
00103 
00108     void SetState(int pStateIndex, bool pValue);
00109 
00113     KArrayTemplate<KFbxNode*>& GetNodeArray();
00114 
00118     KArrayTemplate<KFbxNode*>& GetDuplicateNodeArray();
00119 
00123     KArrayTemplate<KFbxSurfaceMaterial*>& GetMaterialArray();
00124 
00128     KArrayTemplate<KFbxSurfaceMaterial*>& GetDuplicateMaterialArray();
00129 
00133     KArrayTemplate<KFbxTexture*>& GetTextureArray();
00134 
00138     KArrayTemplate<KFbxTexture*>& GetDuplicateTextureArray();
00139 
00143     KArrayTemplate<KFbxVideo*>& GetVideoArray();
00144 
00148     KArrayTemplate<KFbxVideo*>& GetDuplicateVideoArray();
00149 
00150 
00151     KArrayTemplate<KFbxGenericNode*>& GetGenericNodeArray();
00152 
00153     KArrayTemplate<KFbxGenericNode*>& GetDuplicateGenericNodeArray();
00154 
00155 
00156 protected:
00157 
00161     virtual void ApplyRecursive(KFbxNode& iNode);
00162     
00168     virtual bool CheckNode(KFbxNode& iNode);
00169 
00174     bool CheckNodeName(KFbxNode& pNode);
00175 
00181     bool CheckMaterialName(KFbxGeometry* pGeometry, KFbxNode* pNode);
00182 
00187     bool CheckTextureName(KFbxGeometry* pGeometry);
00188     bool CheckLayerElementTextureName(KFbxLayerElementTexture* pLayerElementTexture);
00189 
00194     bool CheckVideoName(KFbxGeometry* pGeometry);
00195     bool CheckLayerElementVideoName(KFbxLayerElementTexture* pLayerElementTexture);
00196 
00197     bool CheckGenericNodeName(char* pNodeName);
00198 
00199     bool mStates [eSTATE_COUNT];
00200 
00201     KArrayTemplate <KFbxNode*> mENodeArray;
00202     KArrayTemplate <KFbxNode*> mDuplicateNodeArray;
00203     KArrayTemplate <KFbxSurfaceMaterial*> mMaterialArray;
00204     KArrayTemplate <KFbxSurfaceMaterial*> mDuplicateMaterialArray;
00205     KArrayTemplate <KFbxTexture*> mTextureArray;
00206     KArrayTemplate <KFbxTexture*> mDuplicateTextureArray;
00207     KArrayTemplate <KFbxVideo*> mVideoArray;
00208     KArrayTemplate <KFbxVideo*> mDuplicateVideoArray;
00209     KArrayTemplate <KFbxGenericNode*> mGenericNodeArray;
00210     KArrayTemplate <KFbxGenericNode*> mDuplicateGenericNodeArray;
00211 
00212     #ifdef _MULTIENTITY
00213         KFbxScene* mSourceScene;
00214     #endif // #ifdef _MULTIENTITY
00215     KFbxScene* mDestinationScene;
00216 };
00217 
00218 #include <fbxfilesdk_nsend.h>
00219 
00220 #endif
00221 
00222