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 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 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)
 

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 372 of file Solver.h.

◆ init_velocity_pass()

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

◆ 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 
)