BsMeshImportOptions.h 3.1 KB

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