This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
编程
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine 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
IG Plugin
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

IG::CIGI::Connector Class

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Sim SDK edition to use it.
Header: #include <UnigineCIGIConnector.h>

IG::CIGI::Connector Class

Members


int init ( int version, const char * host, int send, int recv, int size = 1432 ) #

Initializes the CIGI Connector using the given parameters.

Arguments

  • int version - CIGI protocol version. One of the CIGI_VERSION_* values.
  • const char * host - CIGI Host address.
  • int send - TCP port number to be used for sending packets to the CIGI Host.
  • int recv - TCP port number to be used for receiving packets from the CIGI Host.
  • int size - Packet size. The default value is 1432.

Return value

1 if the CIGI Connector was initialized successfully; otherwise, 0.

int shutdown ( ) #

Returns a value indicating if the CIGI Connector was shutdown successfully.

Return value

1 if the CIGI Connector was shutdown successfully; otherwise, 0.

int isInitialized ( ) #

Returns a value indicating if the CIGI Connector was initialized successfully.

Return value

1 if the CIGI Connector was initialized successfully; otherwise, 0.

void setIGMode ( int mode ) #

Sets the current IG mode.

Arguments

int getIGMode ( ) #

Returns the current IG mode.

Return value

IG mode. One of the CIGI_MODE_* values.

void setIGStatus ( int status ) #

Sets the current IG status.

Arguments

  • int status - IG status. The following values are supported:
    • 0 - normal
    • 1-255 - an error has occurred

int getIGStatus ( ) #

Returns the current IG status.

Return value

IG status. The following values are supported:
  • 0 - normal
  • 1-255 - an error has occurred

int getInterpolation ( ) #

Returns a value indicating if interpolation and extrapolation are enabled.

Return value

1 if interpolation and extrapolation are enabled; otherwise, 0.

unsigned int getIGFrame ( ) #

Returns the number of the current frame for the IG.

Return value

Current IG frame number.

unsigned int getHostFrame ( ) #

Returns the number of the current frame for the Host.

Return value

Current Host frame number.

double getHostTime ( ) #

Returns the current Host time (with latency corrections).

Return value

Current Host time, in seconds.

double getLastReceivedHostTime ( ) #

Returns the last received Host time.

Return value

Last received Host time, in seconds.

void setConnectCallback ( Unigine::CallbackBase * func ) #

Sets a callback function to be fired when the Host has connected.

Arguments

  • Unigine::CallbackBase * func - Callback pointer.

Unigine::CallbackBase * getConnectCallback ( ) #

Returns a callback to be fired when the Host has connected.

Return value

Callback pointer.

void setReceivePacketCallback ( int cigi_opcode, Unigine::CallbackBase * func ) #

Sets a callback function to be fired when a packet of the specified type has been received from the Host.

Arguments

  • int cigi_opcode - CIGI data packet opcode. One of the CIGI_OPCODE_* values.
  • Unigine::CallbackBase * func - Callback pointer.

Unigine::CallbackBase * getReceivePacketCallback ( int cigi_opcode ) #

Returns a callback to be fired when a packet of the specified type has been received from the Host.

Arguments

  • int cigi_opcode - CIGI data packet opcode. One of the CIGI_OPCODE_* values.

Return value

Callback pointer.

int getNumHostPackets ( ) #

Returns the total number of packets received from the Host.

Return value

Total number of packets received from the Host.

CigiHostPacket * getHostPacket ( int num ) #

Returns the specified CIGI Host packet.

Arguments

  • int num - ID of the Host packet.

Return value

CIGI Host packet.

CigiIGPacket * createIGPacket ( int ig_opcode ) #

Creates IG Packet to be sent to the Host.

Arguments

Return value

IG Packet to be sent to the Host.

void addIGPacket ( CigiIGPacket * packet ) #

Sends the specified IG packet to the Host.

Arguments

  • CigiIGPacket * packet - IG Packet to be sent to the Host.

void showDebug ( ) #

Displays the debug information.
Last update: 2020-07-31
Build: ()