Pogosim
Loading...
Searching...
No Matches
AlternatingDualRayOfLightObject Class Reference

#include <lights.h>

Inheritance diagram for AlternatingDualRayOfLightObject:
Object

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.
ObjectGeometryget_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 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.

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
ObjectGeometrygeom
 Geometry of the object.

Constructor & Destructor Documentation

◆ AlternatingDualRayOfLightObject() [1/2]

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() [2/2]

AlternatingDualRayOfLightObject::AlternatingDualRayOfLightObject ( Simulation * simulation,
float x,
float y,
LightLevelMap * light_map,
Configuration const & config,
std::string const & category = "objects" )

Member Function Documentation

◆ launch_user_step()

void AlternatingDualRayOfLightObject::launch_user_step ( float f)
overridevirtual

Launches the user-defined step function.

Parameters
tcurrent simulation time

Reimplemented from Object.

◆ parse_configuration()

void AlternatingDualRayOfLightObject::parse_configuration ( Configuration const & config,
Simulation * simulation )
overrideprotectedvirtual

Parse a provided configuration and set associated members values.

Parameters
configConfiguration entry describing the object properties.

Reimplemented from Object.

◆ render()

void AlternatingDualRayOfLightObject::render ( SDL_Renderer * renderer,
b2WorldId world_id ) const
inlineoverridevirtual

Renders the object on the given SDL renderer.

Parameters
rendererPointer to the SDL_Renderer.
world_idThe Box2D world identifier (unused in rendering).

Implements Object.

◆ update_light_map()

void AlternatingDualRayOfLightObject::update_light_map ( LightLevelMap & l)

The documentation for this class was generated from the following files: