BsSphereCollider.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 "BsCollider.h"
  6. #include "BsVector3.h"
  7. #include "BsQuaternion.h"
  8. namespace BansheeEngine
  9. {
  10. /** @addtogroup Physics
  11. * @{
  12. */
  13. /** A collider with sphere geometry. */
  14. class BS_CORE_EXPORT SphereCollider : public Collider
  15. {
  16. public:
  17. SphereCollider();
  18. /** Sets the radius of the sphere geometry. */
  19. virtual void setRadius(float radius) = 0;
  20. /** Gets the radius of the sphere geometry. */
  21. virtual float getRadius() const = 0;
  22. /**
  23. * Creates a new sphere collider.
  24. *
  25. * @param[in] radius Radius of the sphere geometry.
  26. * @param[in] position Position of the collider.
  27. * @param[in] rotation Rotation of the collider.
  28. */
  29. static SPtr<SphereCollider> create(float radius = 0.0f, const Vector3& position = Vector3::ZERO,
  30. const Quaternion& rotation = Quaternion::IDENTITY);
  31. };
  32. /** @} */
  33. }