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
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
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::Plugins::Syncker::Slave Class

Header: #include <UnigineSyncker.h>
Inherits: Syncker

This class represents the slave interface of the Syncker.

Notice
Syncker plugin must be loaded.

Slave Class

Members


void setUdpRecvSize ( int size ) #

Sets the maximum size of a UDP packet to be received.

Arguments

  • int size - UDP packet size, in bytes. The default value is 1432.

int getUdpRecvSize ( ) #

Sets the maximum size of a UDP packet to be received.

Return value

UDP packet size, in bytes. The default value is 1432.

void setSkipWorldMessages ( bool skip ) #

Sets a value indicating if world messages (TCP and UDP) should be skipped.

Arguments

  • bool skip - true to skip world messages (TCP and UDP); false - to receive them.

void setSkipUserMessages ( bool skip ) #

Sets a value indicating if user messages (TCP and UDP) should be skipped.

Arguments

  • bool skip - true to skip user messages (TCP and UDP); false - to receive them.

bool isWorldMessagesSkipped ( ) #

Returns a value indicating if world messages (TCP and UDP) are skipped.

Return value

true if world messages (TCP and UDP) are skipped; otherwise, false.

bool isUserMessagesSkipped ( ) #

Returns a value indicating if user messages (TCP and UDP) are skipped.

Return value

true if user messages (TCP and UDP) are skipped; otherwise, false.

bool isPacketsReceived ( ) #

Returns a value indicating if packets where received after the last update().

Return value

true if packets were received after the last update(); otherwise, false.

bool isPacketsLost ( ) #

Returns a value indicating if there are missing packets after the last update().

Return value

true if there are missing packets after the last update(); otherwise, false.

double getMasterTime ( ) #

Returns the current master time (with latency corrections).

Return value

Current master time, in seconds.

bool hasCAVE ( ) #

Returns the value indicating if there are viewer's head position synchronization packets received after the last update().

Return value

true if there are viewer's head position synchronization packets received after the last update(); otherwise, false.

bool hasEnd ( ) #

Returns the value indicating if there is a frame_end synchronization packet received after the last update().

Return value

true if there is a frame_end synchronization packet received after the last update() ; otherwise, false.

bool hasFrame ( ) #

Returns the value indicating if there is a frame_start synchronization packet received after the last update().

Return value

true if there is a frame_start synchronization packet received after the last update() ; otherwise, false.

bool hasPlayer ( ) #

Returns the value indicating if there are player synchronization packets received after the last update().

Return value

true if there are player synchronization packets received after the last update(); otherwise, false.

bool hasRender ( ) #

Returns the value indicating if there are render synchronization packets received after the last update().

Return value

true if there are render synchronization packets received after the last update(); otherwise, false.

void sendTCPUser ( const BlobPtr & message ) #

Sends a user message contained in the specified buffer to the master via the TCP protocol.

Arguments

  • const BlobPtr & message - Buffer, containing a user message.

int getMasterNodeID ( int slave_node_id ) #

Returns the ID of a dynamic node on the Master by its local ID on the Slave. A Slave does not create an exact copy of a node created on the Master, their IDs do not match. So, knowing an ID of a local copy of a node created on the Master, you can easily find its original on the Master. This can be used in user messages, when you need to apply some specific modifications to source node on the Master.

Arguments

  • int slave_node_id - Node's ID on the Slave.

Return value

ID of the node on the Master.

int getSlaveNodeID ( int master_node_id ) #

Returns the local ID of a dynamic node on the Slave by its ID on the Master. A Slave does not create an exact copy of a node created on the Master, their IDs do not match. So, if you created a node on the Master and then called the SynckerMaster::createNode() method, you can easily find its copy on the current Slave. This can be used in user messages, when you need to apply some specific modifications to a Slave's copy of a node, that was created on the Master.

Arguments

  • int master_node_id - Node's ID on the Master.

Return value

ID of the node on the Slave.

void addSyncNode ( const NodePtr & node, int master_node_id ) #

Enables synchronization of parameters of the given node via the UDP protocol.
Notice
Scene nodes are not synchronized by default, this method is used to add a particular node to the synchronization queue.

Arguments

  • const NodePtr & node - Node to synchronize.
  • int master_node_id - ID of the node on the Master.

bool removeSyncNode ( const NodePtr & num ) #

Removes the specified node from the synchronization queue.

Arguments

  • const NodePtr & num - Node to be removed.

Return value

true if the node was successfully removed from the synchronization queue; otherwise, false.

bool removeSyncNodeID ( int node_id ) #

Removes the node with the given number from the synchronization queue.

Arguments

  • int node_id - Node number in the synchronization queue.

Return value

true if the node was successfully removed from the synchronization queue; otherwise, false.
Last update: 2019-12-25
Build: ()