Fx2D
A C++20 2D rigid-body physics engine
Loading...
Searching...
No Matches
Solver.h File Reference
#include <algorithm>
#include <cstdint>
#include <memory>
#include <vector>
#include "Fx2D/Math.h"
Include dependency graph for Solver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  FxSatResult
struct  FxSolverBodies
struct  FxContactSolverData
struct  FxContact
 Contact data produced by the narrow phase and solver. More...
struct  FxHeldContact
class  FxConstraint
 Base type for solver constraints. More...
class  FxAngularLimitConstraint
class  FxAngleLockConstraint
class  FxAnchorConstraint
class  FxSeparationConstraint
class  FxDistanceConstraint
class  FxMotionAlongAxisConstraint
class  FxContactGraph
struct  FxContactBatch

Namespaces

namespace  FxSolver

Functions

bool FxSolver::contact_is_solvable (const FxContact &contact)
bool FxSolver::contact_point_touches (const FxContact &contact, size_t i)
bool FxSolver::aabb_overlap_check (const FxEntity &entity1, const FxEntity &entity2)
bool FxSolver::aabb_overlap_check (const std::shared_ptr< FxEntity > &entity1, const std::shared_ptr< FxEntity > &entity2)
const FxContact FxSolver::collision_check (const FxEntity &entity1, const FxEntity &entity2)
const FxContact FxSolver::collision_check (const std::shared_ptr< FxEntity > &entity1, const std::shared_ptr< FxEntity > &entity2)
FxContact FxSolver::speculative_contact_check (const std::shared_ptr< FxEntity > &entity1, const std::shared_ptr< FxEntity > &entity2, float substep_dt)
void FxSolver::hold_contact (FxHeldContact &held, const FxContact &contact)
bool FxSolver::remeasure_contact (FxHeldContact &held)
void FxSolver::resolve_penetration (const FxContact &contact, double dt=0.016f)
void FxSolver::init_velocity_pass (FxContact &contact, FxContactSolverData &data, const FxSolverBodies &bodies)
void FxSolver::batch_append (FxContactBatch &batch, const FxContact &contact, const FxContactSolverData &data, uint32_t contact_index)
void FxSolver::resolve_velocities_batched (FxContactBatch &batch, std::size_t begin, std::size_t end, FxSolverBodies &bodies, int slots)
void FxSolver::batch_write_back (const FxContactBatch &batch, std::vector< FxContact > &contacts)
void FxSolver::warm_start (FxContact &contact, const FxContactSolverData &data, FxSolverBodies &bodies)

Variables

constexpr float FxSolver::kContactPointApart = 1e-4f