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::Syncker Class

Header: #include <UnigineSyncker.h>

This class represents the base interface of the Syncker, from which master and slave interfaces are inherited. It contains all common functions available for both slave and master.

Notice
Syncker plugin must be loaded.

Syncker Class

Members


void setInterpolation ( bool enabled ) #

Sets a value indicating if interpolation and extrapolation should be enabled for the computer to tackle the problem of lost packets between the master and slaves.

Arguments

bool isInterpolation ( ) #

Returns a value indicating if interpolation and extrapolation are enabled for the computer to tackle the problem of lost packets between the master and slaves.

Return value

true if interpolation and extrapolation are enabled for the computer; otherwise, false.

bool isInterpolation ( const NodePtr & node ) #

Returns a value indicating if the given node is interpolated by the Syncker.

Arguments

  • const NodePtr & node - Node to be checked.

Return value

true if the given node is interpolated by the Syncker; otherwise, false.

void setInterpolationPeriod ( double period ) #

Sets the interpolation period value for the computer.

Arguments

  • double period - Interpolation period value, in seconds. The default value is 0.04.

double getInterpolationPeriod ( ) #

Returns the current interpolation period value for the computer.

Return value

Interpolation period value, in seconds. The default value is 0.04.

void setExtrapolationPeriod ( double period ) #

Sets the extrapolation period value for the computer.

Arguments

  • double period - Extrapolation period value, in seconds. The default value is 0.04.

int getExtrapolationPeriod ( ) #

Returns the current extrapolation period value for the computer.

Return value

Extrapolation period value, in seconds. The default value is 0.2.

void loadViewConfig ( const char * name ) #

Loads view configuration from the specified *.cfg file.

Arguments

  • const char * name - Path to the *.cfg file.

void setView ( int display_num, const char * display_name ) #

Assigns the specified display or projector stored in the configuration file to the specified display of the computer.

Arguments

  • int display_num - Display number to assign the viewport to.
  • const char * display_name - Name of the display or projector stored in the configuration file that represents the viewport.

const char * getView ( int display_num ) #

Returns the current display or projector stored in the configuration file and assigned to the given display of the computer.

Arguments

  • int display_num - Display number.

Return value

Name of the display or projector stored in the configuration file and assigned to the given display.

void clearViews ( ) #

Clears all views assigned to the displays of the computer.

void setSetupMode ( bool enable ) #

Sets a value indicating if the Syncker's projection setup mode is enabled.

Arguments

  • bool enable - Enable flag. Use true to enable the projection setup mode for Syncker, or false - to hide it.

void useDefaultProjections ( bool enable ) #

Enables or disables an option to use default projections (FOV: 60) in case if a display (projection) was not found for the current sync_view.

Arguments

  • bool enable - true to use default projections (FOV: 60); false - not to use.

bool isDefaultProjectionsUsed ( ) #

Returns a value indicating if default projections (FOV: 60) are used in case if a display (projection) was not found for the current sync_view.

Return value

true if default projections are used; otherwise, false.

Math::vec3 getCAVEHead ( ) #

Returns the current viewer's head position.

Return value

Viewer's head position coordinates.

void setDebug ( bool enabled, int x, int y, int align_mask ) #

Enables or disables displaying of debug information at the specified position on the screen.

Arguments

  • bool enabled - true to display the debug information; false - to hide it.
  • int x - Horizontal margin of the debug information block. The default value is 10.
  • int y - Vertical margin of the debug information block. The default value is 10.
  • int align_mask - Alignment mask. One of the Gui::ALIGN_* variables or their combination. The default value is Gui::ALIGN_RIGHT | Gui::ALIGN_BOTTOM.

bool isDebug ( ) #

Returns a value indicating if the debug information is to be displayed.

Return value

true if the debug information is to be displayed; otherwise, false.

Unigine::CallbackBase * addCallback ( int callback, Unigine::CallbackBase * func ) #

Adds a callback of the specified type. Callback functions can be used to determine actions to be performed when sending or receiving user messages, as well as when changing settings on the Master or a Slave. The signature of the callback function can be one of the following:
Source code (C++)
// for the Syncker::Master::TCP_USER_RECEIVE type
void callback_function_name(BlobPtr &received_message);

// for the Syncker::Master::UDP_USER_SEND type
void callback_function_name(BlobPtr &message_to_send);

// for the Syncker::Master::MASTER_SETUP_CHANGED type
void callback_function_name(void);

// for the Syncker::Master::SLAVE_SETUP_CHANGED type
void callback_function_name(int slave_num);

// for the Syncker::Slave::TCP_USER_RECEIVE type
void callback_function_name(BlobPtr &received_message);

// for the Syncker::Slave::UDP_USER_RECEIVE type
void callback_function_name(BlobPtr &received_message);

Arguments

Return value

Number of the last added callback of the specified type, if the callback was added successsfully; otherwise, -1.

void removeCallback ( int callback, Unigine::CallbackBase * func ) #

Removes a given callback from the list of callbacks of the specified type. Callback functions can be used to determine actions to be performed when sending or receiving user messages, as well as when changing settings on the Master or a Slave.

Arguments

void clearCallbacks ( int callback ) #

Clears all added callbacks of the specified type. Callback functions can be used to determine actions to be performed when sending or receiving user messages, as well as when changing settings on the Master or a Slave.

Arguments

Last update: 2019-12-25
Build: ()