Antkeeper  0.0.1
Public Types | Public Member Functions | List of all members
physics::capsule_collider Class Reference

Capsule collision object. More...

#include <capsule-collider.hpp>

Inheritance diagram for physics::capsule_collider:
physics::collider

Public Types

using capsule_type = geom::capsule< float >
 Capule type. More...
 

Public Member Functions

constexpr collider_type type () const noexcept override
 Returns the collider type. More...
 
constexpr capsule_collider (const capsule_type &capsule) noexcept
 Constructs a capsule collider from a capsule. More...
 
constexpr void set_capsule (const capsule_type &capsule) noexcept
 Sets the collider's capsule. More...
 
constexpr void set_segment (const capsule_type::segment_type &segment) noexcept
 Sets the segment of the capsule. More...
 
constexpr void set_radius (float radius) noexcept
 Sets the radius of the capsule hemispheres. More...
 
constexpr const capsule_typeget_capsule () const noexcept
 Returns the capsule shape. More...
 
constexpr const capsule_type::segment_typeget_segment () const noexcept
 Returns the segment of the capsule, in object space. More...
 
constexpr float get_radius () const noexcept
 Returns the radius of the capsule hemispheres. More...
 
constexpr capsule_collider (const capsule_type::segment_type &segment, float radius) noexcept
 Constructs a capsule collider. More...
 
constexpr capsule_collider () noexcept=default
 Constructs a capsule collider. More...
 
- Public Member Functions inherited from physics::collider
constexpr void set_layer_mask (std::uint32_t mask) noexcept
 Sets the layer mask of the collider. More...
 
void set_material (std::shared_ptr< collider_material > material) noexcept
 Sets the collider material. More...
 
constexpr std::uint32_t get_layer_mask () const noexcept
 Returns the layer mask of the collider. More...
 
constexpr const std::shared_ptr< collider_material > & get_material () const noexcept
 Returns the collider material. More...
 

Detailed Description

Capsule collision object.

Definition at line 31 of file capsule-collider.hpp.

Member Typedef Documentation

◆ capsule_type

Capule type.

Definition at line 35 of file capsule-collider.hpp.

Constructor & Destructor Documentation

◆ capsule_collider() [1/3]

constexpr physics::capsule_collider::capsule_collider ( const capsule_type capsule)
inlineexplicitconstexprnoexcept

Constructs a capsule collider from a capsule.

Parameters
capsuleCapsule shape.

Definition at line 47 of file capsule-collider.hpp.

◆ capsule_collider() [2/3]

constexpr physics::capsule_collider::capsule_collider ( const capsule_type::segment_type segment,
float  radius 
)
inlineconstexprnoexcept

Constructs a capsule collider.

Parameters
segmentCapsule line segment.
radiusCapsule hemisphere radius.

Definition at line 58 of file capsule-collider.hpp.

◆ capsule_collider() [3/3]

constexpr physics::capsule_collider::capsule_collider ( )
constexprdefaultnoexcept

Constructs a capsule collider.

Parameters
segmentCapsule line segment.
radiusCapsule hemisphere radius.

Member Function Documentation

◆ get_capsule()

constexpr const capsule_type& physics::capsule_collider::get_capsule ( ) const
inlineconstexprnoexcept

Returns the capsule shape.

Definition at line 95 of file capsule-collider.hpp.

◆ get_radius()

constexpr float physics::capsule_collider::get_radius ( ) const
inlineconstexprnoexcept

Returns the radius of the capsule hemispheres.

Definition at line 107 of file capsule-collider.hpp.

◆ get_segment()

constexpr const capsule_type::segment_type& physics::capsule_collider::get_segment ( ) const
inlineconstexprnoexcept

Returns the segment of the capsule, in object space.

Definition at line 101 of file capsule-collider.hpp.

◆ set_capsule()

constexpr void physics::capsule_collider::set_capsule ( const capsule_type capsule)
inlineconstexprnoexcept

Sets the collider's capsule.

Parameters
capsuleCapsule shape.

Definition at line 69 of file capsule-collider.hpp.

◆ set_radius()

constexpr void physics::capsule_collider::set_radius ( float  radius)
inlineconstexprnoexcept

Sets the radius of the capsule hemispheres.

Parameters
radiusCapsule hemisphere radius.

Definition at line 89 of file capsule-collider.hpp.

◆ set_segment()

constexpr void physics::capsule_collider::set_segment ( const capsule_type::segment_type segment)
inlineconstexprnoexcept

Sets the segment of the capsule.

Parameters
segmentCapsule segment, in object space.

Definition at line 79 of file capsule-collider.hpp.

◆ type()

constexpr collider_type physics::capsule_collider::type ( ) const
inlineconstexproverridevirtualnoexcept

Returns the collider type.

Implements physics::collider.

Definition at line 37 of file capsule-collider.hpp.


The documentation for this class was generated from the following file: