Class block_cluster
Defined in File block_cluster.hpp
Inheritance Relationships
Base Types
public cosm::repr::grid2D_view_entity< cads::arena_grid, cads::arena_grid::const_view >
(Template Class grid2D_view_entity)public cosm::foraging::metrics::block_cluster_metrics
(Class block_cluster_metrics)public rer::client< block_cluster >
Class Documentation
-
class block_cluster : public cosm::repr::grid2D_view_entity<cads::arena_grid, cads::arena_grid::const_view>, public cosm::foraging::metrics::block_cluster_metrics, public rer::client<block_cluster>
Represents a cluster of blocks in the arena as an entity for use during block distribution.
A cluster is defined as:
The 2D area in which the blocks reside.
The blocks distributed in that area.
The maximum capacity of the cluster.
Public Types
-
using grid2D_view_entity_type = crepr::grid2D_view_entity<cads::arena_grid, cads::arena_grid::const_view>
Public Functions
-
inline explicit block_cluster(const block_cluster_params ¶ms)
-
inline block_cluster(const rtypes::type_uuid &id, const cads::arena_grid::const_view &view, const rtypes::discretize_ratio &resolution, size_t capacity)
-
inline const cds::block3D_vectorro &blocks(void) const
-
void blocks_recalc(void)
-
inline size_t capacity(void) const
-
inline virtual rtypes::type_uuid id(void) const override
Return the UUID of the cluster.
-
inline virtual size_t n_blocks(void) const override
Return the total # of blocks within the specified cluster this timestep.
-
inline virtual rmath::vector2d ranchor2D(void) const override
The real-valued anchor point of the custer.
-
void update_after_drop(const crepr::sim_block3D *dropped)
-
void update_after_pickup(const rtypes::type_uuid &pickup_id)
-
inline virtual rmath::ranged xrspan(void) const override
The extent of the cluster in X (NOT the dimensions).
-
inline virtual rmath::ranged yrspan(void) const override
The extent of the cluster in Y (NOT the dimensions).