20 #ifndef ANTKEEPER_PHYSICS_SPHERE_COLLIDER_HPP
21 #define ANTKEEPER_PHYSICS_SPHERE_COLLIDER_HPP
59 m_sphere{center, radius}
110 [[nodiscard]]
inline constexpr
float get_radius() const noexcept
Abstract base class for collision objects.
constexpr collider_type type() const noexcept override
Returns the collider type.
constexpr sphere_collider() noexcept=default
Constructs a sphere collider.
constexpr sphere_collider(float radius) noexcept
Constructs a sphere collider.
constexpr const math::fvec3 & get_center() const noexcept
Returns the center of the sphere, in object space.
constexpr const sphere_type & get_sphere() const noexcept
Returns the sphere shape.
geom::sphere< float > sphere_type
Sphere type.
constexpr void set_center(const math::fvec3 ¢er) noexcept
Sets the center of the sphere.
constexpr sphere_collider(const math::fvec3 ¢er, float radius) noexcept
Constructs a sphere collider.
constexpr float get_radius() const noexcept
Returns the radius of the sphere.
constexpr sphere_collider(const sphere_type &sphere) noexcept
Constructs a sphere collider from a sphere.
constexpr void set_sphere(const sphere_type &sphere) noexcept
Sets the collider's sphere.
constexpr void set_radius(float radius) noexcept
Sets the radius of the sphere.
collider_type
Collider types.
vector_type center
Hypersphere center.
T radius
Hypersphere radius.