20 #ifndef ANTKEEPER_PHYSICS_CAPSULE_COLLIDER_HPP
21 #define ANTKEEPER_PHYSICS_CAPSULE_COLLIDER_HPP
59 m_capsule{segment, radius}
107 [[nodiscard]]
inline constexpr
float get_radius() const noexcept
Capsule collision object.
constexpr capsule_collider() noexcept=default
Constructs a capsule collider.
constexpr float get_radius() const noexcept
Returns the radius of the capsule hemispheres.
constexpr void set_segment(const capsule_type::segment_type &segment) noexcept
Sets the segment of the capsule.
constexpr capsule_collider(const capsule_type &capsule) noexcept
Constructs a capsule collider from a capsule.
constexpr const capsule_type::segment_type & get_segment() const noexcept
Returns the segment of the capsule, in object space.
constexpr void set_capsule(const capsule_type &capsule) noexcept
Sets the collider's capsule.
constexpr collider_type type() const noexcept override
Returns the collider type.
constexpr capsule_collider(const capsule_type::segment_type &segment, float radius) noexcept
Constructs a capsule collider.
geom::capsule< float > capsule_type
Capule type.
constexpr const capsule_type & get_capsule() const noexcept
Returns the capsule shape.
constexpr void set_radius(float radius) noexcept
Sets the radius of the capsule hemispheres.
Abstract base class for collision objects.
collider_type
Collider types.
@ capsule
Capsule collider.
segment_type segment
Medial line segment.
T radius
Radius of the hemi-hyperspheres.
n-dimensional line segment.