00001 00003 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXDATATYPES_H 00004 #define FBXFILESDK_KFBXPLUGINS_KFBXDATATYPES_H 00005 00006 /************************************************************************************** 00007 00008 Copyright (C) 2001 - 2009 Autodesk, Inc. and/or its licensors. 00009 All Rights Reserved. 00010 00011 The coded instructions, statements, computer programs, and/or related material 00012 (collectively the "Data") in these files contain unpublished information 00013 proprietary to Autodesk, Inc. and/or its licensors, which is protected by 00014 Canada and United States of America federal copyright law and by international 00015 treaties. 00016 00017 The Data may not be disclosed or distributed to third parties, in whole or in 00018 part, without the prior written consent of Autodesk, Inc. ("Autodesk"). 00019 00020 THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY. 00021 ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO 00022 WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR ARISING 00023 BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES OF TITLE, 00024 NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR USE. 00025 WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT THAT THE OPERATION 00026 OF THE DATA WILL BE UNINTERRUPTED OR ERROR FREE. 00027 00028 IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS 00029 OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR EXPENSES 00030 OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE DAMAGES OR OTHER 00031 SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS OF PROFITS, REVENUE 00032 OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR DAMAGES OF ANY KIND), 00033 HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF LIABILITY, WHETHER DERIVED 00034 FROM CONTRACT, TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE), OR OTHERWISE, 00035 ARISING OUT OF OR RELATING TO THE DATA OR ITS USE OR ANY OTHER PERFORMANCE, 00036 WHETHER OR NOT AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS 00037 OR DAMAGE. 00038 00039 **************************************************************************************/ 00040 #include <fbxfilesdk/fbxfilesdk_def.h> 00041 00042 #include <fbxfilesdk/components/kbaselib/klib/kdebug.h> 00043 #include <fbxfilesdk/components/kbaselib/klib/kstring.h> 00044 00045 #include <fbxfilesdk/kfbxplugins/kfbxtypes.h> 00046 #include <fbxfilesdk/kfbxplugins/kfbxcolor.h> 00047 #include <fbxfilesdk/kfbxmath/kfbxvector4.h> 00048 00049 #include <fbxfilesdk/fbxcore/kfbxpropertyhandle.h> 00050 00051 #include <fbxfilesdk/fbxfilesdk_nsbegin.h> 00052 00053 class KFbxSdkManager; 00054 class KFbxTypeInfo_internal; 00055 00059 class KFBX_DLL KFbxDataType { 00060 00061 public: 00062 static KFbxDataType Create(const char *pName,EFbxType pType); 00063 static KFbxDataType Create(const char *pName,KFbxDataType const &pDataType); 00068 00069 KFbxDataType(); 00070 00074 KFbxDataType( KFbxDataType const &pDataType ); 00075 00077 void Destroy(); 00078 00082 KFbxDataType( KFbxTypeInfoHandle const &pTypeInfoHandle ); 00083 00085 ~KFbxDataType(); 00087 00088 00089 public: 00094 inline KFbxDataType& operator=(const KFbxDataType &pDataType) { mTypeInfoHandle=pDataType.mTypeInfoHandle; return *this; } 00095 00100 00105 inline bool operator==(const KFbxDataType& pDataType) const { return mTypeInfoHandle==pDataType.mTypeInfoHandle; } 00106 00111 inline bool operator!=(const KFbxDataType& pDataType) const { return mTypeInfoHandle!=pDataType.mTypeInfoHandle; } 00113 public: 00114 00118 inline bool Valid() const { return mTypeInfoHandle.Valid(); } 00119 00124 inline bool Is(const KFbxDataType& pDataType) const { return mTypeInfoHandle.Is(pDataType.mTypeInfoHandle); } 00125 00129 EFbxType GetType() const; 00130 00134 const char* GetName() const; 00135 00136 private: 00137 KFbxTypeInfoHandle mTypeInfoHandle; 00138 public: 00142 inline KFbxTypeInfoHandle const &GetTypeInfoHandle() const { return mTypeInfoHandle; } 00143 00144 friend class KFbxSdkManager; 00145 }; 00146 00147 // Default Basic Types 00148 extern KFBX_DLL KFbxDataType DTByte; 00149 extern KFBX_DLL KFbxDataType DTUByte; 00150 extern KFBX_DLL KFbxDataType DTShort; 00151 extern KFBX_DLL KFbxDataType DTUShort; 00152 extern KFBX_DLL KFbxDataType DTUInteger; 00153 extern KFBX_DLL KFbxDataType DTLongLong; 00154 extern KFBX_DLL KFbxDataType DTULongLong; 00155 extern KFBX_DLL KFbxDataType DTHalfFloat; 00156 00157 extern KFBX_DLL KFbxDataType DTNone; 00158 extern KFBX_DLL KFbxDataType DTBool; 00159 extern KFBX_DLL KFbxDataType DTInteger; 00160 extern KFBX_DLL KFbxDataType DTFloat; 00161 extern KFBX_DLL KFbxDataType DTDouble; 00162 extern KFBX_DLL KFbxDataType DTDouble2; 00163 extern KFBX_DLL KFbxDataType DTDouble3; 00164 extern KFBX_DLL KFbxDataType DTDouble4; 00165 extern KFBX_DLL KFbxDataType DTDouble44; 00166 extern KFBX_DLL KFbxDataType DTEnum; 00167 extern KFBX_DLL KFbxDataType DTStringList; // ? 00168 extern KFBX_DLL KFbxDataType DTString; 00169 extern KFBX_DLL KFbxDataType DTCharPtr; // ? 00170 extern KFBX_DLL KFbxDataType DTTime; 00171 extern KFBX_DLL KFbxDataType DTReference; 00172 extern KFBX_DLL KFbxDataType DTCompound; 00173 extern KFBX_DLL KFbxDataType DTBlob; 00174 extern KFBX_DLL KFbxDataType DTDistance; 00175 extern KFBX_DLL KFbxDataType DTDateTime; 00176 00177 // MB Specific datatypes 00178 extern KFBX_DLL KFbxDataType DTAction; 00179 extern KFBX_DLL KFbxDataType DTEvent; 00180 00181 // Specialised reference Properties 00182 extern KFBX_DLL KFbxDataType DTReferenceObject; 00183 extern KFBX_DLL KFbxDataType DTReferenceProperty; 00184 00185 // Extended sub types 00186 extern KFBX_DLL KFbxDataType DTColor3; 00187 extern KFBX_DLL KFbxDataType DTColor4; 00188 00189 // Support for older datatypes 00190 extern KFBX_DLL KFbxDataType DTReal; 00191 extern KFBX_DLL KFbxDataType DTVector3D; 00192 extern KFBX_DLL KFbxDataType DTVector4D; 00193 00194 // Tranforms Types 00195 extern KFBX_DLL KFbxDataType DTTranslation; 00196 extern KFBX_DLL KFbxDataType DTRotation; 00197 extern KFBX_DLL KFbxDataType DTScaling; 00198 extern KFBX_DLL KFbxDataType DTQuaternion; 00199 00200 extern KFBX_DLL KFbxDataType DTLocalTranslation; 00201 extern KFBX_DLL KFbxDataType DTLocalRotation; 00202 extern KFBX_DLL KFbxDataType DTLocalScaling; 00203 extern KFBX_DLL KFbxDataType DTLocalQuaternion; 00204 00205 extern KFBX_DLL KFbxDataType DTTransformMatrix; 00206 extern KFBX_DLL KFbxDataType DTTranslationMatrix; 00207 extern KFBX_DLL KFbxDataType DTRotationMatrix; 00208 extern KFBX_DLL KFbxDataType DTScalingMatrix; 00209 00210 // Material-related types (also used as DataType for Texture layer elements) 00211 extern KFBX_DLL KFbxDataType DTMaterialEmissive; 00212 extern KFBX_DLL KFbxDataType DTMaterialEmissiveFactor; 00213 extern KFBX_DLL KFbxDataType DTMaterialAmbient; 00214 extern KFBX_DLL KFbxDataType DTMaterialAmbientFactor; 00215 extern KFBX_DLL KFbxDataType DTMaterialDiffuse; 00216 extern KFBX_DLL KFbxDataType DTMaterialDiffuseFactor; 00217 extern KFBX_DLL KFbxDataType DTMaterialBump; 00218 extern KFBX_DLL KFbxDataType DTMaterialNormalMap; 00219 extern KFBX_DLL KFbxDataType DTMaterialTransparentColor; 00220 extern KFBX_DLL KFbxDataType DTMaterialTransparencyFactor; 00221 extern KFBX_DLL KFbxDataType DTMaterialSpecular; 00222 extern KFBX_DLL KFbxDataType DTMaterialSpecularFactor; 00223 extern KFBX_DLL KFbxDataType DTMaterialShininess; 00224 extern KFBX_DLL KFbxDataType DTMaterialReflection; 00225 extern KFBX_DLL KFbxDataType DTMaterialReflectionFactor; 00226 extern KFBX_DLL KFbxDataType DTMaterialDisplacement; 00227 extern KFBX_DLL KFbxDataType DTMaterialCommonFactor; 00228 extern KFBX_DLL KFbxDataType DTMaterialCommonTexture; 00229 00230 // LayerElement 00231 extern KFBX_DLL KFbxDataType DTLayerElementUndefined; 00232 extern KFBX_DLL KFbxDataType DTLayerElementNormal; 00233 extern KFBX_DLL KFbxDataType DTLayerElementBinormal; 00234 extern KFBX_DLL KFbxDataType DTLayerElementTangent; 00235 extern KFBX_DLL KFbxDataType DTLayerElementMaterial; 00236 extern KFBX_DLL KFbxDataType DTLayerElementTexture; 00237 extern KFBX_DLL KFbxDataType DTLayerElementPolygonGroup; 00238 extern KFBX_DLL KFbxDataType DTLayerElementUV; 00239 extern KFBX_DLL KFbxDataType DTLayerElementVertexColor; 00240 extern KFBX_DLL KFbxDataType DTLayerElementSmoothing; 00241 extern KFBX_DLL KFbxDataType DTLayerElementCrease; 00242 extern KFBX_DLL KFbxDataType DTLayerElementHole; 00243 extern KFBX_DLL KFbxDataType DTLayerElementUserData; 00244 extern KFBX_DLL KFbxDataType DTLayerElementVisibility; 00245 00246 // File references / External file references 00247 extern KFBX_DLL KFbxDataType DTUrl; 00248 extern KFBX_DLL KFbxDataType DTXRefUrl; 00249 00250 // IO Specialised Types 00251 extern KFBX_DLL KFbxDataType DTPresets; 00252 extern KFBX_DLL KFbxDataType DTStatistics; 00253 extern KFBX_DLL KFbxDataType DTUnits; 00254 extern KFBX_DLL KFbxDataType DTWarning; 00255 extern KFBX_DLL KFbxDataType DTWeb; 00256 extern KFBX_DLL KFbxDataType DTTextLine; 00257 extern KFBX_DLL KFbxDataType DTAlias; 00258 00259 00260 // Motion Builder Specialised Types 00261 extern KFBX_DLL KFbxDataType DTIntensity; 00262 extern KFBX_DLL KFbxDataType DTConeAngle; 00263 extern KFBX_DLL KFbxDataType DTFog; 00264 extern KFBX_DLL KFbxDataType DTShape; 00265 extern KFBX_DLL KFbxDataType DTFieldOfView; 00266 extern KFBX_DLL KFbxDataType DTFieldOfViewX; 00267 extern KFBX_DLL KFbxDataType DTFieldOfViewY; 00268 extern KFBX_DLL KFbxDataType DTOpticalCenterX; 00269 extern KFBX_DLL KFbxDataType DTOpticalCenterY; 00270 00271 extern KFBX_DLL KFbxDataType DTRoll; 00272 extern KFBX_DLL KFbxDataType DTCameraIndex; 00273 extern KFBX_DLL KFbxDataType DTTimeWarp; 00274 extern KFBX_DLL KFbxDataType DTVisibility; 00275 00276 extern KFBX_DLL KFbxDataType DTTranslationUV; 00277 extern KFBX_DLL KFbxDataType DTScalingUV; 00278 extern KFBX_DLL KFbxDataType DTTextureRotation;//MB DT 00279 extern KFBX_DLL KFbxDataType DTHSB; 00280 00281 extern KFBX_DLL KFbxDataType DTOrientation; 00282 extern KFBX_DLL KFbxDataType DTLookAt; 00283 00284 extern KFBX_DLL KFbxDataType DTOcclusion; 00285 extern KFBX_DLL KFbxDataType DTWeight; 00286 00287 extern KFBX_DLL KFbxDataType DTIKReachTranslation; 00288 extern KFBX_DLL KFbxDataType DTIKReachRotation; 00289 00290 KFBX_DLL KFbxDataType const & GetFbxDataType(EFbxType pType); 00291 00292 // Internal use 00293 KFBX_DLL bool KFbxTypesInit (KFbxSdkManager *pManager); 00294 KFBX_DLL void KFbxTypesRelease(KFbxSdkManager *pManager); 00295 00296 KFBX_DLL char* FbxDataTypeToFormatPropertyType( KFbxDataType const &pDataType ); 00297 KFBX_DLL KFbxDataType const &FormatPropertyTypeToFbxDataType( const char *pDataTypeName ); 00298 00299 00300 00301 #include <fbxfilesdk/fbxfilesdk_nsend.h> 00302 00303 #endif // FBXFILESDK_KFBXPLUGINS_KFBXDATATYPES_H 00304