#include <floor_entity.h>
Classes | |
class | CFloorColorSource |
Public Types | |
enum | EColorSource { UNSET = 0 , FROM_IMAGE , FROM_LOOP_FUNCTIONS } |
Public Types inherited from argos::CEntity | |
typedef std::vector< CEntity * > | TVector |
A vector of entities. More... | |
typedef unordered_map< std::string, CEntity * > | TMap |
A map of entities. More... | |
typedef std::multimap< std::string, CEntity * > | TMultiMap |
A multi-map of entities. More... | |
Public Member Functions | |
ENABLE_VTABLE () | |
CFloorEntity () | |
Class constructor. More... | |
CFloorEntity (const std::string &str_id, UInt32 un_pixels_per_meter) | |
Class constructor. More... | |
virtual | ~CFloorEntity () |
Class destructor. More... | |
virtual void | Init (TConfigurationNode &t_tree) |
Initializes the entity from an XML tree. More... | |
virtual void | Reset () |
Restores the initial state of the floor. More... | |
CColor | GetColorAtPoint (Real f_x, Real f_y) |
Returns the color at the given point. More... | |
bool | HasChanged () const |
Returns true if the floor color has changed. More... | |
void | SetChanged () |
Marks the floor color as changed. More... | |
void | ClearChanged () |
Marks the floor color as not changed. More... | |
virtual std::string | GetTypeDescription () const |
Saves the current floor color to the given file. More... | |
Public Member Functions inherited from argos::CEntity | |
ENABLE_VTABLE () | |
CEntity (CComposableEntity *pc_parent) | |
Class constructor. More... | |
CEntity (CComposableEntity *pc_parent, const std::string &str_id) | |
Class constructor. More... | |
virtual | ~CEntity () |
Class destructor. More... | |
virtual void | Destroy () |
Destroys the entity, undoing whatever was done by Init() or by the standalone constructor. More... | |
const std::string & | GetId () const |
Returns the id of this entity. More... | |
std::string | GetContext () const |
Returns the context of this entity. More... | |
bool | HasParent () const |
Returns true if this entity has a parent. More... | |
CEntity & | GetRootEntity () |
Returns the root entity containing this entity. More... | |
const CEntity & | GetRootEntity () const |
Returns the root entity containing this entity. More... | |
CComposableEntity & | GetParent () |
Returns this entity's parent. More... | |
const CComposableEntity & | GetParent () const |
Returns this entity's parent. More... | |
void | SetParent (CComposableEntity &c_parent) |
Sets this entity's parent. More... | |
virtual void | Update () |
Updates the state of this entity. More... | |
ssize_t | GetIndex () const |
Returns the entity index. More... | |
void | SetIndex (ssize_t n_idx) |
Sets the entity index. More... | |
bool | IsEnabled () const |
Returns true if the entity is enabled. More... | |
void | Enable () |
Enables the entity. More... | |
void | Disable () |
Disables the entity. More... | |
virtual void | SetEnabled (bool b_enabled) |
Enables or disables an entity. More... | |
TConfigurationNode * | GetConfigurationNode () |
Returns a pointer to the configuration node that was used to create this entity. More... | |
Public Member Functions inherited from argos::CBaseConfigurableResource | |
virtual | ~CBaseConfigurableResource () |
Class destructor. More... | |
Public Member Functions inherited from argos::EnableVTableFor< CEntity > | |
size_t | GetTagHelper (const DERIVED *) const |
Definition at line 21 of file floor_entity.h.
Enumerator | |
---|---|
UNSET | |
FROM_IMAGE | |
FROM_LOOP_FUNCTIONS |
Definition at line 46 of file floor_entity.h.
argos::CFloorEntity::CFloorEntity | ( | ) |
Class constructor.
It is meant to be used in conjuction with the Init() method.
Definition at line 172 of file floor_entity.cpp.
argos::CFloorEntity::CFloorEntity | ( | const std::string & | str_id, |
UInt32 | un_pixels_per_meter | ||
) |
Class constructor.
Creates a floor with the given id and the given image file as color source. The given path can include environment variables, which are expanded internally. Class constructor. Creates a floor with the given id, using the loop functions as color source.
Definition at line 197 of file floor_entity.cpp.
|
virtual |
Class destructor.
Definition at line 207 of file floor_entity.cpp.
|
inline |
Marks the floor color as not changed.
Definition at line 129 of file floor_entity.h.
argos::CFloorEntity::ENABLE_VTABLE | ( | ) |
Returns the color at the given point.
f_x | The x coordinate on the floor |
f_y | The y coordinate on the floor |
Definition at line 99 of file floor_entity.h.
|
inlinevirtual |
Saves the current floor color to the given file.
Used by the OpenGL visualization to create a texture. The type of the file is inferred from the extension of the passed path.
str_path | The path of the output file. |
Reimplemented from argos::CEntity.
Definition at line 143 of file floor_entity.h.
|
inline |
Returns true
if the floor color has changed.
It is mainly used by the OpenGL visualization to know when to create a new texture.
true
if the floor color has changed. Definition at line 113 of file floor_entity.h.
|
virtual |
Initializes the entity from an XML tree.
Reimplemented from argos::CEntity.
Definition at line 216 of file floor_entity.cpp.
|
virtual |
Restores the initial state of the floor.
Reimplemented from argos::CEntity.
Definition at line 253 of file floor_entity.cpp.
|
inline |