Unigine::Plugins::IG::Manager Class
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
Header: | #include <plugins/UnigineIG.h> |
Manager Class
Enums
COORDINATE_SYSTEM#
DEBUG_MODE#
Name | Description |
---|---|
DEBUG_MODE_REQUEST_DEBUG = 0 | Debug mode visualizing where LOS/HAT/HOT requests are sent to. |
DEBUG_MODE_ENTITY_PATH_TRACE = 1 | Debug mode with entity path tracing - positions between frames and data sent over the network. Blue points mark data from the server; pink arrows - movement between frames. |
DEBUG_MODE_ENTITY_PATH_TRACE_TIME = 2 | Debug mode visualizing entity path tracing time. |
DEBUG_MODE_ENTITY_COLLISION_SEGMENT = 3 | Debug mode visualizing collision segments for every entity. |
DEBUG_MODE_ENTITY_COLLISION_VOLUME = 4 | Debug mode visualizing collision volumes for every entity. |
DEBUG_MODE_ENTITY_INFO = 5 | Debug mode visualizing the basis for every CIGI and DIS entity with the ID, type, and type name specified (information is taken from the IG configuration file). |
DEBUG_MODE_REGION_BOUND = 6 | Debug mode visualizing region bounds. |
Members
IGConfig * getConfig ( ) const#
Returns the IG configuration as an IGConfig class instance.Return value
IGConfig class instance containing IG configuration.void reloadConfig ( ) #
Reloads the IG Configuration file (ig_config.xml).bool loadDatabase ( int database_id ) #
Loads the database with the specified ID and sets it to be used.Arguments
- int database_id - ID of the database to be used.
Return value
true means that the database with the specified ID is loaded successfully; otherwise, false.void reloadDatabase ( ) #
Console: database_reload
Reloads the current database.void unloadDatabase ( ) #
Unloads the current database.int getCurrentDatabaseID ( ) const#
Returns the identifier of the currently loaded world database stored in the IG configuration file (ig_config.xml).Return value
Identifier of the world database, or 0, if no world is loaded.int getDatabaseID ( const char * world_name ) const#
Returns the identifier of the world database with the specified name stored in the IG configuration file (ig_config.xml).Arguments
- const char * world_name - World database name.
Return value
Identifier of the specified world database, or 0, if no world is loaded.const char * getDatabaseName ( int id ) const#
Returns the name of the world database stored in the IG configuration file (ig_config.xml).Arguments
- int id - Identifier of the world database.
Return value
The world database name.bool isDatabaseLoaded ( ) const#
Returns a value indicating if any database is currently loaded.Return value
true if any database is currently loaded; otherwise, false.SkyMap * getSkyMap ( ) const#
Returns the interface of the sky map.Return value
Sky map interface.Meteo * getMeteo ( ) const#
Returns the meteo interface.Return value
Meteo interface.SymbolsController * getSymbolsController ( ) const#
Returns the interface of the symbols controller.Return value
Symbols controller interface.LightController * getLightController ( ) const#
Returns the interface of the light controller.Return value
Light controller interface.void setCoordinateSystem ( IG::Manager::COORDINATE_SYSTEM coord_system ) #
Sets the specified coordinate system to be used.Arguments
- IG::Manager::COORDINATE_SYSTEM coord_system - Coordinate system to be set. One of the COORDINATE_SYSTEM::* values.
IG::Manager::COORDINATE_SYSTEM getCoordinateSystem ( ) #
Returns the currently used coordinate system.Return value
Coordinate system currently used.Converter * getConverter ( ) const#
Returns the converter interface.Return value
Converter interface.View * getView ( int view_id, bool auto_create ) #
Returns the interface of the specified view.Arguments
- int view_id - ID of the view.
- bool auto_create - true to automatically create the view with the specified ID if it doesn't exist yet; false - to return nullptr in case the view doesn't exist.
Return value
Pointer to the view interface if it exists; otherwise - nullptr.void getViews ( Unigine::Vector < View *> & views_ret ) const#
Returns the list of all existing views (if any).Arguments
bool removeView ( int view_id ) #
Removes the view with the specified ID.Arguments
- int view_id - ID of the view to be removed.
Return value
true if the view with the specified ID is removed successfully; otherwise - false.bool isViewExist ( int view_id ) const#
Returns a value indicating if the view with the specified ID exists.Arguments
- int view_id - ID of the view.
Return value
true if the view with the specified ID exists; otherwise - false.ViewGroup * getViewGroup ( int group_id, bool auto_create ) #
Returns the interface of the specified view group.Arguments
- int group_id - ID of the view group.
- bool auto_create - true to automatically create the view group with the specified ID if it doesn't exist yet; false - to return nullptr in case the view group doesn't exist.
Return value
Pointer to the view group interface if it exists; otherwise - nullptr.bool removeViewGroup ( int group_view_id ) #
Removes the view group with the specified ID.Arguments
- int group_view_id - ID of the view group to be removed.
Return value
true if the view group with the specified ID is removed successfully; otherwise - false.bool isViewGroupExist ( int group_view_id ) const#
Returns a value indicating if the view group with the specified ID exists.Arguments
- int group_view_id - ID of the view group.
Return value
true if the view group with the specified ID exists; otherwise - false.Entity * getEntity ( int64_t entity_id, bool auto_create ) #
Returns the interface of the specified entity.Arguments
- int64_t entity_id - ID of the entity.
- bool auto_create - true to automatically create the entity with the specified ID if it doesn't exist yet; false - to return nullptr in case the entity doesn't exist.
Return value
Pointer to the entity interface.bool removeEntity ( int64_t entity_id ) #
Removes the entity with the specified ID.Arguments
- int64_t entity_id - ID of the entity to be removed.
Return value
true if the entity with the specified ID is removed successfully; otherwise - false.bool isEntityExist ( int64_t entity_id ) const#
Returns a value indicating if the entity with the specified ID exists.Arguments
- int64_t entity_id - ID of the entity.
Return value
true if the entity with the specified ID exists; otherwise - false.void getEntities ( Unigine::Vector<Entity *> & entities_ret ) const#
Fills the list of entities with all existing entities.Arguments
Entity * findEntity ( const NodePtr & node ) const#
Returns the interface of the entity represented by the specified node.Arguments
- const NodePtr & node - Node for which an entity is to be found.
Return value
Pointer to the entity interface if it exists; otherwise - nullptr.int64_t findEntityType ( const char * type_name ) #
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
- const char * type_name - Entity type name.
Return value
Entity type ID.int findComponentID ( int entity_type, const char * name ) const#
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.
- const char * name - Component name.
Return value
Component ID.int findArticulatedPartID ( int entity_type, const char * name ) const#
Returns the identifier of an articulated part by its name and the type of the entity it belongs to, stored in the IG configuration file (ig_config.xml).Arguments
- int entity_type - Entity type identifier indicated in the IG configuration file (ig_config.xml).
- const char * name - Name of an articulated part indicated in the IG configuration file (ig_config.xml).
Return value
Identifier of an articulated part.void setInterpolation ( bool enabled ) #
Sets a value indicating if interpolation and extrapolation should be enabled for the IG.Arguments
- bool enabled - true to enable interpolation and extrapolation for the IG; false - to disable.
bool isInterpolation ( ) const#
Returns a value indicating if interpolation and extrapolation are enabled for the IG.Return value
true if interpolation and extrapolation are enabled for the IG; otherwise, false.void setInterpolationLerp ( bool 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
- bool enabled - true to enable interpolation between the current and previous frames for the IG; false - to disable.
bool isInterpolationLerp ( ) const#
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
true if interpolation between the current and previous frames is enabled for the IG; otherwise, false.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 ( ) const#
Returns the current interpolation time value for the IG.Return value
Interpolation time value, in seconds.void setInterpolationPeriod ( double time_period ) #
Sets the interpolation period value for the IG.Arguments
- double time_period - Interpolation period value, in seconds. The default value is 0.04.
double getInterpolationPeriod ( ) const#
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 time_period ) #
Sets the extrapolation period value for the IG.Arguments
- double time_period - Extrapolation period value, in seconds. The default value is 0.04.
double getExtrapolationPeriod ( ) const#
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 factor ) #
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 factor - Current interpolation lerp factor value, in seconds.
double getInterpolationLerpFactor ( ) const#
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.const ObjectTerrainGlobalPtr & getTerrain ( ) const#
Returns the currently used terrain object.Return value
Currently used terrain object.const GeodeticPivotPtr & getGeodeticPivot ( ) const#
Returns the geodetic pivot used to curve the terrain.Return value
Current geodetic pivot used to curve the terrain.bool isTerrainCurved ( ) const#
Check if the terrain is curved.Return value
true, if the terrain is curved, otherwise false.void setTerrainIntersectionMask ( int mask ) #
Sets the intersection mask that is used to define the ground/landing surface.Arguments
- int mask - Intersection mask.
int getTerrainIntersectionMask ( ) const#
Returns the intersection mask that is used to define the ground/landing surface.Return value
Intersection mask.bool getHatHot ( const Vec3 & geo_position, double & ret_hat, double & ret_hot, IGIntersection & ret_intersection ) const#
Checks if there is anything in the given geodetic position and returns HAT/HOT as well as surface normal, exact object over which the request was made, intersected surface, world coordinates of the intersection point, etc. to the specified output variables.Arguments
- const Vec3 & geo_position - Geodetic position.
- double & ret_hat - Address for the return HAT value.
- double & ret_hot - Address for the return HOT value.
- IGIntersection & ret_intersection - Information on intersection at the given geodetic position, such as exact object over which the request was made, intersected surface, world coordinates of the intersection point, etc.
Return value
true, if there is anything in the given geodetic position, otherwise false.bool getIntersection ( const Vec3 & p0, const Vec3 & p1, int mask, Unigine::Vector<IGIntersection> & ret ) const#
Checks if the ray with set points intersects with anything.Arguments
- const Vec3 & p0 - Ray origin.
- const Vec3 & p1 - Point along the ray.
- int mask - Intersection mask.
- Unigine::Vector<IGIntersection> & ret - Vector containing information on intersections.
Return value
true, if the ray intersects with anything, otherwise false.Water * getWater ( ) const#
Returns the interface of the water control.Return value
Water control interface.Unigine::Plugins::Syncker::Syncker * getSyncker ( ) const#
Returns the Syncker Interface.Return value
Pointer to the Syncker::Syncker interface.Unigine::Plugins::Syncker::Master * getSynckerMaster ( ) const#
Returns the Syncker Master Interface.Return value
Pointer to the Syncker::Master interface.Unigine::Plugins::Syncker::Slave * getSynckerSlave ( ) const#
Returns the Syncker Slave Interface.Return value
Pointer to the Syncker::Slave interface.Ptr<Node> loadNode ( const char * 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
- const char * file_path - Path to the *.node file.
Return value
Loaded node or nullptr if an error has occurred.void syncNode ( const Ptr<Node> & in_node, unsigned char 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
void synckerCreate ( const NodePtr & in_node, unsigned char mask = ~0 ) #
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
- const NodePtr & in_node - Node to create.
- unsigned char mask - Synchronization mask.
void synckerDestroy ( const NodePtr & in_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
- const NodePtr & in_node - Node to delete.
bool isSyncNode ( const NodePtr & in_node ) const#
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
- const NodePtr & in_node - Node to be checked.
Return value
true if synchronization of the given node is enabled; otherwise, false.bool checkEntityType ( int64_t entity_type ) const#
Checks if the given entity type is supported by IG.Arguments
- int64_t entity_type - Entity type identifier
Return value
true, if the given entity type is supported, otherwise false.void setCollisionVolumeMask ( int mask ) #
Sets a new collision volume mask for entities.Arguments
- int mask - New collision volume mask.
int getCollisionVolumeMask ( ) const#
Returns the current collision volume mask for entities.Return value
Current collision volume mask for entities.void setFreeze ( bool value ) #
Sets a value indicating if execution of IG logic is temporarily put on hold (paused). This method can be useful for debugging.Arguments
- bool value - true - to put on hold (pause) execution of IG logic; false - to resume execution.
bool isFreeze ( ) const#
Returns a value indicating if execution of IG logic is temporarily put on hold (paused).Return value
true, if execution of IG logic is temporarily put on hold (paused), otherwise false.void sendUserMessage ( uint8_t packet_code, const BlobPtr & send_message ) #
Sends user message from the master to a slave.Arguments
- uint8_t packet_code - Packet ID
- const BlobPtr & send_message - User message
void setOnUserMessageReceivedCallback ( uint8_t packet_code, CallbackBase * callback ) #
Executes the callback function when the user message from the master is received.Arguments
- uint8_t packet_code - Packet ID
- CallbackBase * callback - Callback function
Manager * get ( ) #
Returns the Manager interface.Return value
Pointer to the manager interface.bool isMaster ( ) const#
Returns a value indicating if the IG application is a Syncker-Master or runs in a single mode without the Syncker at all.Return value
true if the IG application is a Syncker-Master or runs in a single mode without the Syncker at all; false if the IG application is a Syncker-Slave.bool isReady ( ) const#
Returns a value indicating if all Slaves that were waited for by the IG have connected.Return value
true if all Slaves that were waited for by the IG have connected; otherwise - false.float getIFps ( ) const#
Returns the inverse FPS value (the time in seconds it took to complete the last frame). This method is similar to the Game::getIFps() but it is more preferred for multi-channel systems as it implements more accurate frame time calculation (including spike-periods).Return value
Inverse FPS value (1/FPS) - the time in seconds it took to complete the last frame, in seconds.void setDistanceScale ( float d ) #
Sets the global distance scale for all rendering distance parameters: shadow distance, light distance, LOD distances, etc. (see render_distance_scale console command) and for the IG Simplifier component. The Simplifier component can help optimize rendering of your entities. When assigned to an entity, it enables you to define which parts of its model can be neglected starting at certain distance levels (e.g., hide flaps, ailerons, and rudders at 1km, engines at 5 km, etc.) and which substitutes can be used to represent an entity at a large distance (e.g., a flashing strobe light, when the plane is just a point on the screen).This method calls the setDistanceScale() of the Render class.
Arguments
- float d - Global rendering distance scale and Simplifier component (IG LOD manager).
void setAdaptiveQualitySystemMode ( int mode ) #
Sets a new Adaptive Quality System mode. This system provides automatic real-time adjustment of levels of detail depending on current performance (render_distance_scale and simplifier_distance_scale).Arguments
- int mode - Adaptive Quality System mode to be set. One of the following values:
- 0 - real-time quality adjustment is disabled
- 1 - degradation mode only (image quality is degraded if the performance goes down)
- 2 - automatic real-time adjustment (image quality is degraded if the performance is low, and improved if the performance increases)
void destroyObjects ( ) #
Destroys all entities, views, and view groups.int getCurrentViewID ( ) const#
Returns the current ID of the view.Return value
ID of the view.void setCurrentView ( int view_id ) #
Switches to the view with the specified ID. If the view with the specifie ID does not exist, it will be created automatically.Arguments
- int view_id - ID of the view to be set as current.
void setSlaveView ( const char * slave_name, int view_id ) #
Sets a view with the specified ID to be used for the specified Slave (available for Master IG only).Arguments
- const char * slave_name - Slave name (-sync_view "").
- int view_id - ID of the view to be set as current for the specified Slave.
void setSlaveView ( int index, int view_id ) #
Sets a view with the specified ID to be used for a certain Slave by its index (available for Master IG only).Arguments
- int index - Slave index in the range from 0 to the total numer of Slaves.
- int view_id - ID of the view to be set as current for the specified Slave.
int getSlaveView ( const char * slave_name ) const#
Returns the current view ID used for a certain Slave by its name .Arguments
- const char * slave_name - Slave name.
Return value
ID of the view used for the Slave with the specified name.int getSlaveView ( int slave_index ) const#
Returns the current view ID used for a certain Slave by its index (available for Master IG only).Arguments
- int slave_index - Slave index in the range from 0 to the total numer of Slaves.
Return value
ID of the view used for the Slave with the specified index.void clearInterpolationData ( ) #
Clears all interpolation data for all entities.GeodeticsTransformer * getGeodeticsTransformer ( ) const#
Returns a pointer to the instance of the GeodeticsTransformer class if the Geodetics plugin is loaded. This class is used to transform geodetic coordinates (latitude, longitude and altitude) to the 3D world position and vice versa.const Vec3 & getGeodeticOrigin ( ) const#
Returns the coordinates of the geodetic origin.Return value
Geodetic origin coordinates.int getNumSlaves ( ) const#
Returns the total number of Slaves (available for Master IG only).Return value
Total number of IG Slaves.const char * getSlaveName ( int index ) const#
Returns Slave name by its index (available for Master IG only).Arguments
- int index - Slave index.
Return value
Name of the Slave with the specified index.const char * getSynckerName ( ) const#
Returns the current name of the IG host.Return value
Current name of the IG host.void setDebugEnabled ( bool v ) #
Console: ig_debug
Sets a value indicating if the Debug mode is enabled. This mode allows inspecting the IG application at run-timeArguments
- bool v - true - to enable the Debug mode; false - to disable it.
bool isDebugEnabled ( ) const#
Console: ig_debug
Returns a value indicating if the Debug mode is enabled. This mode allows inspecting the IG application at run-timeReturn value
true if the IG Debug mode is enabled; otherwise, false.void setDebugMode ( IG::Manager::DEBUG_MODE mode, bool enabled ) #
Sets a value indicating if the specified Debug mode is enabled. This mode allows inspecting the IG application at run-timeArguments
- IG::Manager::DEBUG_MODE mode - Debug mode type. One of the DEBUG_MODE_* values.
- bool enabled - true - to enable the specified Debug mode; false - to disable it.
bool isDebugMode ( IG::Manager::DEBUG_MODE mode ) const#
Returns a value indicating if the specified Debug mode is enabled. This mode allows inspecting the IG application at run-timeArguments
- IG::Manager::DEBUG_MODE mode - Debug mode type. One of the DEBUG_MODE_* values.
Return value
true if the specified IG Debug mode is enabled; otherwise, false.void setDebugDuration ( float time ) #
Console: ig_debug_visualizer_duration
Sets the time period during which Debug visualizer elements are displayed.Arguments
- float time - Time interval during which Debug visualizer elements are displayed, in seconds.
float getDebugDuration ( ) const#
Console: ig_debug_visualizer_duration
Returns the current time period during which Debug visualizer elements are displayed.Return value
Current time interval during which Debug visualizer elements are displayed, in seconds.void setDebugScreenspace ( bool v ) #
Console: ig_debug_visualizer_screenspace
Sets a value indicating the type of dimensions to be used when rendering Debug visualizer elements.Arguments
- bool v - Flag indicating the type of dimensions to be used:
- false - use the world space dimensions
- true - use the screen space dimensions
bool isDebugScreenspace ( ) const#
Console: ig_debug_visualizer_screenspace
Returns a value indicating the type of dimensions currently used when rendering Debug visualizer elements.Return value
Flag indicating the type of dimensions to be used:- false - use the world space dimensions
- true - use the screen space dimensions
void setDebugDepth ( bool v ) #
Console: ig_debug_visualizer_depth
Sets a value indicating if depth testing for the Debug visualizer elements is enabled (if elements should be obscured by the ones closer to the camera).Arguments
- bool v - true to enable depth testing for the Debug visualizer elements (if elements should be obscured by the ones closer to the camera); false - to disable it.
bool isDebugDepth ( ) const#
Console: ig_debug_visualizer_depth
Returns a value indicating if depth testing for the Debug visualizer elements is enabled (if elements should be obscured by the ones closer to the camera).Return value
true if depth testing for the Debug visualizer elements is enabled (if elements should be obscured by the ones closer to the camera); otherwise - false.void setDebugScale ( float v ) #
Console: ig_debug_visualizer_scale
Sets the new scale multiplier for Debug visualizer elements.Arguments
- float v - Scale multiplier for Debug visualizer elements.
float getDebugScale ( ) const#
Console: ig_debug_visualizer_scale
Returns the current scale multiplier for Debug visualizer elements.Return value
Current scale multiplier for Debug visualizer elements.float calcDebugScale ( float v ) const#
Returns the actual scale of Debug visualizer elements calculated for the specified value based on the current type of dimensions (world/screen) and the current debug scale value.Arguments
- float v - Initial scale value.
Return value
Actual scale of Debug visualizer elements calculated for the specified value. The scale is calculated based on the current debug scale value.void addOnCreateViewCallback ( void * subscriber, CallbackBase * callback ) #
Adds a callback function to be executed on creating a new view. The signature of the callback function is as follows:void(View *)
Arguments
- void * subscriber - Callback subscriber. Can be used to remove the added callback via the removeOnCreateViewCallback() method.
- CallbackBase * callback - Callback function to be executed.
void removeOnCreateViewCallback ( void * subscriber ) #
Removes a callback function for the specified subscriber from the list of callbacks to be executed on creating a new view.Arguments
- void * subscriber - Callback subscriber.
void addOnCreateViewGroupCallback ( void * subscriber, CallbackBase * callback ) #
Adds a callback function to be executed on creating a new view. The signature of the callback function is as follows:void(ViewGroup *)
Arguments
- void * subscriber - Callback subscriber. Can be used to remove the added callback via the removeOnCreateViewGroupCallback() method.
- CallbackBase * callback - Callback function to be executed.
void removeOnCreateViewGroupCallback ( void * subscriber ) #
Removes a callback function for the specified subscriber from the list of callbacks to be executed on creating a new view group.Arguments
- void * subscriber - Callback subscriber.
void addOnCreateEntityCallback ( void * subscriber, CallbackBase * callback ) #
Adds a callback function to be executed on creating a new entity. The signature of the callback function is as follows:void(IG::ICollisionVolume *volume, Unigine::ContactPtr contact, int contacted_entity, int contacted_volume)
Arguments
- void * subscriber - Callback subscriber. Can be used to remove the added callback via the removeOnCreateEntityCallback() method.
- CallbackBase * callback - Callback function to be executed.
void removeOnCreateEntityCallback ( void * subscriber ) #
Removes a callback function for the specified subscriber from the list of callbacks to be executed on creating a new entity.Arguments
- void * subscriber - Callback subscriber.
void addOnCollisionVolumeDetectedCallback ( void * subscriber, CallbackBase * callback ) #
Adds a callback function to be executed on detecting an intersection with a collision volume. The signature of the callback function is as follows:void(IG::ICollisionVolume *volume, Unigine::ContactPtr contact, int contacted_entity, int contacted_volume)
Arguments
- void * subscriber - Callback subscriber. Can be used to remove the added callback via the removeOnCollisionVolumeDetectedCallback() method.
- CallbackBase * callback - Callback function to be executed.
void removeOnCollisionVolumeDetectedCallback ( void * subscriber ) #
Removes a callback function for the specified subscriber from the list of callbacks to be executed on detecting an intersection with a collision volume.Arguments
- void * subscriber - Callback subscriber.
void addOnCollisionSegmentDetectedCallback ( void * subscriber, CallbackBase * callback ) #
Adds a callback function to be executed on detecting an intersection with a collision segment. The signature of the callback function is as follows:void(IG::ICollisionSegment *segment, Unigine::ObjectPtr object, Unigine::WorldIntersectionPtr intersection)
Arguments
- void * subscriber - Callback subscriber. Can be used to remove the added callback via the removeOnCollisionSegmentDetectedCallback() method.
- CallbackBase * callback - Callback function to be executed.
void removeOnCollisionSegmentDetectedCallback ( void * subscriber ) #
Removes a callback function for the specified subscriber from the list of callbacks to be executed on detecting an intersection with a collision segment.Arguments
- void * subscriber - Callback subscriber.
void addOnIGReadyCallback ( void * subscriber, CallbackBase * callback ) #
Adds a callback function to be executed when all Slaves that were waited for by the IG are connected. The signature of the callback function is as follows:void()
Arguments
- void * subscriber - Callback subscriber. Can be used to remove the added callback via the removeOnIGReadyCallback() method.
- CallbackBase * callback - Callback function to be executed.
void removeOnIGReadyCallback ( void * subscriber ) #
Removes a callback function for the specified subscriber from the list of callbacks to be executed when all Slaves that were waited for by the IG are connected.Arguments
- void * subscriber - Callback subscriber.
void addOnSlaveConnectedCallback ( void * subscriber, CallbackBase * callback ) #
Adds a callback function to be executed on connecting a new Slave. The signature of the callback function is as follows:void(int slave_index, const char * slave_name)
Arguments
- void * subscriber - Callback subscriber. Can be used to remove the added callback via the removeOnSlaveConnectedCallback() method.
- CallbackBase * callback - Callback function to be executed.
void removeOnSlaveConnectedCallback ( void * subscriber ) #
Removes a callback function for the specified subscriber from the list of callbacks to be executed on connecting a new Slave.Arguments
- void * subscriber - Callback subscriber.
void addOnSlaveDisconnectedCallback ( void * subscriber, CallbackBase * callback ) #
Adds a callback function to be executed on disconnecting a Slave. The signature of the callback function is as follows:void(int slave_index)
Arguments
- void * subscriber - Callback subscriber. Can be used to remove the added callback via the removeOnSlaveDisconnectedCallback() method.
- CallbackBase * callback - Callback function to be executed.
void removeOnSlaveDisconnectedCallback ( void * subscriber ) #
Removes a callback function for the specified subscriber from the list of callbacks to be executed on disconnecting a Slave.Arguments
- void * subscriber - Callback subscriber.
Last update:
2021-04-14
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)