eris 1.4.0
A WorldForge client library.
|
#include <View.h>
Public Types | |
typedef sigc::slot< void, ViewEntity * > | EntitySightSlot |
Public Member Functions | |
View (Avatar &av) | |
ViewEntity * | getEntity (const std::string &eid) const |
Avatar & | getAvatar () const |
Entity * | getTopLevel () const |
TypeService & | getTypeService () |
Gets the TypeService attached to the view. More... | |
TypeService & | getTypeService () const |
Gets the TypeService attached to the view. More... | |
EventService & | getEventService () |
Gets the EventService used by the view. More... | |
EventService & | getEventService () const |
Gets the EventService used by the view. More... | |
void | update () |
void | registerFactory (std::unique_ptr< Factory > factory) |
double | getSimulationSpeed () const |
sigc::connection | notifyWhenEntitySeen (const std::string &eid, const EntitySightSlot &slot) |
void | dumpLookQueue () |
std::size_t | lookQueueSize () const |
void | sendLookAt (const std::string &eid) |
size_t | pruneAbandonedPendingEntities () |
Connection & | getConnection () const |
Public Attributes | |
sigc::signal< void, ViewEntity * > | EntitySeen |
sigc::signal< void, ViewEntity * > | EntityCreated |
sigc::signal< void, ViewEntity * > | EntityDeleted |
sigc::signal< void > | TopLevelEntityChanged |
emitted when the TLVE changes More... | |
sigc::signal< void, ViewEntity * > | InitialSightEntity |
Protected Member Functions | |
void | appear (const std::string &eid, double stamp) |
void | disappear (const std::string &eid) |
void | sight (const Atlas::Objects::Entity::RootEntity &ge) |
void | deleteEntity (const std::string &eid) |
void | unseen (const std::string &eid) |
bool | isPending (const std::string &eid) const |
test if the specified entity ID is pending initial sight on the View More... | |
void | addToPrediction (ViewEntity *ent) |
void | removeFromPrediction (ViewEntity *ent) |
void | taskRateChanged (Task *) |
Friends | |
class | IGRouter |
class | ViewEntity |
class | Avatar |
class | Task |
View encapsulates the set of entities currently visible to an Avatar, as well as those that have recently been seen. It receives visibility-affecting ops from the IGRouter, and uses them to update its state and emit signals.
typedef sigc::slot<void, ViewEntity*> Eris::View::EntitySightSlot |
|
protected |
|
protected |
|
protected |
|
protected |
Connection & Eris::View::getConnection | ( | ) | const |
ViewEntity * Eris::View::getEntity | ( | const std::string & | eid | ) | const |
Retrieve an entity in the view by id. Returns nullptr if no such entity exists in the view.
Definition at line 45 of file View.cpp.
Referenced by Eris::ViewEntity::getEntity().
EventService & Eris::View::getEventService | ( | ) |
Gets the EventService used by the view.
EventService & Eris::View::getEventService | ( | ) | const |
Gets the EventService used by the view.
|
inline |
TypeService & Eris::View::getTypeService | ( | ) |
Gets the TypeService attached to the view.
TypeService & Eris::View::getTypeService | ( | ) | const |
Gets the TypeService attached to the view.
|
protected |
|
inline |
sigc::connection Eris::View::notifyWhenEntitySeen | ( | const std::string & | eid, |
const EntitySightSlot & | slot | ||
) |
void Eris::View::registerFactory | ( | std::unique_ptr< Factory > | factory | ) |
|
protected |
void Eris::View::sendLookAt | ( | const std::string & | eid | ) |
|
protected |
|
protected |
Method to register and unregister tasks with with view, so they can have their progress updated automatically by update(). Only certain tasks (those with linear progress) are handled this way, but all tasks are submitted to this method.
Definition at line 134 of file View.cpp.
Referenced by Eris::ViewEntity::onTaskAdded(), and Eris::ViewEntity::task_ProgressRateChanged().
|
protected |
void Eris::View::update | ( | ) |
|
friend |
sigc::signal<void, ViewEntity*> Eris::View::EntityCreated |
sigc::signal<void, ViewEntity*> Eris::View::EntityDeleted |
sigc::signal<void, ViewEntity*> Eris::View::EntitySeen |
sigc::signal<void, ViewEntity*> Eris::View::InitialSightEntity |
sigc::signal<void> Eris::View::TopLevelEntityChanged |