BsMeshImportOptions.h 3.4 KB

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