|
Fx2D
A C++20 2D rigid-body physics engine
|
#include <Solver.h>
Inheritance diagram for FxAngleLockConstraint:
Collaboration diagram for FxAngleLockConstraint:Public Member Functions | |
| FxAngleLockConstraint (const std::shared_ptr< FxEntity > &e1, const std::shared_ptr< FxEntity > &e2, float tgt=0.0f) | |
| void | evaluate (float &C, FxVec2f &g1, FxVec2f &g2, float >h1, float >h2, bool &active) const override |
Public Member Functions inherited from FxConstraint | |
| void | set_stiffness (double k) |
| void | setCompliance (double c) |
| void | resolve (double dt) |
| const std::string & | get_name () const |
| const std::shared_ptr< FxEntity > & | get_entity1 () const |
| const std::shared_ptr< FxEntity > & | get_entity2 () const |
| std::string | get_entity1_name () const |
| std::string | get_entity2_name () const |
| virtual | ~FxConstraint ()=default |
Public Attributes | |
| float | target = 0.0f |
| bool | enabled = true |
Additional Inherited Members | |
Protected Attributes inherited from FxConstraint | |
| std::string | m_name |
| double | compliance = 1e-7 |
| bool | carries_velocity = true |
| std::shared_ptr< FxEntity > | entity1 |
| std::shared_ptr< FxEntity > | entity2 |
| FxAngleLockConstraint::FxAngleLockConstraint | ( | const std::shared_ptr< FxEntity > & | e1, |
| const std::shared_ptr< FxEntity > & | e2, | ||
| float | tgt = 0.0f |
||
| ) |
|
overridevirtual |
Implements FxConstraint.