fbxbindingtablebase.h 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 fbxbindingtablebase.h
  9. #ifndef _FBXSDK_SCENE_SHADING_BINDING_TABLE_BASE_H_
  10. #define _FBXSDK_SCENE_SHADING_BINDING_TABLE_BASE_H_
  11. #include <fbxsdk/fbxsdk_def.h>
  12. #include <fbxsdk/core/fbxobject.h>
  13. #include <fbxsdk/scene/shading/fbxbindingtableentry.h>
  14. #include <fbxsdk/core/base/fbxdynamicarray.h>
  15. #include <fbxsdk/fbxsdk_nsbegin.h>
  16. /** A binding table represents a collection of bindings
  17. * from source types such as FbxObject, or FbxLayerElements
  18. * to destinations which can be of similar types.
  19. * \see FbxBindingTableEntry.
  20. * \nosubgrouping
  21. */
  22. class FBXSDK_DLL FbxBindingTableBase : public FbxObject
  23. {
  24. FBXSDK_ABSTRACT_OBJECT_DECLARE(FbxBindingTableBase,FbxObject);
  25. public:
  26. /** Adds a new entry to the binding table.
  27. * \return The new entry.
  28. */
  29. FbxBindingTableEntry& AddNewEntry();
  30. /** Query the number of table entries.
  31. * \return The number of entries.
  32. */
  33. size_t GetEntryCount() const;
  34. /** Access a table entry.
  35. * \param pIndex Valid range is [0, GetEntryCount()-1].
  36. * \return A valid table entry if pIndex is valid. Otherwise the value is undefined.
  37. */
  38. FbxBindingTableEntry const& GetEntry( size_t pIndex ) const;
  39. /** Access a table entry.
  40. * \param pIndex Valid range is [0, GetEntryCount()-1].
  41. * \return A valid table entry if pIndex is valid. Otherwise the value is undefined.
  42. */
  43. FbxBindingTableEntry& GetEntry( size_t pIndex );
  44. /** Retrieve the table entry for the given source value.
  45. * \param pSrcName The source value to query.
  46. * \return The corresponding entry, or NULL if no entry in
  47. * the table has a source equal in value to pSrcName.
  48. */
  49. const FbxBindingTableEntry* GetEntryForSource(const char* pSrcName) const;
  50. /** Retrieve the table entry for the given destination value.
  51. * \param pDestName The destination value to query.
  52. * \return The corresponding entry, or NULL if no entry in
  53. * the table has a destination equal in value to pDestName.
  54. */
  55. const FbxBindingTableEntry* GetEntryForDestination(const char* pDestName) const;
  56. /*****************************************************************************************************************************
  57. ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
  58. *****************************************************************************************************************************/
  59. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  60. // Remark: This method copies the mEntries table AND clears the UserData on the resulting copy to prevent shared memory
  61. // data between clones/copies.
  62. virtual FbxObject& Copy(const FbxObject& pObject);
  63. private:
  64. FbxDynamicArray<FbxBindingTableEntry> mEntries;
  65. #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
  66. };
  67. #include <fbxsdk/fbxsdk_nsend.h>
  68. #endif /* _FBXSDK_SCENE_SHADING_BINDING_TABLE_BASE_H_ */