BsHandleSliderLine.h 690 B

1234567891011121314151617181920212223242526272829303132
  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, bool fixedScale);
  12. ~HandleSliderLine();
  13. bool intersects(const Ray& ray, float& t) const;
  14. void handleInput(const CameraHandlerPtr& camera, const Vector2I& pointerPos, const Ray& ray);
  15. Vector3 getNewPosition() const;
  16. protected:
  17. static const float CAPSULE_RADIUS;
  18. static const float SPHERE_RADIUS;
  19. Vector3 mDirection;
  20. float mLength;
  21. Capsule mCapsuleCollider;
  22. Sphere mSphereCollider;
  23. };
  24. }