BsMeshImportOptions.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #pragma once
  2. #include "BsCorePrerequisites.h"
  3. #include "BsImportOptions.h"
  4. namespace BansheeEngine
  5. {
  6. /**
  7. * @brief Contains import options you may use to control how is a mesh imported
  8. * from some external format into engine format.
  9. */
  10. class BS_CORE_EXPORT MeshImportOptions : public ImportOptions
  11. {
  12. public:
  13. MeshImportOptions();
  14. /**
  15. * @brief Sets whether the texture data is also stored in CPU memory.
  16. */
  17. void setCPUReadable(bool readable) { mCPUReadable = readable; }
  18. /**
  19. * @brief Retrieves whether the texture data is also stored in CPU memory.
  20. */
  21. bool getCPUReadable() const { return mCPUReadable; }
  22. /**
  23. * @brief Sets a value that controls should mesh normals be imported
  24. * if available.
  25. */
  26. void setImportNormals(bool import) { mImportNormals = import; }
  27. /**
  28. * @brief Retrieves a value that controls should mesh normals be imported
  29. * if available.
  30. */
  31. bool getImportNormals() const { return mImportNormals; }
  32. /**
  33. * @brief Sets a value that controls should mesh tangent/bitangent be imported
  34. * if available.
  35. */
  36. void setImportTangents(bool import) { mImportTangents = import; }
  37. /**
  38. * @brief Retrieves a value that controls should mesh tangent/bitangent be imported
  39. * if available.
  40. */
  41. bool getImportTangents() const { return mImportTangents; }
  42. /**
  43. * @brief Sets a value that controls should mesh blend shapes be imported
  44. * if available.
  45. */
  46. void setImportBlendShapes(bool import) { mImportBlendShapes = import; }
  47. /**
  48. * @brief Retrieves a value that controls should mesh blend shapes be imported
  49. * if available.
  50. */
  51. bool getImportBlendShapes() const { return mImportBlendShapes; }
  52. /**
  53. * @brief Sets a value that controls should mesh skin data like bone weights,
  54. * indices and bind poses be imported if available.
  55. */
  56. void setImportSkin(bool import) { mImportSkin = import; }
  57. /**
  58. * @brief Retrieves a value that controls should mesh skin data like bone weights,
  59. * indices and bind poses be imported if available.
  60. */
  61. bool getImportSkin() const { return mImportSkin; }
  62. /**
  63. * @brief Sets a value that controls should animation clips be imported if available.
  64. */
  65. void setImportAnimation(bool import) { mImportAnimation = import; }
  66. /**
  67. * @brief Retrieves a value that controls should animation clips be imported if available.
  68. */
  69. bool getImportAnimation() const { return mImportAnimation; }
  70. /**
  71. * @brief Sets a value that will uniformly scale the imported mesh by the specified value.
  72. */
  73. void setImportScale(float import) { mImportScale = import; }
  74. /**
  75. * @brief Retrieves a value that will uniformly scale the imported mesh by the specified value.
  76. */
  77. float getImportScale() const { return mImportScale; }
  78. /************************************************************************/
  79. /* SERIALIZATION */
  80. /************************************************************************/
  81. public:
  82. friend class MeshImportOptionsRTTI;
  83. static RTTITypeBase* getRTTIStatic();
  84. virtual RTTITypeBase* getRTTI() const override;
  85. private:
  86. bool mCPUReadable;
  87. bool mImportNormals;
  88. bool mImportTangents;
  89. bool mImportBlendShapes;
  90. bool mImportSkin;
  91. bool mImportAnimation;
  92. float mImportScale;
  93. };
  94. }