#include <lights.h>
Public Member Functions | |
| AlternatingDualRayOfLightObject (float x, float y, ObjectGeometry &geom, LightLevelMap *light_map, int16_t value, float ray_half_width=0.1f, float angular_speed=3.0f, float long_white_frame_dur=1.0f, float short_white_frame_dur=0.03f, int16_t white_frame_val=32767, std::string const &category="objects") | |
| AlternatingDualRayOfLightObject (Simulation *simulation, float x, float y, LightLevelMap *light_map, Configuration const &config, std::string const &category="objects") | |
| void | render (SDL_Renderer *, b2WorldId) const override |
| Renders the object on the given SDL renderer. | |
| void | launch_user_step (float t) override |
| Launches the user-defined step function. | |
| void | update_light_map (LightLevelMap &l) |
| Public Member Functions inherited from Object | |
| Object (float _x, float _y, ObjectGeometry &_geom, std::string const &_category="objects") | |
| Constructs an Object. | |
| Object (Simulation *simulation, float _x, float _y, Configuration const &config, std::string const &_category="objects") | |
| Constructs an Object from a configuration entry. | |
| virtual | ~Object () |
| Destructor. | |
| void | init (b2WorldId world_id) |
| Launch virtual function 'do_init' that will perform base initialization (e.g. create Box2D objects). | |
| bool | is_initialized () const noexcept |
| Check if the object was correctly initialized yet. | |
| ObjectGeometry * | get_geometry () |
| Return the object's geometry. | |
| virtual void | move (float x, float y, float theta=NAN) |
| Move the object to a given coordinate. | |
| virtual bool | is_tangible () const |
| Returns whether this object is tangible (e.g. collisions, etc) or not. | |
| virtual void | serialize_base_values (DataLogger *data_logger, double t) |
| Save base values of the object into a data logger row. | |
| virtual void | create_serialization_fields (DataLogger *data_logger) |
| Create serialization fields of the data logger. | |
| virtual arena_polygons_t | generate_contours (std::size_t points_per_contour=0) const |
| Return one or more polygonal contours that represent the geometry of the object. | |
Protected Member Functions | |
| void | parse_configuration (Configuration const &config, Simulation *simulation) override |
| Parse a provided configuration and set associated members values. | |
| Protected Member Functions inherited from Object | |
| virtual void | do_init (b2WorldId world_id) |
| Perform the base initialization (e.g. create Box2D objects). Called once by init(world_id). | |
Additional Inherited Members | |
| Public Attributes inherited from Object | |
| float | x |
| X position. | |
| float | y |
| Y position. | |
| float | theta |
| Orientation (in rad). | |
| std::string | category |
| Category of the object. | |
| Protected Attributes inherited from Object | |
| ObjectGeometry * | geom |
| Geometry of the object. | |
| AlternatingDualRayOfLightObject::AlternatingDualRayOfLightObject | ( | float | x, |
| float | y, | ||
| ObjectGeometry & | geom, | ||
| LightLevelMap * | light_map, | ||
| int16_t | value, | ||
| float | ray_half_width = 0.1f, | ||
| float | angular_speed = 3.0f, | ||
| float | long_white_frame_dur = 1.0f, | ||
| float | short_white_frame_dur = 0.03f, | ||
| int16_t | white_frame_val = 32767, | ||
| std::string const & | category = "objects" ) |
| AlternatingDualRayOfLightObject::AlternatingDualRayOfLightObject | ( | Simulation * | simulation, |
| float | x, | ||
| float | y, | ||
| LightLevelMap * | light_map, | ||
| Configuration const & | config, | ||
| std::string const & | category = "objects" ) |
|
overridevirtual |
Launches the user-defined step function.
| t | current simulation time |
Reimplemented from Object.
|
overrideprotectedvirtual |
Parse a provided configuration and set associated members values.
| config | Configuration entry describing the object properties. |
Reimplemented from Object.
|
inlineoverridevirtual |
Renders the object on the given SDL renderer.
| renderer | Pointer to the SDL_Renderer. |
| world_id | The Box2D world identifier (unused in rendering). |
Implements Object.
| void AlternatingDualRayOfLightObject::update_light_map | ( | LightLevelMap & | l | ) |