fbxcachedeffect.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /****************************************************************************************
  2. Copyright (C) 2015 Autodesk, Inc.
  3. All rights reserved.
  4. Use of this software is subject to the terms of the Autodesk license agreement
  5. provided at the time of installation or download, or which otherwise accompanies
  6. this software in either electronic or hard copy form.
  7. ****************************************************************************************/
  8. //! \file fbxcachedeffect.h
  9. #ifndef _FBXSDK_SCENE_GEOMETRY_CACHED_EFFECT_H_
  10. #define _FBXSDK_SCENE_GEOMETRY_CACHED_EFFECT_H_
  11. #include <fbxsdk/fbxsdk_def.h>
  12. #include <fbxsdk/scene/geometry/fbxnodeattribute.h>
  13. #include <fbxsdk/scene/geometry/fbxcache.h>
  14. #include <fbxsdk/fbxsdk_nsbegin.h>
  15. /** A cached effect is a type of node attribute to represent certain type of effect
  16. * by an cache object. Categories are particle cache, fluid cache, hair cache and general cache.
  17. * \see ECategory for the effect types that are supported.
  18. * \nosubgrouping
  19. */
  20. class FBXSDK_DLL FbxCachedEffect : public FbxNodeAttribute
  21. {
  22. FBXSDK_OBJECT_DECLARE(FbxCachedEffect, FbxNodeAttribute);
  23. public:
  24. //! Returns the FbxNodeAttribute::EType::eCachedEffect attribute type.
  25. virtual FbxNodeAttribute::EType GetAttributeType() const;
  26. /** Effect attribute category. This is for identification purpose and has
  27. * no influence inside the FBX SDK. However, applications may use this to filter FbxCachedEffect
  28. * objects.
  29. * \remarks Vertex caches for deforming geometries are not handled by the FbxCachedEffect object. These
  30. * caches are connected with the FbxVertexCacheDeformer object.
  31. * \remarks If an object of this class is used as the default NodeAttribute for a FbxNode and the scene is
  32. * saved to an FBX v6 and earlier versions, the CachedEffect attribute is not saved and the FbxNode will
  33. * be processed as a FbxNull node with default values for the attribute.
  34. */
  35. enum ECategory
  36. {
  37. eParticles, //!< This effect handles a particle cache.
  38. eFluids, //!< This effect handles a fluid cache.
  39. eHair, //!< This effect handles an hair cache.
  40. eGeneric //!< This effect handles a cache other than particles, fluids or hair.
  41. };
  42. //! Return the specialization category of this effect attribute.
  43. ECategory GetCategory() const;
  44. /** Assign a cache object to be used by this attribute.
  45. * \param pCache The cache object.
  46. * \param pCategory The type of this cached effect.
  47. * \remarks The cache referenced by the \b pCache pointer can be freely shared among
  48. * multiple FbxCachedEffect (and even the FbxVertexCacheDeformer) therefore
  49. * \b pCategory identifier should really only used as a hint of what this FbxCachedEffect
  50. * represents but it should not be taken for granted that the content of the cache really
  51. * matches the category. Applications should always check the cache files to ensure that
  52. * they are manipulating the desired information.
  53. *
  54. */
  55. void SetCache( FbxCache* pCache, ECategory pCategory = eGeneric);
  56. /** Get the cache object used by this node attribute.
  57. * \return A pointer to the cache object used by this node attribute, or \c NULL if no cache object is assigned.
  58. */
  59. FbxCache* GetCache() const;
  60. protected:
  61. /*****************************************************************************************************************************
  62. ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
  63. *****************************************************************************************************************************/
  64. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  65. virtual FbxObject& Copy(const FbxObject& pObject);
  66. protected:
  67. virtual void ConstructProperties(bool pForceSet);
  68. public:
  69. virtual const char* GetTypeName() const;
  70. virtual FbxStringList GetTypeFlags() const;
  71. private:
  72. void ClearCacheConnections();
  73. FbxPropertyT<ECategory> Category;
  74. #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
  75. };
  76. inline EFbxType FbxTypeOf(const FbxCachedEffect::ECategory&){ return eFbxEnum; }
  77. #include <fbxsdk/fbxsdk_nsend.h>
  78. #endif /* _FBXSDK_SCENE_GEOMETRY_CACHED_EFFECT_H_ */