The functionality described in this article is not available in the Community SDK edition.
You should upgrade to- Sim
SDK edition to use it.
You should upgrade to
Manager Class
Members
IGConfig * getConfig ( ) #
Returns the IG configuration as an IGConfig class instance.Return value
IGConfig class instance containing IG configuration.bool loadDatabase ( int datatbase_id ) #
Loads the database with the specified ID and sets it to be used.Arguments
- int datatbase_id - ID of the database to be used.
Return value
true means that the database with the specified ID is loaded successfully; otherwise, false.bool isDatabaseLoaded ( ) #
Returns a value indicating if any database is currently loaded.Return value
true if any database is currently loaded; otherwise, false.getSkyMap ( ) #
Returns the interface of the sky map.Return value
Sky map interface.getMeteo ( ) #
Returns the meteo interface.Return value
Meteo interface.getSymbolsController ( ) #
Returns the interface of the symbols controller.Return value
Symbols controller interface.getLightController ( ) #
Returns the interface of the light controller.Return value
Light controller interface.void setCoordinateSystem ( int coord_system ) #
Sets the specified coordinate system to be used.Arguments
- int coord_system - Coordinate system to be set. One of the COORDINATE_SYSTEM::* values.
int getCoordinateSystem ( ) #
Returns the currently used coordinate system.Return value
Coordinate system currently used.getConverter ( ) #
Returns the converter interface.Return value
Converter interface.getView ( int view_id ) #
Returns the interface of the specified view.The specified view will be created, if it doesn't exist yet.
Arguments
- int view_id - ID of the view.
Return value
getViewGroup ( int group_id ) #
Returns the interface of the specified view group.The specified view group will be created, if it doesn't exist yet.
Arguments
- int group_id - ID of the view group.
Return value
getEntity ( int entity_id ) #
Returns the interface of the specified entity.The specified entity will be created, if it doesn't exist yet.
Arguments
- int entity_id - ID of the entity.
Return value
void getEntities ( Unigine::Vector<Entity *> & entities_ret ) #
Fills the list of entities with all existing entities.Arguments
int isEntity ( int entity_id ) #
Returns a value indicating if an entity with the specified ID exists.Arguments
- int entity_id - ID of the entity.
Return value
1 if an entity with the specified ID exists; otherwise, 0.findEntity ( const Unigine::NodePtr & node ) #
Returns the interface of the entity represented by the specified node.Arguments
- const Unigine::NodePtr & node - Node for which an entity is to be found.
Return value
int findEntityType ( ) #
Returns the ID of the entity type by its name. Entity type ID and name define the type of the entity to be used for a specific instance and are set in the entity definition section of the IG configuration file as follows:<entity_types>
<entity id="111" name="b52">
</entity>
</entity_types>
Arguments
Return value
Entity type ID.int findComponentID ( int entity_type ) #
Returns the ID of the component with the given name, which belongs to the specified entity type.Arguments
- int entity_type - Entity type ID.
Entity type ID is defined in the entity definition section of the IG configuration file.
Return value
Component ID.void setPlayer ( int view_id ) #
Sets the view with the given ID as a current one.Arguments
- int view_id - ID of the view to be set.
void setInterpolation ( int enabled ) #
Sets a value indicating if interpolation and extrapolation should be enabled for the IG.Arguments
- int enabled - 1 to enable interpolation and extrapolation for the IG; 0 - to disable.
int isInterpolation ( ) #
Returns a value indicating if interpolation and extrapolation are enabled for the IG.Return value
1 if interpolation and extrapolation are enabled for the IG; otherwise, 0.void setInterpolationLerp ( int enabled ) #
Sets a value indicating if interpolation between the current and previous frames should be enabled for the IG to tackle the problem of lost packets between the IG and hosts.Arguments
- int enabled - 1 to enable interpolation between the current and previous frames for the IG; 0 - to disable.
int isInterpolationLerp ( ) #
Returns a value indicating if interpolation between the current and previous frames is enabled for the IG to tackle the problem of lost packets between the IG and hosts.Return value
1 if interpolation between the current and previous frames is enabled for the IG; otherwise, 0.void setInterpolationTime ( double current_time ) #
Sets the interpolation time value for the IG.Arguments
- double current_time - Current interpolation time value, in seconds.
double getInterpolationTime ( ) #
Returns the current interpolation time value for the IG.Return value
Interpolation time value, in seconds.void setInterpolationPeriod ( double period ) #
Sets the interpolation period value for the IG.Arguments
- double period - Interpolation period value, in seconds. The default value is 0.04.
double getInterpolationPeriod ( ) #
Returns the current interpolation period value for the IG.Return value
Interpolation period value, in seconds. The default value is 0.04.void setExtrapolationPeriod ( double period ) #
Sets the extrapolation period value for the IG.Arguments
- double period - Extrapolation period value, in seconds. The default value is 0.04.
int getExtrapolationPeriod ( ) #
Returns the current extrapolation period value for the IG.Return value
Extrapolation period value, in seconds. The default value is 0.2.void setInterpolationLerpFactor ( double current_time ) #
Sets the interpolation lerp factor value for the IG. The lower the value the smoother movement will be, but it will feel like objects move underwater or in a jelly, higher values result in higher positioning accuracy (objects positions will be closer to actual ones for the current frame), but objects will move with a noticeable jitter.Frame-to-frame interpolation mode must be enabled.
Arguments
- double current_time - Current interpolation lerp factor value, in seconds.
double getInterpolationLerpFactor ( ) #
Returns the current interpolation lerp factor value for the IG. The lower the value the smoother movement will be, but it will feel like objects move underwater or in a jelly, higher values result in higher positioning accuracy (objects positions will be closer to actual ones for the current frame), but objects will move with a noticeable jitter.Frame-to-frame interpolation mode must be enabled.
Return value
Interpolation lerp factor value.getTerrain ( ) #
Returns the currently used terrain object.Return value
getGeodeticPivot ( ) #
Returns the geodetic pivot used to curve the terrain.Return value
getSyncker ( ) #
Returns the Syncker Interface.Return value
Pointer to the Syncker::Syncker interface.getSynckerMaster ( ) #
Returns the Syncker Master Interface.Return value
getSynckerSlave ( ) #
Returns the Syncker Slave Interface.Return value
Node LoadNode ( string file_path ) #
Loads a node from the specified file to the world on the Master and all Slaves. This is a network analogue of the loadNode() method of the World class.This is a safe analogue of the Syncker method loadNode() that has an internal check if this method runs on the master and if Syncker is running.
Arguments
- string file_path - Path to the *.node file.
Return value
Loaded node or nullptr if an error has occurred.void syncNode ( Node node, byte sync_mask = ~0 ) #
Enables synchronization of parameters of the given node via the UDP protocol. Scene nodes are not synchronized by default, this method is used to add a particular node to the synchronization queue.This is a safe analogue of the Syncker method addSyncNode() that has an internal check if this method runs on the master and if Syncker is running. If this method is called on a slave, it does nothing.
Arguments
- Node node - Node to synchronize.
- byte sync_mask - Synchronization mask.
bool SynckerCreate ( Node node ) #
Synchronizes creation of the given node on all Slaves. This method is to be called after node creation on the Master. It is recommended to use the loadNode() method whenever possible as this approach allows adding nodes of all types, unlike the synckerCreate() method that supports only a limited number of them.This is a safe analogue of the Syncker method createNode() that has an internal check if this method runs on the master and if Syncker is running. If this method is called on a slave, it does nothing.
Arguments
- Node node - Node to create.
Return value
true if the node was created successfully; otherwise, false.void SynckerDestroy ( Node node ) #
Synchronizes deletion of the given node (with all its children) on the Master and all Slaves.This is a safe analogue of the Syncker method deleteNode() that has an internal check if this method runs on the master and if Syncker is running. If this method is called on a slave, it does nothing.
Arguments
- Node node - Node to delete.
bool IsSyncNode ( Node node ) #
Returns a value indicating if synchronization of the given node is enabled. Using this method you can quickly check if a node is monitored by the Syncker (node's states are dispatched to Slaves over the network).This is a safe analogue of the Syncker method isSyncNode() that has an internal check if this method runs on the master and if Syncker is running. If this method is called on a slave, it does nothing.
Arguments
- Node node - Node to be checked.
Return value
true if synchronization of the given node is enabled; otherwise, false.Last update:
2020-12-19
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)