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 00041 #include <fbxfilesdk/components/kbaselib/kaydaradef_h.h> 00042 #include <fbxfilesdk/components/kbaselib/kbaselib_forward.h> 00043 #include <fbxfilesdk/components/kbaselib/klib/kdebug.h> 00044 #include <fbxfilesdk/components/kbaselib/klib/kstring.h> 00045 00046 #include <fbxfilesdk/kfbxplugins/kfbxtypes.h> 00047 #include <fbxfilesdk/kfbxplugins/kfbxcolor.h> 00048 #include <fbxfilesdk/kfbxmath/kfbxvector4.h> 00049 00050 #include <fbxfilesdk/fbxcore/kfbxpropertyhandle.h> 00051 00052 #include <fbxfilesdk/fbxfilesdk_nsbegin.h> 00053 00054 class KFbxSdkManager; 00055 class KFbxTypeInfo_internal; 00056 00060 class KFBX_DLL KFbxDataType { 00061 00062 public: 00063 static KFbxDataType Create(const char *pName,EFbxType pType); 00064 static KFbxDataType Create(const char *pName,KFbxDataType const &pDataType); 00069 00070 KFbxDataType(); 00071 00075 KFbxDataType( KFbxDataType const &pDataType ); 00076 00078 void Destroy(); 00079 00083 KFbxDataType( KFbxTypeInfoHandle const &pTypeInfoHandle ); 00084 00086 ~KFbxDataType(); 00088 00089 00090 public: 00095 inline KFbxDataType& operator = (const KFbxDataType &pDataType) { mTypeInfoHandle=pDataType.mTypeInfoHandle; return *this; } 00096 00101 00106 inline bool operator == (const KFbxDataType& pDataType) const { return mTypeInfoHandle==pDataType.mTypeInfoHandle; } 00107 00112 inline bool operator != (const KFbxDataType& pDataType) const { return mTypeInfoHandle!=pDataType.mTypeInfoHandle; } 00114 public: 00115 00119 inline bool Valid() const { return mTypeInfoHandle.Valid(); } 00120 00125 inline bool Is(const KFbxDataType& pDataType) const { return mTypeInfoHandle.Is(pDataType.mTypeInfoHandle); } 00126 00130 EFbxType GetType() const; 00131 00135 const char* GetName() const; 00136 00137 private: 00138 KFbxTypeInfoHandle mTypeInfoHandle; 00139 public: 00143 inline KFbxTypeInfoHandle const &GetTypeInfoHandle() const { return mTypeInfoHandle; } 00144 00145 friend class KFbxSdkManager; 00146 }; 00147 00148 // Default Basic Types 00149 extern KFBX_DLL KFbxDataType DTByte; 00150 extern KFBX_DLL KFbxDataType DTUByte; 00151 extern KFBX_DLL KFbxDataType DTShort; 00152 extern KFBX_DLL KFbxDataType DTUShort; 00153 extern KFBX_DLL KFbxDataType DTUInteger; 00154 extern KFBX_DLL KFbxDataType DTLongLong; 00155 extern KFBX_DLL KFbxDataType DTULongLong; 00156 extern KFBX_DLL KFbxDataType DTHalfFloat; 00157 00158 extern KFBX_DLL KFbxDataType DTNone; 00159 extern KFBX_DLL KFbxDataType DTBool; 00160 extern KFBX_DLL KFbxDataType DTInteger; 00161 extern KFBX_DLL KFbxDataType DTFloat; 00162 extern KFBX_DLL KFbxDataType DTDouble; 00163 extern KFBX_DLL KFbxDataType DTDouble2; 00164 extern KFBX_DLL KFbxDataType DTDouble3; 00165 extern KFBX_DLL KFbxDataType DTDouble4; 00166 extern KFBX_DLL KFbxDataType DTDouble44; 00167 extern KFBX_DLL KFbxDataType DTEnum; 00168 extern KFBX_DLL KFbxDataType DTStringList; // ? 00169 extern KFBX_DLL KFbxDataType DTString; 00170 extern KFBX_DLL KFbxDataType DTCharPtr; // ? 00171 extern KFBX_DLL KFbxDataType DTTime; 00172 extern KFBX_DLL KFbxDataType DTReference; 00173 extern KFBX_DLL KFbxDataType DTCompound; 00174 extern KFBX_DLL KFbxDataType DTBlob; 00175 extern KFBX_DLL KFbxDataType DTDistance; 00176 extern KFBX_DLL KFbxDataType DTDateTime; 00177 00178 // MB Specific datatypes 00179 extern KFBX_DLL KFbxDataType DTAction; 00180 extern KFBX_DLL KFbxDataType DTEvent; 00181 00182 // Specialised reference Properties 00183 extern KFBX_DLL KFbxDataType DTReferenceObject; 00184 extern KFBX_DLL KFbxDataType DTReferenceProperty; 00185 00186 // Extended sub types 00187 extern KFBX_DLL KFbxDataType DTColor3; 00188 extern KFBX_DLL KFbxDataType DTColor4; 00189 00190 // Support for older datatypes 00191 extern KFBX_DLL KFbxDataType DTReal; 00192 extern KFBX_DLL KFbxDataType DTVector3D; 00193 extern KFBX_DLL KFbxDataType DTVector4D; 00194 00195 // Tranforms Types 00196 extern KFBX_DLL KFbxDataType DTTranslation; 00197 extern KFBX_DLL KFbxDataType DTRotation; 00198 extern KFBX_DLL KFbxDataType DTScaling; 00199 extern KFBX_DLL KFbxDataType DTQuaternion; 00200 00201 extern KFBX_DLL KFbxDataType DTLocalTranslation; 00202 extern KFBX_DLL KFbxDataType DTLocalRotation; 00203 extern KFBX_DLL KFbxDataType DTLocalScaling; 00204 extern KFBX_DLL KFbxDataType DTLocalQuaternion; 00205 00206 extern KFBX_DLL KFbxDataType DTTransformMatrix; 00207 extern KFBX_DLL KFbxDataType DTTranslationMatrix; 00208 extern KFBX_DLL KFbxDataType DTRotationMatrix; 00209 extern KFBX_DLL KFbxDataType DTScalingMatrix; 00210 00211 // Material-related types (also used as DataType for Texture layer elements) 00212 extern KFBX_DLL KFbxDataType DTMaterialEmissive; 00213 extern KFBX_DLL KFbxDataType DTMaterialEmissiveFactor; 00214 extern KFBX_DLL KFbxDataType DTMaterialAmbient; 00215 extern KFBX_DLL KFbxDataType DTMaterialAmbientFactor; 00216 extern KFBX_DLL KFbxDataType DTMaterialDiffuse; 00217 extern KFBX_DLL KFbxDataType DTMaterialDiffuseFactor; 00218 extern KFBX_DLL KFbxDataType DTMaterialBump; 00219 extern KFBX_DLL KFbxDataType DTMaterialNormalMap; 00220 extern KFBX_DLL KFbxDataType DTMaterialTransparentColor; 00221 extern KFBX_DLL KFbxDataType DTMaterialTransparencyFactor; 00222 extern KFBX_DLL KFbxDataType DTMaterialSpecular; 00223 extern KFBX_DLL KFbxDataType DTMaterialSpecularFactor; 00224 extern KFBX_DLL KFbxDataType DTMaterialShininess; 00225 extern KFBX_DLL KFbxDataType DTMaterialReflection; 00226 extern KFBX_DLL KFbxDataType DTMaterialReflectionFactor; 00227 extern KFBX_DLL KFbxDataType DTMaterialDisplacement; 00228 extern KFBX_DLL KFbxDataType DTMaterialCommonFactor; 00229 extern KFBX_DLL KFbxDataType DTMaterialCommonTexture; 00230 00231 // LayerElement 00232 extern KFBX_DLL KFbxDataType DTLayerElementUndefined; 00233 extern KFBX_DLL KFbxDataType DTLayerElementNormal; 00234 extern KFBX_DLL KFbxDataType DTLayerElementBinormal; 00235 extern KFBX_DLL KFbxDataType DTLayerElementTangent; 00236 extern KFBX_DLL KFbxDataType DTLayerElementMaterial; 00237 extern KFBX_DLL KFbxDataType DTLayerElementTexture; 00238 extern KFBX_DLL KFbxDataType DTLayerElementPolygonGroup; 00239 extern KFBX_DLL KFbxDataType DTLayerElementUV; 00240 extern KFBX_DLL KFbxDataType DTLayerElementVertexColor; 00241 extern KFBX_DLL KFbxDataType DTLayerElementSmoothing; 00242 extern KFBX_DLL KFbxDataType DTLayerElementCrease; 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 // Motion Builder Specialised Types 00251 extern KFBX_DLL KFbxDataType DTIntensity; 00252 extern KFBX_DLL KFbxDataType DTConeAngle; 00253 extern KFBX_DLL KFbxDataType DTFog; 00254 extern KFBX_DLL KFbxDataType DTShape; 00255 extern KFBX_DLL KFbxDataType DTFieldOfView; 00256 extern KFBX_DLL KFbxDataType DTFieldOfViewX; 00257 extern KFBX_DLL KFbxDataType DTFieldOfViewY; 00258 extern KFBX_DLL KFbxDataType DTOpticalCenterX; 00259 extern KFBX_DLL KFbxDataType DTOpticalCenterY; 00260 00261 extern KFBX_DLL KFbxDataType DTRoll; 00262 extern KFBX_DLL KFbxDataType DTCameraIndex; 00263 extern KFBX_DLL KFbxDataType DTTimeWarp; 00264 extern KFBX_DLL KFbxDataType DTVisibility; 00265 00266 extern KFBX_DLL KFbxDataType DTTranslationUV; 00267 extern KFBX_DLL KFbxDataType DTScalingUV; 00268 extern KFBX_DLL KFbxDataType DTTextureRotation;//MB DT 00269 extern KFBX_DLL KFbxDataType DTHSB; 00270 00271 extern KFBX_DLL KFbxDataType DTOrientation; 00272 extern KFBX_DLL KFbxDataType DTLookAt; 00273 00274 extern KFBX_DLL KFbxDataType DTOcclusion; 00275 extern KFBX_DLL KFbxDataType DTWeight; 00276 00277 extern KFBX_DLL KFbxDataType DTIKReachTranslation; 00278 extern KFBX_DLL KFbxDataType DTIKReachRotation; 00279 00280 KFBX_DLL KFbxDataType const & GetFbxDataType(EFbxType pType); 00281 00282 // Internal use 00283 KFBX_DLL bool KFbxTypesInit (KFbxSdkManager *pManager); 00284 KFBX_DLL void KFbxTypesRelease(KFbxSdkManager *pManager); 00285 00286 KFBX_DLL char* FbxDataTypeToFormatPropertyType( KFbxDataType const &pDataType ); 00287 KFBX_DLL KFbxDataType const &FormatPropertyTypeToFbxDataType( const char *pDataTypeName ); 00288 00289 00290 00291 #include <fbxfilesdk/fbxfilesdk_nsend.h> 00292 00293 #endif // FBXFILESDK_KFBXPLUGINS_KFBXDATATYPES_H 00294