BsBoxCollider.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. /** Collider with box geometry. */
  14. class BS_CORE_EXPORT BoxCollider : public Collider
  15. {
  16. public:
  17. BoxCollider();
  18. /** Sets the extents (half size) of the geometry of the box. */
  19. virtual void setExtents(const Vector3& extents) = 0;
  20. /** Gets the extents (half size) of the geometry of the box. */
  21. virtual Vector3 getExtents() const = 0;
  22. /**
  23. * Creates a new box collider.
  24. *
  25. * @param[in] extents Extents (half size) of the box.
  26. * @param[in] position Center of the box.
  27. * @param[in] rotation Rotation of the box.
  28. */
  29. static SPtr<BoxCollider> create(const Vector3& extents = Vector3::ZERO,
  30. const Vector3& position = Vector3::ZERO, const Quaternion& rotation = Quaternion::IDENTITY);
  31. };
  32. /** @} */
  33. }