User Class Reference
#include <User.h>

Constructor & Destructor Documentation
| User::User | ( | ) |
The constructor creates a new UserSetupData, initializes the Id of the user with a random number and calls the commonInit-method
| User::User | ( | UserSetupData * | setupData | ) |
The constructor calls the commonInit-method
- Parameters:
-
setupData UserSetupData to initializes the class with
| User::~User | ( | ) |
The destructor deletes the CameraTransformation-object, calls the removeAvatar-method from the WorldDatabase, deletes the avatar and deletes all associatedEntities-entries in the associatedEntities-list.
Member Function Documentation
| void User::attachCursorRepresentation | ( | ) | [protected] |
| void User::cleanup | ( | ) | [static] |
The method deletes all registered CursorTransformationModelFactories for static data
| void User::commonInit | ( | UserSetupData * | setupData | ) | [protected] |
The method initializes the class with the passed data. If the avatar-configuration file is set in the setupData then it calls the loadAvatar-method from the WorldDatabase. It initializes all transformations, calls the setCursorTransformationModel-method to set the CursorTransformationModel and creates a new CursorRepresentation-object.
| void User::detachCursorRepresentation | ( | ) | [protected] |
| bool User::dropEntity | ( | unsigned int | entityId | ) |
The method removes the Entity with the passed entityId from the list of associated Entities. The passed Id has to be the typeBasedId of the Entity!!!
- Parameters:
-
entityId typeBasedId of the Entity which should be released
- Returns:
- true if the Entity with the Id was found in the associatedEntities-list, false otherwise
| Entity * User::getAssociatedEntity | ( | unsigned int | entityId | ) |
The method returns the Entity with the passed entityId if it is found in the associatedEntity-list. The passed Id has to be equal to the typeBasedId of the Entity.
- Parameters:
-
entityId typeBasedId of the searched Entity
- Returns:
- the Entity with the passed Id if found in the associatedEntities-list, NULL otherwise
| Entity * User::getAssociatedEntityByIndex | ( | unsigned | index | ) |
| TransformationData User::getAssociatedEntityOffset | ( | unsigned int | entityId | ) |
The method returns the picking-offset of the Entity with the passed Id if it is in the associatedEntities-list. The passed Id has to be the typeBasedId of the Entity
- Parameters:
-
entityId typeBasedId of the Entity
- Returns:
- picking offset of the picked Entity if found, identityTransformation if not found
| AvatarInterface * User::getAvatar | ( | ) |
The method returns a pointer to the User's avatar
- Returns:
- pointer to the User's avatar
| std::string User::getAvatarConfigFile | ( | ) |
The method returns the URL of the configuration-file of the Avatar
- Returns:
- URL of the configuration-file of the Avatar
| CameraTransformation * User::getCamera | ( | ) |
The method returns the CameraTransformation-object which stores the transformation of the User's camera
- Returns:
- CameraTransformation of the User's camera
| CursorRepresentationInterface * User::getCursor | ( | ) |
The method returns the used CursorRepresentation
- Returns:
- CursorRepresentation which is used
| TransformationData User::getCursorTransformation | ( | ) |
The method returns the transformation of the User's cursor in world coordinates. The transformation is calculated from the CursorTransformationModel.
- Returns:
- transformation of the User's cursor in world coordinates
| CursorTransformationModel * User::getCursorTransformationModel | ( | ) |
The method returns the used CursorTransformationModel
- Returns:
- the used CursorTransformationModel
| ArgumentVector * User::getCursorTransformationModelArguments | ( | ) |
The method returns the arguments which are used for the used CursorTransformationModel
- Returns:
- a list of model-specific arguments
| TransformationData User::getNavigatedTransformation | ( | ) |
| NetworkIdentification User::getNetworkId | ( | ) |
The method returns the NetworkIdentification of the user
- Returns:
- The netID
| unsigned User::getNumberOfAssociatedEntities | ( | ) |
The method returns the ammount of Entities currently associated with the user.
- Returns:
- the amount of Entities
| TransformationData User::getTrackedHandTransformation | ( | ) |
The method returns the hand transformation relative to the navigatedTransformation. If you use a tracking system this transformation is equal to the data of your wand sensor converted into world coordinates (by multiplication with physicalToWorldScale).
- Returns:
- hand transformation of the User relative to the navigatedTransformation
| TransformationData User::getTrackedHeadTransformation | ( | ) |
The method returns the head transformation relative to the navigatedTransformation. If you use a tracking system this transformation is equal to the data of your head sensor converted into world coordinates (by multiplication with physicalToWorldScale).
- Returns:
- head transformation of the User relative to the navigatedTransformation
| TransformationData User::getTrackedSensorTransformation | ( | unsigned short | index | ) |
The method returns the transformation of the sensor with the passed index relative to the center point of your tracking system in world coordinates (= scaled by physicalToWorldScale).
- Parameters:
-
index index of the requested sensor
- Returns:
- transformation of the sensor relative to the tracking system center
| TransformationData User::getTrackedUserTransformation | ( | ) |
The method returns the transformation of the user relative to the center point of your tracking system in world coordinates (= scaled by physicalToWorldScale). This value is calculated by the UserTransformationModel.
- Returns:
- transformation of the user relative to the tracking system center
| TransformationData User::getUserHandTransformation | ( | ) |
The method returns the transformation of the user's hand relative to the user's transformation. The user's transformation is therefore calculated by the UserTransformationModel.
- Returns:
- hand transformation relative to the user transformation
| TransformationData User::getUserHeadTransformation | ( | ) |
The method returns the transformation of the user's head relative to the user's transformation. The user's transformation is therefore calculated by the UserTransformationModel.
- Returns:
- head transformation relative to the user transformation
| TransformationData User::getUserSensorTransformation | ( | unsigned short | index | ) |
The method returns the transformation of the sensor with the passed index relative to the user's transformation. The user's transformation is therefore calculated by the UserTransformationModel.
- Parameters:
-
index index of the requested sensor
- Returns:
- sensor transformation relative to the user transformation
| UserTransformationModel * User::getUserTransformationModel | ( | ) |
The method returns the used UserTransformationModel
- Returns:
- the used UserTransformationModel
| ArgumentVector * User::getUserTransformationModelArguments | ( | ) |
The method returns the arguments which are used for the used UserTransformationModel
- Returns:
- a list of model-specific arguments
| TransformationData User::getWorldHandTransformation | ( | ) |
The method returns the transformation of the User's hand in world coordinates. (navigated * tracked hand transformation)
- Returns:
- transformation of the User's hand in world coordinates
| TransformationData User::getWorldHeadTransformation | ( | ) |
The method returns the transformation of the User's head in world coordinates. (navigated * tracked head transformation)
- Returns:
- transformation of the User's head in world coordinates
| TransformationData User::getWorldSensorTransformation | ( | unsigned short | index | ) |
The method returns the transformation of the user's sensor with the passed index in world coordinates. (navigated * tracked sensor transformation)
- Parameters:
-
index index of the requested sensor
- Returns:
- transformation of the sensor in world coordinates
| TransformationData User::getWorldUserTransformation | ( | ) |
The method returns the transformation of the User in world coordinates (navigated * tracked user transformation). The needed tracked user transformation is therefore calculated by the UserTransformationModel, even if no tracking sensor is measuring the user's transformation. This transformation is usually used to display the user's avatar.
- Returns:
- the User's transformation in world coordinates
| bool User::isMoving | ( | ) |
The method returns wether the User is moving or not
- Returns:
- true if the user if moving currently, false otherwise
| bool User::loadConfig | ( | std::string | userCfgFilePath | ) |
The method loads the configuration of the User object from the passed config file. It parses the URL of the config-files for each module and calls the loadConfig-method of these modules to initialize them. It also parses the URL of the avatar config file and calls the WorldDatabase::loadAvatar-method and reads the name of the used CursorTransformationModel and calls the setCursorTransformationModel-method.
- Parameters:
-
configFile URL of the User-config file
- Returns:
- true if the config-file parsing was successfull, false otherwise
| bool User::loadCursorTransformationModelConfig | ( | std::string | configFile, | |
| User * | user | |||
| ) | [static, private] |
| bool User::loadUserTransformationModelConfig | ( | std::string | configFile, | |
| User * | user | |||
| ) | [static, private] |
| void User::pickUpEntity | ( | Entity * | entity, | |
| TransformationData | offset | |||
| ) |
| void User::registerCursorTransformationModelFactory | ( | CursorTransformationModelFactory * | factory | ) | [static] |
The method registers a CursorTransformationModelFactory to create the CursorTransformationModel configured in the User config-file
- Parameters:
-
factory CursorTransformationModelFactory for the desired CursorTransformationModel
| void User::registerUserTransformationModelFactory | ( | UserTransformationModelFactory * | factory | ) | [static] |
The method registers a UserTransformationModelFactory to create the UserTransformationModel configured in the User config-file.
- Parameters:
-
factory UserTransformationModelFactory for the desired UserTransformationModel
| void User::setCursorTransformation | ( | TransformationData & | trans | ) |
The method sets the transformation of the User's cursor in world-coordinates.
- Parameters:
-
trans transformation of the User's cursor in world coordinates
| void User::setCursorTransformationModel | ( | std::string | modelName, | |
| ArgumentVector * | arguments | |||
| ) |
The method creates the CursorTransformationModel with the passed name. It therefore iterates over every registered CursorTransformationModelFactory and calls their create-method which returns NULL if it cannot create the Model or the new Model if the factory matches to the Model. If there is already a CursorTransformationModel created then this one will be deleted and replaced by the new one. If the new Model could not be created an Error-message is printed.
- Parameters:
-
modelName name of the desired CursorTransformationModel
| void User::setHandTransformation | ( | TransformationData | hand | ) |
The method sets the transformation of the User's hand relative to the navigatedTransformation of the User. If an avatar is registered then the method also calls the setHandTransformation-method of the Avatar with the return-value of the getUserHandTransformation-method as parameter.
- Parameters:
-
hand transformation of the User's hand relative to the User's position
| void User::setHeadTransformation | ( | TransformationData | head | ) |
The method sets the transformation of the User's head relative to the navigatedTransformation of the User. If you have a tracking system then this transformation is equal to the value of the head-sensor.
- Parameters:
-
head transformation of the User's head relative to the navigatedTransformation of the User
| void User::setMoving | ( | bool | moving | ) |
| void User::setNavigatedTransformation | ( | TransformationData | navigated | ) |
The method sets the navigated transformation of the User in world coordinates. This transformation can be used to setthe camera if a tracking system is used.
- Parameters:
-
navigatedTrans navigated transformation of the user
| void User::setNetworkId | ( | NetworkIdentification * | netId | ) |
| void User::setSensorTransformation | ( | unsigned short | sensorIndex, | |
| TransformationData | transformation | |||
| ) |
The method sets the transformation of the user's sensor with the passed index. By default index 0 corresponds to the Head-sensor and index 1 to the Hand-sensor.
- Parameters:
-
sensorIndex index of the passed sensor transformation transformation value of the sensor
| void User::setUserTransformationModel | ( | std::string | modelName, | |
| ArgumentVector * | arguments | |||
| ) |
The method creates the UserTransformationModel with the passed name. It therefore iterates over every registered UserTransformationModelFactory and calls their create-method which returns NULL if it cannot create the Model or the new Model if the factory matches to the Model. If there is already a UserTransformationModel created then this one will be deleted and replaced by the new one. If the new Model could not be created an Error-message is printed.
- Parameters:
-
modelName name of the desired UserTransformationModel
| void User::updateCursor | ( | float | dt | ) | [protected] |
| void User::updateUserTransformation | ( | ) | [protected] |
The method updates the user-transformation which is the transformation of the user relative to the center point of the tracking system.
Friends And Related Function Documentation
friend class UserDatabase [friend] |
Member Data Documentation
std::vector<AssociatedEntity*> User::associatedEntities [protected] |
AvatarInterface* User::avatar [protected] |
std::string User::avatarConfigFile [protected] |
CameraTransformation* User::camera [protected] |
CursorRepresentationInterface* User::cursor [protected] |
std::string User::cursorRepresentationConfigFile [protected] |
TransformationData User::cursorTransformation [protected] |
CursorTransformationModel* User::cursorTransformationModel [protected] |
ArgumentVector* User::cursorTransformationModelArguments [protected] |
std::vector< CursorTransformationModelFactory * > User::cursorTransformationModelFactories [static, protected] |
XmlConfigurationLoader User::cursorTransXmlConfigLoader [static, private] |
unsigned User::id [protected] |
bool User::moving [protected] |
std::string User::name [protected] |
TransformationData User::navigatedTransformation [protected] |
NetworkIdentification User::networkId [protected] |
TransformationData User::sensorTransformation[MAX_NUM_SENSORS] [protected] |
TransformationData User::userTransformation [protected] |
UserTransformationModel* User::userTransformationModel [protected] |
ArgumentVector* User::userTransformationModelArguments [protected] |
std::vector< UserTransformationModelFactory * > User::userTransformationModelFactories [static, protected] |
XmlConfigurationLoader User::userTransXmlConfigLoader [static, private] |
XmlConfigurationLoader User::userXmlConfigLoader [static, private] |
The documentation for this class was generated from the following files:
Generated on Wed Oct 20 16:12:02 2010 for inVRs by
1.5.8