This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
编程
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

IG::ManagerInterface Class

Header: #include <IGInterface.h>

This class represents the IG Manager interface.

Notice
IG plugin must be loaded.

ManagerInterface Class

Members


const char * getConfigPath ( ) #

Returns the path to the IG configuration file (ig_config.xml).

Return value

Path to the IG configuration file (ig_config.xml).

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.

int getDatabaseID ( ) #

Returns the ID of the database currently used.

Return value

ID of the database currently used.

bool isDatabaseLoaded ( ) #

Returns a value indicating if any database is currently loaded.

Return value

true if any database is currently loaded; otherwise, false.

ISkyMap * getSkyMap ( ) #

Returns the interface of the sky map.

Return value

Sky map interface.

IMeteo * getMeteo ( ) #

Returns the meteo interface.

Return value

Meteo interface.

ISymbolsController * getSymbolsController ( ) #

Returns the interface of the symbols controller.

Return value

Symbols controller interface.

ILightController * 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 getCoordinateSystem ( ) #

Returns the currently used coordinate system.

Return value

Coordinate system currently used.

IConverter * getConverter ( ) #

Returns the converter interface.

Return value

Converter interface.

IView * getView ( int view_id ) #

Returns the interface of the specified view.
Notice
The specified view will be created, if it doesn't exist yet.

Arguments

  • int view_id - ID of the view.

Return value

Pointer to the view interface.

IViewGroup * getViewGroup ( int group_id ) #

Returns the interface of the specified view group.
Notice
The specified view group will be created, if it doesn't exist yet.

Arguments

  • int group_id - ID of the view group.

Return value

Pointer to the view group interface.

IEntity * getEntity ( int entity_id ) #

Returns the interface of the specified entity.
Notice
The specified entity will be created, if it doesn't exist yet.

Arguments

  • int entity_id - ID of the entity.

Return value

Pointer to the entity interface.

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.

IEntity * 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

Pointer to the entity interface.

int findEntityType ( const char * type_name ) #

Returns the entity type ID by its name.
Notice
Entity type IDs are defined in the entity definition section of the IG configuration file.

Arguments

  • const char * type_name - Entity type name.

Return value

Entity type ID.

int findComponentID ( int entity_type, const char * name ) #

Returns the ID of the component with the given name, which belongs to the specified entity type.

Arguments

  • int entity_type - Entity type ID.
    Notice
    Entity type IDs are defined in the entity definition section of the IG configuration file.
  • const char * name - Component name.

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 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.
Notice
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.
Notice
Frame-to-frame interpolation mode must be enabled.

Return value

Interpolation lerp factor value.

const Unigine::ObjectTerrainGlobalPtr & getTerrain ( ) #

Returns the currently used terrain object.

Return value

Currently used terrain object.

const Unigine::GeodeticPivotPtr & getGeodeticPivot ( ) #

Returns the geodetic pivot used to curve the terrain.

Return value

Current geodetic pivot used to curve the terrain.

Unigine::Syncker::MasterInterface * getSynckerMaster ( ) #

Returns the Syncker Master Interface.

Return value

Pointer to the Syncker::MasterInterface interface.

int getCurrentDatabaseID ( ) #

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 ) #

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 ) #

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.

int64_t getEntityType ( uint8_t kind, uint8_t domain, uint16_t country, uint8_t cat, uint8_t subcat, uint8_t spec, uint8_t extra ) #

Returns the entity type identifier based on the given arguments.

Arguments

  • uint8_t kind - Entity kind
  • uint8_t domain - Domain
  • uint16_t country - Country
  • uint8_t cat - Category
  • uint8_t subcat - Sub Category
  • uint8_t spec - Specific
  • uint8_t extra - Extra

Return value

Entity type identifier

bool checkEntityType ( int64_t entity_type ) #

Checks if the given entity type is supported by IG.

Arguments

  • int64_t entity_type - Entity type identifier

Return value

1, if the given entity type is supported, otherwise 0.

int findArticulatedPartID ( int entity_type, const char * name ) #

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 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.

int isTerrainCurved ( ) #

Check if the terrain is curved.

Return value

1, if the terrain is curved, otherwise 0.

void setTerrainIntersectionMask ( int mask ) #

Sets the intersection mask that is used to define the ground/landing surface.

Arguments

  • int mask - Intersection mask.

int getTerrainIntersectionMask ( ) #

Returns the intersection mask that is used to define the ground/landing surface.

Return value

Intersection mask.

bool getHatHot ( const Vec3 & geo_position, vec3 & ret_normal, double & ret_hat, double & ret_hot, int & ret_material_code ) #

Checks if there is anything in the given geodetic position and returns HAT/HOT, surface normal of the terrain and code of the terrain material to the corresponding values.

Arguments

  • const Vec3 & geo_position - Geodetic position.
  • vec3 & ret_normal - Address for the return value of the surface normal.
  • double & ret_hat - Address for the return HAT value.
  • double & ret_hot - Address for the return HOT value.
  • int & ret_material_code - Address for the return material code of the terrain.

Return value

1, if there is anything in the given geodetic position, otherwise 0.

bool getIntersection ( const Vec3 & p0, const Vec3 & p1, int mask, Unigine::Vector<IGIntersection> & ret ) #

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

1, if the ray intersects with anything, otherwise 0.

IWater * getWater ( ) #

Returns the interface of the water control.

Return value

Water control interface.

void setSynckerInitCallback ( CallbackBase * func ) #

Sets the callback function that is executed as soon as Syncker is initialized.

Arguments

  • CallbackBase * func - Callback function

void setCollisionVolumeDetectionCallback ( CallbackBase * func ) #

Sets the callback function that is executed as soon as intersection with the collision volume is detected.

Arguments

  • CallbackBase * func - Callback function

void setCollisionSegmentDetectionCallback ( CallbackBase * func ) #

Sets the callback function that is executed as soon as intersection with the collision segment is detected.

Arguments

  • CallbackBase * func - Callback function
Last update: 2019-08-16
Build: ()