#include <TraplasObject.h>
Inheritance diagram for TraplasObject:
Public Member Functions | |
TraplasObject () | |
virtual int | getId () |
virtual int | getType () |
virtual void | setDescription (string descript) |
virtual bool | select () |
virtual bool | isSelected () |
virtual osg::Node * | getModel () |
virtual osg::Vec3d | getPosition () |
virtual string | toString () |
bool | setLabel (shared_ptr< string > desc) |
void | initLabel () |
Protected Member Functions | |
virtual | ~TraplasObject () |
Protected Attributes | |
int | id |
int | type |
bool | selected |
string | description |
osg::Node * | model |
osg::Geode * | label |
This class contains the basic functionality shared by Cargo, Infrastructure and Transport resources.
Definition at line 79 of file TraplasObject.h.
|
Definition at line 86 of file TraplasObject.cpp. |
|
Definition at line 88 of file TraplasObject.cpp. |
|
Function to get the ID of a TraplasObject.
Definition at line 86 of file TraplasObject.h. References id. |
|
Function to get the OSG-model for this object.
Definition at line 111 of file TraplasObject.h. References model. Referenced by StateControl::arc(), StateControl::drv(), StateControl::load(), StateControl::newcarg(), StateControl::rmcarg(), select(), StateControl::trdel(), and StateControl::unload(). |
|
Virtual function to get the (relative) position of a TraplasObject.
Definition at line 115 of file TraplasObject.cpp. References model. Referenced by StateControl::drv(), and StateControl::trnew(). |
|
Function to get the type of the object.
Definition at line 91 of file TraplasObject.h. References type. |
|
Initialises the label and places it under the AutoTransform of the resource.
Definition at line 90 of file TraplasObject.cpp. References FONTSIZE_LABELS, label, and model. Referenced by StateControl::location(), StateControl::newcarg(), and StateControl::trnew(). |
|
Virtual function to see if this object has been selected.
Definition at line 106 of file TraplasObject.h. References selected. Referenced by StateControl::load(), StateControl::rmcarg(), UserInterface::selectionAction(), StateControl::setspdinviz(), StateControl::trdel(), and StateControl::unload(). |
|
Function to (de)select this object.
Definition at line 129 of file TraplasObject.cpp. References getModel(), and selected. Referenced by StateControl::selectObject(). Here is the call graph for this function: ![]() |
|
Function to set the description of this object.
Definition at line 124 of file TraplasObject.cpp. References description, and model. Referenced by Cargo::Cargo(), Infrastructure::Infrastructure(), StateControl::location(), StateControl::newcarg(), Transport::Transport(), and StateControl::trnew(). |
|
Sets the label for this model.
Definition at line 146 of file TraplasObject.cpp. References label. Referenced by StateControl::location(), StateControl::newcarg(), and StateControl::trnew(). |
|
Reimplemented in Cargo, Transport, and Infrastructure. Definition at line 153 of file TraplasObject.cpp. Referenced by StateControl::deselectObject(), StateControl::selectObject(), and StateControl::updateHudText(). |
|
Definition at line 140 of file TraplasObject.h. Referenced by setDescription(), Infrastructure::toString(), Transport::toString(), and Cargo::toString(). |
|
Definition at line 137 of file TraplasObject.h. Referenced by Cargo::Cargo(), getId(), Infrastructure::Infrastructure(), and Transport::Transport(). |
|
Definition at line 142 of file TraplasObject.h. Referenced by initLabel(), and setLabel(). |
|
Definition at line 141 of file TraplasObject.h. Referenced by Cargo::Cargo(), getModel(), getPosition(), Infrastructure::Infrastructure(), initLabel(), setDescription(), and Transport::Transport(). |
|
Definition at line 139 of file TraplasObject.h. Referenced by Cargo::Cargo(), Infrastructure::Infrastructure(), isSelected(), select(), and Transport::Transport(). |
|
Definition at line 138 of file TraplasObject.h. Referenced by Cargo::Cargo(), getType(), Infrastructure::Infrastructure(), and Transport::Transport(). |