BsHandleSliderLine.h 770 B

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include "BsHandleSlider.h"
  4. #include "BsCapsule.h"
  5. #include "BsSphere.h"
  6. namespace BansheeEngine
  7. {
  8. class BS_ED_EXPORT HandleSliderLine : public HandleSlider
  9. {
  10. public:
  11. HandleSliderLine(const Vector3& direction, float length, float snapValue, bool fixedScale);
  12. ~HandleSliderLine();
  13. bool intersects(const Ray& ray, float& t) const;
  14. void update(const HCamera& camera, const Vector2I& pointerPos, const Ray& ray);
  15. float getDelta() const { return mDelta; }
  16. Vector3 getNewPosition() const;
  17. protected:
  18. void reset();
  19. static const float CAPSULE_RADIUS;
  20. static const float SPHERE_RADIUS;
  21. Vector3 mDirection;
  22. float mLength;
  23. Capsule mCapsuleCollider;
  24. Sphere mSphereCollider;
  25. float mDelta;
  26. };
  27. }