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

Functions

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

Variables

constexpr float kContactPointApart = 1e-4f

Function Documentation

◆ aabb_overlap_check() [1/2]

bool FxSolver::aabb_overlap_check ( const FxEntity & entity1,
const FxEntity & entity2 )

◆ aabb_overlap_check() [2/2]

bool FxSolver::aabb_overlap_check ( const std::shared_ptr< FxEntity > & entity1,
const std::shared_ptr< FxEntity > & entity2 )

◆ batch_append()

void FxSolver::batch_append ( FxContactBatch & batch,
const FxContact & contact,
const FxContactSolverData & data,
uint32_t contact_index )

◆ batch_write_back()

void FxSolver::batch_write_back ( const FxContactBatch & batch,
std::vector< FxContact > & contacts )

◆ collision_check() [1/2]

const FxContact FxSolver::collision_check ( const FxEntity & entity1,
const FxEntity & entity2 )

◆ collision_check() [2/2]

const FxContact FxSolver::collision_check ( const std::shared_ptr< FxEntity > & entity1,
const std::shared_ptr< FxEntity > & entity2 )

◆ contact_is_solvable()

bool FxSolver::contact_is_solvable ( const FxContact & contact)
inline

Definition at line 412 of file Solver.h.

◆ contact_point_touches()

bool FxSolver::contact_point_touches ( const FxContact & contact,
size_t i )
inline

Definition at line 421 of file Solver.h.

◆ hold_contact()

void FxSolver::hold_contact ( FxHeldContact & held,
const FxContact & contact )

◆ init_velocity_pass()

void FxSolver::init_velocity_pass ( FxContact & contact,
FxContactSolverData & data,
const FxSolverBodies & bodies )

◆ remeasure_contact()

bool FxSolver::remeasure_contact ( FxHeldContact & held)

◆ resolve_penetration()

void FxSolver::resolve_penetration ( const FxContact & contact,
double dt = 0.016f )

◆ resolve_velocities_batched()

void FxSolver::resolve_velocities_batched ( FxContactBatch & batch,
std::size_t begin,
std::size_t end,
FxSolverBodies & bodies,
int slots )

◆ speculative_contact_check()

FxContact FxSolver::speculative_contact_check ( const std::shared_ptr< FxEntity > & entity1,
const std::shared_ptr< FxEntity > & entity2,
float substep_dt )

◆ warm_start()

void FxSolver::warm_start ( FxContact & contact,
const FxContactSolverData & data,
FxSolverBodies & bodies )

Variable Documentation

◆ kContactPointApart

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

Definition at line 420 of file Solver.h.