#include <functional>
#include "utils.h"
#include "configuration.h"
#include "render.h"
#include "colormaps.h"
#include "objects_geometry.h"
Go to the source code of this file.
|
| class | Object |
| | Base class of any object contained within the simulation. More...
|
| class | PhysicalObject |
| | A physical object, i.e. with physics properties (e.g. collisions) modelled by Box2D. More...
|
| class | PassiveObject |
| | Physical object without user code (i.e. passive). Can still interact with other objects (e.g. collisions, etc). More...
|
|
| Object * | object_factory (Simulation *simulation, uint16_t id, float x, float y, b2WorldId world_id, Configuration const &config, LightLevelMap *light_map, size_t userdatasize=0, std::string const &category="objects") |
| | Factory of simulation Objects. Return a constructed object from configuration.
|
| void | get_cmap_val (std::string const name, uint8_t const value, uint8_t *r, uint8_t *g, uint8_t *b) |
| | Interface to colormaps.
|
◆ get_cmap_val()
| void get_cmap_val |
( |
std::string const | name, |
|
|
uint8_t const | value, |
|
|
uint8_t * | r, |
|
|
uint8_t * | g, |
|
|
uint8_t * | b ) |
Interface to colormaps.
- Parameters
-
| name | Name of the colormap. |
| value | Value to determine the color in this colormap |
| r | Red color component |
| g | Green color component |
| b | Blue color component |
◆ object_factory()
| Object * object_factory |
( |
Simulation * | simulation, |
|
|
uint16_t | id, |
|
|
float | x, |
|
|
float | y, |
|
|
b2WorldId | world_id, |
|
|
Configuration const & | config, |
|
|
LightLevelMap * | light_map, |
|
|
size_t | userdatasize = 0, |
|
|
std::string const & | category = "objects" ) |
Factory of simulation Objects. Return a constructed object from configuration.
- Parameters
-
| simulation | Pointer to the underlying simulation. |
| world_id | The Box2D world identifier (unused in rendering). |
| config | Configuration entry describing the object properties. |
| light_map | Pointer to the global light level map. |
| userdatasize | Size of the memory block allocated for user data. |
| category | Name of the category of the object. |