Spring constraint.
More...
#include <spring-constraint.hpp>
Spring constraint.
Definition at line 32 of file spring-constraint.hpp.
◆ attach_a()
Attaches the spring to body a.
- Parameters
-
body_a | Body to which the spring should be attached. |
point_a | Point on body a, in body-space, at which the spring should be attached. |
Definition at line 43 of file spring-constraint.hpp.
◆ attach_b()
Attaches the spring to body b.
- Parameters
-
body_b | Body to which the spring should be attached. |
point_b | Point on body b, in body-space, at which the spring should be attached. |
Definition at line 55 of file spring-constraint.hpp.
◆ detach()
constexpr void physics::spring_constraint::detach |
( |
| ) |
|
|
inlineconstexprnoexcept |
◆ detach_a()
constexpr void physics::spring_constraint::detach_a |
( |
| ) |
|
|
inlineconstexprnoexcept |
◆ detach_b()
constexpr void physics::spring_constraint::detach_b |
( |
| ) |
|
|
inlineconstexprnoexcept |
◆ get_body_a()
constexpr rigid_body* physics::spring_constraint::get_body_a |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ get_body_b()
constexpr rigid_body* physics::spring_constraint::get_body_b |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ get_damping()
constexpr float physics::spring_constraint::get_damping |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ get_point_a()
constexpr const math::fvec3& physics::spring_constraint::get_point_a |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns the point at which the spring is attached to body a, in body-space.
Definition at line 129 of file spring-constraint.hpp.
◆ get_point_b()
constexpr const math::fvec3& physics::spring_constraint::get_point_b |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns the point at which the spring is attached to body b, in body-space.
Definition at line 135 of file spring-constraint.hpp.
◆ get_resting_length()
constexpr float physics::spring_constraint::get_resting_length |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ get_stiffness()
constexpr float physics::spring_constraint::get_stiffness |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ set_damping()
constexpr void physics::spring_constraint::set_damping |
( |
float |
damping | ) |
|
|
inlineconstexprnoexcept |
◆ set_resting_length()
constexpr void physics::spring_constraint::set_resting_length |
( |
float |
length | ) |
|
|
inlineconstexprnoexcept |
Sets the resting length of the spring.
- Parameters
-
length | Resting length, in meters. |
Definition at line 91 of file spring-constraint.hpp.
◆ set_stiffness()
constexpr void physics::spring_constraint::set_stiffness |
( |
float |
stiffness | ) |
|
|
inlineconstexprnoexcept |
Sets the stiffness constant of the spring.
- Parameters
-
stiffness | Stiffness constant. |
Definition at line 101 of file spring-constraint.hpp.
◆ solve()
void physics::spring_constraint::solve |
( |
float |
dt | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files: