#include <octree_environment.h>
|
| OctreeEnvironment () |
|
| ~OctreeEnvironment () 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 43 of file octree_environment.h.
◆ OctreeEnvironment()
bdm::OctreeEnvironment::OctreeEnvironment |
( |
| ) |
|
◆ ~OctreeEnvironment()
bdm::OctreeEnvironment::~OctreeEnvironment |
( |
| ) |
|
|
override |
◆ CheckGridGrowth()
void bdm::OctreeEnvironment::CheckGridGrowth |
( |
| ) |
|
|
private |
◆ Clear()
void bdm::OctreeEnvironment::Clear |
( |
| ) |
|
|
overridevirtual |
◆ ForEachNeighbor() [1/3]
void bdm::OctreeEnvironment::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 117 of file octree_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 88 of file octree_environment.cc.
◆ ForEachNeighbor() [3/3]
void bdm::OctreeEnvironment::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 94 of file octree_environment.cc.
◆ GetDimensions()
std::array< int32_t, 6 > bdm::OctreeEnvironment::GetDimensions |
( |
| ) |
const |
|
overridevirtual |
◆ GetDimensionThresholds()
std::array< int32_t, 2 > bdm::OctreeEnvironment::GetDimensionThresholds |
( |
| ) |
const |
|
overridevirtual |
◆ GetLoadBalanceInfo()
◆ GetNeighborMutexBuilder()
◆ RoundOffGridDimensions()
void bdm::OctreeEnvironment::RoundOffGridDimensions |
( |
const std::array< real_t, 6 > & |
grid_dimensions | ) |
|
|
private |
◆ UpdateImplementation()
void bdm::OctreeEnvironment::UpdateImplementation |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ container_
◆ grid_dimensions_
std::array<int32_t, 6> bdm::OctreeEnvironment::grid_dimensions_ |
|
private |
Cube which contains all simulation objects {x_min, x_max, y_min, y_max, z_min, z_max}
Definition at line 80 of file octree_environment.h.
◆ impl_
std::unique_ptr<UnibnImpl> bdm::OctreeEnvironment::impl_ |
|
private |
◆ threshold_dimensions_
std::array<int32_t, 2> bdm::OctreeEnvironment::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 83 of file octree_environment.h.
The documentation for this class was generated from the following files: