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

Plane collision object. More...

#include <plane-collider.hpp>

Inheritance diagram for physics::plane_collider:
physics::collider

Public Types

using plane_type = geom::plane< float >
 Plane type. More...
 

Public Member Functions

constexpr collider_type type () const noexcept override
 Returns the collider type. More...
 
constexpr plane_collider (const plane_type &plane) noexcept
 Constructs a plane collider from a plane. More...
 
constexpr plane_collider (const math::fvec3 &normal, const math::fvec3 &offset) noexcept
 Constructs a plane collider from a normal and offset. More...
 
constexpr void set_plane (const plane_type &plane) noexcept
 Sets the collider's plane. More...
 
constexpr void set_normal (const math::fvec3 &normal) noexcept
 Sets the plane normal. More...
 
constexpr void set_constant (float constant) noexcept
 Sets the plane constant. More...
 
constexpr const plane_typeget_plane () const noexcept
 Returns the plane shape. More...
 
constexpr const math::fvec3get_normal () const noexcept
 Returns the plane normal, in object space. More...
 
constexpr float get_constant () const noexcept
 Returns the plane constant. More...
 
constexpr plane_collider (const math::fvec3 &normal, float constant) noexcept
 Constructs a plane collider from a normal and constant. More...
 
constexpr plane_collider (const math::fvec3 &normal) noexcept
 Constructs a plane collider from a normal and constant. More...
 
constexpr plane_collider () noexcept=default
 Constructs a plane collider from a normal and constant. 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

Plane collision object.

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

Member Typedef Documentation

◆ plane_type

Plane type.

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

Constructor & Destructor Documentation

◆ plane_collider() [1/5]

constexpr physics::plane_collider::plane_collider ( const plane_type plane)
inlineexplicitconstexprnoexcept

Constructs a plane collider from a plane.

Parameters
planePlane shape.

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

◆ plane_collider() [2/5]

constexpr physics::plane_collider::plane_collider ( const math::fvec3 normal,
float  constant 
)
inlineconstexprnoexcept

Constructs a plane collider from a normal and constant.

Parameters
normalPlane normal, in object space.
constantPlane constant.

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

◆ plane_collider() [3/5]

constexpr physics::plane_collider::plane_collider ( const math::fvec3 normal)
inlineexplicitconstexprnoexcept

Constructs a plane collider from a normal and constant.

Parameters
normalPlane normal, in object space.
constantPlane constant.

Definition at line 61 of file plane-collider.hpp.

◆ plane_collider() [4/5]

constexpr physics::plane_collider::plane_collider ( )
constexprdefaultnoexcept

Constructs a plane collider from a normal and constant.

Parameters
normalPlane normal, in object space.
constantPlane constant.

◆ plane_collider() [5/5]

constexpr physics::plane_collider::plane_collider ( const math::fvec3 normal,
const math::fvec3 offset 
)
inlineconstexprnoexcept

Constructs a plane collider from a normal and offset.

Parameters
normalPlane normal, in object space.
offsetOffset from the origin, in object space.

Definition at line 73 of file plane-collider.hpp.

Member Function Documentation

◆ get_constant()

constexpr float physics::plane_collider::get_constant ( ) const
inlineconstexprnoexcept

Returns the plane constant.

Definition at line 120 of file plane-collider.hpp.

◆ get_normal()

constexpr const math::fvec3& physics::plane_collider::get_normal ( ) const
inlineconstexprnoexcept

Returns the plane normal, in object space.

Definition at line 114 of file plane-collider.hpp.

◆ get_plane()

constexpr const plane_type& physics::plane_collider::get_plane ( ) const
inlineconstexprnoexcept

Returns the plane shape.

Definition at line 108 of file plane-collider.hpp.

◆ set_constant()

constexpr void physics::plane_collider::set_constant ( float  constant)
inlineconstexprnoexcept

Sets the plane constant.

Parameters
constantPlane constant.

Definition at line 102 of file plane-collider.hpp.

◆ set_normal()

constexpr void physics::plane_collider::set_normal ( const math::fvec3 normal)
inlineconstexprnoexcept

Sets the plane normal.

Parameters
normalPlane normal, in object space.

Definition at line 92 of file plane-collider.hpp.

◆ set_plane()

constexpr void physics::plane_collider::set_plane ( const plane_type plane)
inlineconstexprnoexcept

Sets the collider's plane.

Parameters
planePlane shape.

Definition at line 82 of file plane-collider.hpp.

◆ type()

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

Returns the collider type.

Implements physics::collider.

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


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