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

Dynamic broad-phase tree used to find candidate pairs. More...

#include <AABBTree.h>

Public Member Functions

 FxAABBTree ()=default
 
int32_t insert (int32_t entity_id, const FxAABB &tight)
 
void remove (int32_t node_idx)
 
bool update (int32_t node_idx, const FxAABB &new_tight)
 
void query_pairs (std::vector< std::pair< int32_t, int32_t > > &out) const
 
const FxAABBTreeNode & node (int32_t idx) const
 
FxAABBTreeNode & node (int32_t idx)
 
bool empty () const
 

Detailed Description

Dynamic broad-phase tree used to find candidate pairs.

Definition at line 26 of file AABBTree.h.

Constructor & Destructor Documentation

◆ FxAABBTree()

FxAABBTree::FxAABBTree ( )
default

Member Function Documentation

◆ empty()

bool FxAABBTree::empty ( ) const
inline

Definition at line 73 of file AABBTree.h.

◆ insert()

int32_t FxAABBTree::insert ( int32_t  entity_id,
const FxAABB &  tight 
)
inline

Definition at line 31 of file AABBTree.h.

◆ node() [1/2]

FxAABBTreeNode & FxAABBTree::node ( int32_t  idx)
inline

Definition at line 72 of file AABBTree.h.

◆ node() [2/2]

const FxAABBTreeNode & FxAABBTree::node ( int32_t  idx) const
inline

Definition at line 71 of file AABBTree.h.

◆ query_pairs()

void FxAABBTree::query_pairs ( std::vector< std::pair< int32_t, int32_t > > &  out) const
inline

Definition at line 62 of file AABBTree.h.

◆ remove()

void FxAABBTree::remove ( int32_t  node_idx)
inline

Definition at line 41 of file AABBTree.h.

◆ update()

bool FxAABBTree::update ( int32_t  node_idx,
const FxAABB &  new_tight 
)
inline

Definition at line 48 of file AABBTree.h.


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