Antkeeper  0.0.1
Public Member Functions | List of all members
physics::collider Class Referenceabstract

Abstract base class for collision objects. More...

#include <collider.hpp>

Inheritance diagram for physics::collider:
physics::box_collider physics::capsule_collider physics::mesh_collider physics::plane_collider physics::sphere_collider

Public Member Functions

virtual constexpr collider_type type () const noexcept=0
 Returns the collider type. More...
 
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

Abstract base class for collision objects.

Definition at line 33 of file collider.hpp.

Member Function Documentation

◆ get_layer_mask()

constexpr std::uint32_t physics::collider::get_layer_mask ( ) const
inlineconstexprnoexcept

Returns the layer mask of the collider.

Definition at line 60 of file collider.hpp.

◆ get_material()

constexpr const std::shared_ptr<collider_material>& physics::collider::get_material ( ) const
inlineconstexprnoexcept

Returns the collider material.

Definition at line 66 of file collider.hpp.

◆ set_layer_mask()

constexpr void physics::collider::set_layer_mask ( std::uint32_t  mask)
inlineconstexprnoexcept

Sets the layer mask of the collider.

Parameters
mask32-bit layer mask in which each set bit represents a layer with which the collider can interact.

Definition at line 46 of file collider.hpp.

◆ set_material()

void physics::collider::set_material ( std::shared_ptr< collider_material material)
inlinenoexcept

Sets the collider material.

Definition at line 54 of file collider.hpp.

◆ type()

virtual constexpr collider_type physics::collider::type ( ) const
constexprpure virtualnoexcept

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