This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm (Experimental)
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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 * 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

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

void showDebug ( ) #

Displays the debug information.
Last update: 2020-11-24
Build: ()