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

Box collision object. More...

#include <box-collider.hpp>

Inheritance diagram for physics::box_collider:
physics::collider

Public Types

using box_type = geom::box< float >
 Box type. More...
 

Public Member Functions

constexpr collider_type type () const noexcept override
 Returns the collider type. More...
 
constexpr box_collider (const box_type &box) noexcept
 Constructs a box collider from a box. More...
 
constexpr void set_box (const box_type &box) noexcept
 Sets the collider's box. More...
 
constexpr void set_min (const math::fvec3 &min) noexcept
 Sets the minimum extent of the box. More...
 
constexpr void set_max (const math::fvec3 &max) noexcept
 Sets the maximum extent of the box. More...
 
constexpr const box_typeget_box () const noexcept
 Returns the box shape. More...
 
constexpr const math::fvec3get_min () const noexcept
 Returns the minimum extent of the box, in object space. More...
 
constexpr const math::fvec3get_max () const noexcept
 Returns the maximum extent of the box, in object space. More...
 
constexpr box_collider (const math::fvec3 &min, const math::fvec3 &max) noexcept
 Constructs a box collider. More...
 
constexpr box_collider () noexcept=default
 Constructs a box 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

Box collision object.

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

Member Typedef Documentation

◆ box_type

Box type.

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

Constructor & Destructor Documentation

◆ box_collider() [1/3]

constexpr physics::box_collider::box_collider ( const box_type box)
inlineexplicitconstexprnoexcept

Constructs a box collider from a box.

Parameters
boxBox shape.

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

◆ box_collider() [2/3]

constexpr physics::box_collider::box_collider ( const math::fvec3 min,
const math::fvec3 max 
)
inlineconstexprnoexcept

Constructs a box collider.

Parameters
minMinimum extent of the box, in object space.
maxMaximum extent of the box, in object space.

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

◆ box_collider() [3/3]

constexpr physics::box_collider::box_collider ( )
constexprdefaultnoexcept

Constructs a box collider.

Parameters
minMinimum extent of the box, in object space.
maxMaximum extent of the box, in object space.

Member Function Documentation

◆ get_box()

constexpr const box_type& physics::box_collider::get_box ( ) const
inlineconstexprnoexcept

Returns the box shape.

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

◆ get_max()

constexpr const math::fvec3& physics::box_collider::get_max ( ) const
inlineconstexprnoexcept

Returns the maximum extent of the box, in object space.

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

◆ get_min()

constexpr const math::fvec3& physics::box_collider::get_min ( ) const
inlineconstexprnoexcept

Returns the minimum extent of the box, in object space.

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

◆ set_box()

constexpr void physics::box_collider::set_box ( const box_type box)
inlineconstexprnoexcept

Sets the collider's box.

Parameters
boxBox shape.

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

◆ set_max()

constexpr void physics::box_collider::set_max ( const math::fvec3 max)
inlineconstexprnoexcept

Sets the maximum extent of the box.

Parameters
maxMaximum extent of the box, in object space.

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

◆ set_min()

constexpr void physics::box_collider::set_min ( const math::fvec3 min)
inlineconstexprnoexcept

Sets the minimum extent of the box.

Parameters
minMinimum extent of the box, in object space.

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

◆ type()

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

Returns the collider type.

Implements physics::collider.

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


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