Fx2D
A C++20 2D rigid-body physics engine
Loading...
Searching...
No Matches
FxAngularLimitConstraint Class Reference

#include <Solver.h>

Inheritance diagram for FxAngularLimitConstraint:
Collaboration diagram for FxAngularLimitConstraint:

Public Member Functions

 FxAngularLimitConstraint (const std::shared_ptr< FxEntity > &e1, const std::shared_ptr< FxEntity > &e2)
void evaluate (float &C, FxVec2f &g1, FxVec2f &g2, float &gth1, float &gth2, 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 lower_limit = 0.0f
float upper_limit = FxPif
float slop = 0.01f
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

Detailed Description

Definition at line 183 of file Solver.h.

Constructor & Destructor Documentation

◆ FxAngularLimitConstraint()

FxAngularLimitConstraint::FxAngularLimitConstraint ( const std::shared_ptr< FxEntity > & e1,
const std::shared_ptr< FxEntity > & e2 )

Member Function Documentation

◆ evaluate()

void FxAngularLimitConstraint::evaluate ( float & C,
FxVec2f & g1,
FxVec2f & g2,
float & gth1,
float & gth2,
bool & active ) const
overridevirtual

Implements FxConstraint.

Member Data Documentation

◆ enabled

bool FxAngularLimitConstraint::enabled = true

Definition at line 188 of file Solver.h.

◆ lower_limit

float FxAngularLimitConstraint::lower_limit = 0.0f

Definition at line 185 of file Solver.h.

◆ slop

float FxAngularLimitConstraint::slop = 0.01f

Definition at line 187 of file Solver.h.

◆ upper_limit

float FxAngularLimitConstraint::upper_limit = FxPif

Definition at line 186 of file Solver.h.


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