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

Describes the collision response of a collider. More...

#include <collider-material.hpp>

Public Member Functions

constexpr void set_restitution (float restitution) noexcept
 Sets the of restitution of the material. More...
 
constexpr void set_static_friction (float friction) noexcept
 Sets the static friction of the material. More...
 
constexpr void set_dynamic_friction (float friction) noexcept
 Sets the dynamic friction of the material. More...
 
constexpr void set_restitution_combine_mode (restitution_combine_mode mode) noexcept
 Sets the restitution combine mode of the material. More...
 
constexpr void set_friction_combine_mode (friction_combine_mode mode) noexcept
 Sets the friction combine mode of the material. More...
 
constexpr void set_density (float density) noexcept
 Sets the density of the material. More...
 
constexpr float get_restitution () const noexcept
 Returns the restitution of the material. More...
 
constexpr float get_static_friction () const noexcept
 Returns the static friction of the material. More...
 
constexpr float get_dynamic_friction () const noexcept
 Returns the dynamic friction of the material. More...
 
constexpr restitution_combine_mode get_restitution_combine_mode () const noexcept
 Returns the restitution combine mode. More...
 
constexpr friction_combine_mode get_friction_combine_mode () const noexcept
 Returns the friction combine mode. More...
 
constexpr float get_density () const noexcept
 Returns the density of the material. More...
 
constexpr collider_material (float restitution, float static_friction, float dynamic_friction) noexcept
 Constructs a collider material. More...
 
constexpr collider_material () noexcept=default
 Constructs a collider material. More...
 

Detailed Description

Describes the collision response of a collider.

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

Constructor & Destructor Documentation

◆ collider_material() [1/2]

constexpr physics::collider_material::collider_material ( float  restitution,
float  static_friction,
float  dynamic_friction 
)
inlineconstexprnoexcept

Constructs a collider material.

Parameters
restitutionRestitution value.
static_frictionStatic friction value.
dynamic_frictionDynamic friction value.

Definition at line 42 of file collider-material.hpp.

◆ collider_material() [2/2]

constexpr physics::collider_material::collider_material ( )
constexprdefaultnoexcept

Constructs a collider material.

Parameters
restitutionRestitution value.
static_frictionStatic friction value.
dynamic_frictionDynamic friction value.

Member Function Documentation

◆ get_density()

constexpr float physics::collider_material::get_density ( ) const
inlineconstexprnoexcept

Returns the density of the material.

Definition at line 141 of file collider-material.hpp.

◆ get_dynamic_friction()

constexpr float physics::collider_material::get_dynamic_friction ( ) const
inlineconstexprnoexcept

Returns the dynamic friction of the material.

Definition at line 123 of file collider-material.hpp.

◆ get_friction_combine_mode()

constexpr friction_combine_mode physics::collider_material::get_friction_combine_mode ( ) const
inlineconstexprnoexcept

Returns the friction combine mode.

Definition at line 135 of file collider-material.hpp.

◆ get_restitution()

constexpr float physics::collider_material::get_restitution ( ) const
inlineconstexprnoexcept

Returns the restitution of the material.

Definition at line 111 of file collider-material.hpp.

◆ get_restitution_combine_mode()

constexpr restitution_combine_mode physics::collider_material::get_restitution_combine_mode ( ) const
inlineconstexprnoexcept

Returns the restitution combine mode.

Definition at line 129 of file collider-material.hpp.

◆ get_static_friction()

constexpr float physics::collider_material::get_static_friction ( ) const
inlineconstexprnoexcept

Returns the static friction of the material.

Definition at line 117 of file collider-material.hpp.

◆ set_density()

constexpr void physics::collider_material::set_density ( float  density)
inlineconstexprnoexcept

Sets the density of the material.

Parameters
densityMaterial density.

Definition at line 105 of file collider-material.hpp.

◆ set_dynamic_friction()

constexpr void physics::collider_material::set_dynamic_friction ( float  friction)
inlineconstexprnoexcept

Sets the dynamic friction of the material.

Parameters
frictionDynamic friction value.

Definition at line 75 of file collider-material.hpp.

◆ set_friction_combine_mode()

constexpr void physics::collider_material::set_friction_combine_mode ( friction_combine_mode  mode)
inlineconstexprnoexcept

Sets the friction combine mode of the material.

Parameters
modeFriction combine mode.

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

◆ set_restitution()

constexpr void physics::collider_material::set_restitution ( float  restitution)
inlineconstexprnoexcept

Sets the of restitution of the material.

Parameters
restitutionRestitution value.

Definition at line 55 of file collider-material.hpp.

◆ set_restitution_combine_mode()

constexpr void physics::collider_material::set_restitution_combine_mode ( restitution_combine_mode  mode)
inlineconstexprnoexcept

Sets the restitution combine mode of the material.

Parameters
modeRestitution combine mode.

Definition at line 85 of file collider-material.hpp.

◆ set_static_friction()

constexpr void physics::collider_material::set_static_friction ( float  friction)
inlineconstexprnoexcept

Sets the static friction of the material.

Parameters
frictionStatic friction value.

Definition at line 65 of file collider-material.hpp.


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