BsProjectSettings.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include "BsDegree.h"
  4. namespace BansheeEngine
  5. {
  6. class BS_ED_EXPORT ProjectSettings
  7. {
  8. public:
  9. float getMoveHandleSnap() const { return mMoveSnap; }
  10. Degree getRotationHandleSnap() const { return mRotationSnap; }
  11. float getScaleHandleSnap() const { return mScaleSnap; }
  12. UINT32 getGridSize() const { return mGridSize; }
  13. float getGridSpacing() const { return mGridAxisSpacing; }
  14. UINT32 getGridMajorAxisSpacing() const { return mGridMajorAxisSpacing; }
  15. UINT32 getGridAxisMarkerSpacing() const { return mGridAxisMarkerSpacing; }
  16. float getHandleSize() const { return mHandleSize; }
  17. void setMoveHandleSnap(float value) { mMoveSnap = value; }
  18. void setRotationHandleSnap(Degree value) { mRotationSnap = value; }
  19. void setScaleHandleSnap(float value) { mScaleSnap = value; }
  20. void setGridSize(UINT32 value) { mGridSize = value; }
  21. void setGridSpacing(float value) { mGridAxisSpacing = value; }
  22. void setGridMajorAxisSpacing(UINT32 value) { mGridMajorAxisSpacing = value; }
  23. void setGridAxisMarkerSpacing(UINT32 value) { mGridMajorAxisSpacing = value; }
  24. void setHandleSize(float value) { mHandleSize = value; }
  25. private:
  26. float mMoveSnap = 0.1f;
  27. Degree mRotationSnap = Degree(20.0f);
  28. float mScaleSnap = 0.1f;
  29. UINT32 mGridSize = 256;
  30. float mGridAxisSpacing = 1.0f;
  31. UINT32 mGridMajorAxisSpacing = 10;
  32. UINT32 mGridAxisMarkerSpacing = 25;
  33. float mHandleSize = 20.0f;
  34. };
  35. }