#include <kd_tree_environment.h>
|
| KDTreeEnvironment () |
|
| ~KDTreeEnvironment () override |
|
std::array< int32_t, 6 > | GetDimensions () const override |
|
std::array< int32_t, 2 > | GetDimensionThresholds () const override |
|
LoadBalanceInfo * | GetLoadBalanceInfo () override |
|
NeighborMutexBuilder * | GetNeighborMutexBuilder () override |
|
void | Clear () override |
|
void | ForEachNeighbor (Functor< void, Agent *, real_t > &lambda, const Agent &query, real_t squared_radius) override |
|
void | ForEachNeighbor (Functor< void, Agent * > &lambda, const Agent &query, void *criteria) override |
|
void | ForEachNeighbor (Functor< void, Agent *, real_t > &lambda, const Real3 &query_position, real_t squared_radius, const Agent *query_agent=nullptr) override |
|
virtual | ~Environment ()=default |
|
void | MarkAsOutOfSync () |
|
void | Update () |
|
void | ForcedUpdate () |
| Updates the environment. Prefer Update() for implementations. More...
|
|
real_t | GetLargestAgentSize () const |
| Return the size of the largest agent. More...
|
|
real_t | GetLargestAgentSizeSquared () const |
|
bool | HasGrown () const |
|
Definition at line 70 of file kd_tree_environment.h.
◆ KDTreeEnvironment()
bdm::KDTreeEnvironment::KDTreeEnvironment |
( |
| ) |
|
◆ ~KDTreeEnvironment()
bdm::KDTreeEnvironment::~KDTreeEnvironment |
( |
| ) |
|
|
override |
◆ CheckGridGrowth()
void bdm::KDTreeEnvironment::CheckGridGrowth |
( |
| ) |
|
|
private |
◆ Clear()
void bdm::KDTreeEnvironment::Clear |
( |
| ) |
|
|
overridevirtual |
◆ ForEachNeighbor() [1/3]
void bdm::KDTreeEnvironment::ForEachNeighbor |
( |
Functor< void, Agent * > & |
lambda, |
|
|
const Agent & |
query, |
|
|
void * |
criteria |
|
) |
| |
|
overridevirtual |
Iterates over all neighbors in an environment that suffices the given criteria
. The criteria
is type-erased to facilitate for different criteria for different environments. Check the documentation of an environment to know the criteria data type
Implements bdm::Environment.
Definition at line 122 of file kd_tree_environment.cc.
◆ ForEachNeighbor() [2/3]
Iterates over all neighbors of a query agent that appear in a distance of less than sqrt(squared_radius). Typically, the distance is computed as the Euclidean distance in 3D environments.
Implements bdm::Environment.
Definition at line 93 of file kd_tree_environment.cc.
◆ ForEachNeighbor() [3/3]
void bdm::KDTreeEnvironment::ForEachNeighbor |
( |
Functor< void, Agent *, real_t > & |
lambda, |
|
|
const Real3 & |
query_position, |
|
|
real_t |
squared_radius, |
|
|
const Agent * |
query_agent = nullptr |
|
) |
| |
|
overridevirtual |
Iterates over all neighbors of a query position that appear in a distance of less than sqrt(squared_radius). Typically, the distance is computed as the Euclidean distance in 3D environments. Typically iterating over the neighbors of a certain agent or a certain position are fairly similar tasks. If you implement an environment, the optional argument agent_query can be used to to treat both cases in the same function, keep the implementation lean, and avoid redundant code.
Implements bdm::Environment.
Definition at line 99 of file kd_tree_environment.cc.
◆ GetDimensions()
std::array< int32_t, 6 > bdm::KDTreeEnvironment::GetDimensions |
( |
| ) |
const |
|
overridevirtual |
◆ GetDimensionThresholds()
std::array< int32_t, 2 > bdm::KDTreeEnvironment::GetDimensionThresholds |
( |
| ) |
const |
|
overridevirtual |
◆ GetLoadBalanceInfo()
◆ GetNeighborMutexBuilder()
◆ RoundOffGridDimensions()
void bdm::KDTreeEnvironment::RoundOffGridDimensions |
( |
const std::array< real_t, 6 > & |
grid_dimensions | ) |
|
|
private |
◆ UpdateImplementation()
void bdm::KDTreeEnvironment::UpdateImplementation |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ grid_dimensions_
std::array<int32_t, 6> bdm::KDTreeEnvironment::grid_dimensions_ |
|
private |
Cube which contains all simulation objects {x_min, x_max, y_min, y_max, z_min, z_max}
Definition at line 106 of file kd_tree_environment.h.
◆ impl_
◆ nf_adapter_
◆ threshold_dimensions_
std::array<int32_t, 2> bdm::KDTreeEnvironment::threshold_dimensions_ |
|
private |
Stores the min / max dimension value that need to be surpassed in order to trigger a diffusion grid change
Definition at line 109 of file kd_tree_environment.h.
The documentation for this class was generated from the following files: