fbxlayerentryview.h 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 fbxlayerentryview.h
  9. #ifndef _FBXSDK_SCENE_SHADING_LAYER_ENTRY_VIEW_H_
  10. #define _FBXSDK_SCENE_SHADING_LAYER_ENTRY_VIEW_H_
  11. #include <fbxsdk/fbxsdk_def.h>
  12. #include <fbxsdk/scene/shading/fbxentryview.h>
  13. #include <fbxsdk/scene/shading/fbxbindingtableentry.h>
  14. #include <fbxsdk/scene/geometry/fbxlayer.h>
  15. #include <fbxsdk/fbxsdk_nsbegin.h>
  16. class FbxLayerContainer;
  17. /** FbxLayerEntryView encodes a layer element representation (the index of the layer, the type of the layer
  18. * element and whether the layer element is a UVSet layer element) to a string stored in FbxBindingTableEntry
  19. * and decodes the string back to a layer element representation.
  20. * This class is used in combination with FbxBindingTableEntry to represent a source or a destination
  21. * FbxLayerElement.
  22. * \see FbxBindingTableEntry and FbxBindingTable.
  23. */
  24. class FBXSDK_DLL FbxLayerEntryView : public FbxEntryView
  25. {
  26. public:
  27. /** Name of the entry type used in the binding entry.
  28. * It should be "FbxLayerEntry" in this case.
  29. */
  30. static const char* sEntryType;
  31. /** Constructor.
  32. * \param pEntry The binding table entry to create the entry view for.
  33. * \param pAsSource \c true to create the entry view as source, \c false as destination.
  34. * \param pCreate \c true to create the entry view, \c false otherwise.
  35. */
  36. FbxLayerEntryView(FbxBindingTableEntry* pEntry, bool pAsSource, bool pCreate = false );
  37. //! Destructor.
  38. virtual ~FbxLayerEntryView();
  39. /** Set the layer element for the binding entry.
  40. * \param pLayerIndex LayerElement index.
  41. * \param pType LayerElement type.
  42. * \param pUVSet Whether this is a UVSet LayerElement.
  43. */
  44. void SetLayerElement( int pLayerIndex, FbxLayerElement::EType pType, bool pUVSet );
  45. /** Get the layer element for binding entry.
  46. * \param pLayerIndex LayerElement index.
  47. * \param pType LayerElement type.
  48. * \param pUVSet Whether this is a UVSet LayerElement.
  49. */
  50. void GetLayerElement( int &pLayerIndex, FbxLayerElement::EType& pType, bool& pUVSet ) const;
  51. /** Get the layer element for binding entry.
  52. * \param pContainer FbxLayerContainer to get the layer element from.
  53. * \return The layer element for binding entry.
  54. */
  55. FbxLayerElement* GetLayerElement( FbxLayerContainer* pContainer ) const;
  56. /** Get the entry type.
  57. * \return Entry type as string "FbxLayerEntry".
  58. * \remarks Always use EntryType() to get the right entry type.
  59. */
  60. virtual const char* EntryType() const;
  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. protected:
  66. static const char* sDelimiter;
  67. #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
  68. };
  69. #include <fbxsdk/fbxsdk_nsend.h>
  70. #endif /* _FBXSDK_SCENE_SHADING_LAYER_ENTRY_VIEW_H_ */