Class sim_block3D

Nested Relationships

Nested Types

Inheritance Relationships

Base Types

Derived Types

Class Documentation

class sim_block3D : public rer::client<sim_block3D>, public cosm::repr::base_block3D

Base class for representing blocks (i.e. things that robots carry within the arena) in a simulated environment. Blocks have both real (where they actually live in the world) and discretized locations (where they are mapped to within the arena).

Subclassed by cosm::repr::cube_block3D, cosm::repr::ramp_block3D

Public Functions

inline sim_block3D(const rtypes::type_uuid &id, const rmath::vector3d &dim, const rtypes::discretize_ratio &arena_res, const rutils::color &color, const crepr::block_type &type)
~sim_block3D(void) override = default
inline bool is_out_of_sight(void) const

Determine if the block is currently out of sight.

This should only happen if the block is being carried by a robot.

inline void move_out_of_sight(void)

Change the block’s location to something outside the visitable space in the arena when it is being carried by robot.

Protected Functions

inline virtual void update_on_pickup(const rtypes::type_uuid &robot_id, const rtypes::timestep &t, const crops::block_pickup_owner &owner) override

Update block state given that it has been picked up.