Projections Class
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScript (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to- Sim
SDK edition to use it.
You should upgrade to
Syncker plugin must be loaded.
This class represents an interface used to manage projections configuration of the Syncker.
Projections Class
Members
void setEnabled ( int enabled ) #
Sets a value indicating if projections on this host are to be modified by the Synker. You can disable this option, when using Syncker only for synchronization of node transformations (and/or transfer data) and modification of projections is unnecessary.Arguments
- int enabled - 1 to enable modification of projections on this host by the Syncker; 0 - to disable it.
int isEnabled ( ) #
Returns the current value indicating if projections on this host are to be modified by the Synker. You can disable this option, when using Syncker only for synchronization of node transformations (and/or transfer data) and modification of projections is unnecessary.Return value
1 if modification of projections on this host by the Syncker is enabled; otherwise, 0.void setConfiguratorEnabled ( int enabled ) #
Sets a value indicating if Syncker’s Projection Configurator window is shown.Arguments
- int enabled - 1 to show Syncker’s Projection Configurator window; 0 - to hide it.
int isConfiguratorEnabled ( ) #
Returns the current value indicating if Syncker’s Projection Configurator window is shown.Return value
1 if modification of projections on this host by the Syncker is enabled; otherwise, 0.void saveProjections ( string file_name, int binary = false ) #
Saves the current projections configuration to the specified file. You can use this method to migrate old binary files to the new XML format.Arguments
- string file_name - Name of the file to which the current projections configuration shall be saved.
- int binary - Binary flag. Set 1 to save configuration in binary format; 0 - to save in XML format.
void loadProjections ( string file_name, int binary = false ) #
Loads projections configuration from the specified file. You can use this method to migrate old binary files to the new XML format.Arguments
- string file_name - Name of the file with projections configuration to be loaded.
- int binary - Binary flag. Set 1 to load configuration from a binary file; 0 - to load configuration from an XML file.
int getNumDisplays ( ) #
Returns the total number of displays in the current configuration.Return value
Current number of displays.int addDisplay ( string name ) #
Adds a new display to the current configuration.Arguments
- string name - Name of the new display to be added.
Return value
Number of the new added display.void removeDisplay ( int num ) #
Removes the display with the specified number from the current configuration.Arguments
- int num - Number of the display to be removed in the range from 0 to the total number of displays.
void setDisplayEnabled ( int num, int enabled ) #
Sets a value indicating if the specified display is enabled.Arguments
- int num - Number of the display in the range from 0 to the total number of displays.
- int enabled - 1 to enable the specified display; 0 - to disable it.
int isDisplayEnabled ( int num ) #
Returns a value indicating if the specified display is enabled.Arguments
- int num - Number of the display in the range from 0 to the total number of displays.
Return value
1 if the specified display is enabled; otherwise, 0.void setDisplayName ( int num, string name ) #
Sets a new name for the display with the specified number.Arguments
- int num - Number of the display in the range from 0 to the total number of displays.
- string name - New name to be set for the specified display.
string getDisplayName ( int num ) #
Returns the name of the display with the specified number.Arguments
- int num - Number of the display in the range from 0 to the total number of displays.
Return value
Name of the specified display.void setDisplayTransform ( int num, Mat4 transform ) #
Sets a new transformation for the display with the specified number.Arguments
- int num - Number of the display in the range from 0 to the total number of displays.
- Mat4 transform - New transformation to be set for the specified display.
Mat4 getDisplayTransform ( int num ) #
Returns the current transformation of the display with the specified number.Arguments
- int num - Number of the display in the range from 0 to the total number of displays.
Return value
Current transformation of the specified display.int getNumProjectors ( ) #
Returns the total number of projectors in the current configuration.Return value
Current number of projectors.int addProjector ( string name ) #
Adds a new projector to the current configuration.Arguments
- string name - Name of the new projector to be added.
Return value
Number of the new added projector.void removeProjector ( int num ) #
Removes the projector with the specified number from the current configuration.Arguments
- int num - Number of the projector to be removed in the range from 0 to the total number of projectors.
void setProjectorEnabled ( int num, int enabled ) #
Sets a value indicating if the specified projector is enabled.Arguments
- int num - Number of the projector in the range from 0 to the total number of projectors.
- int enabled - 1 to enable the specified projector; 0 - to disable it.
int isProjectorEnabled ( int num ) #
Returns a value indicating if the specified projector is enabled.Arguments
- int num - Number of the projector in the range from 0 to the total number of projectors.
Return value
1 if the specified projector is enabled; otherwise, 0.void setProjectorName ( int num, string name ) #
Sets a new name for the projector with the specified number.Arguments
- int num - Number of the projector in the range from 0 to the total number of projectors.
- string name - New name to be set for the specified projector.
string getProjectorName ( int num ) #
Returns the name of the projector with the specified number.Arguments
- int num - Number of the projector in the range from 0 to the total number of projectors.
Return value
Name of the specified projector.void setProjectorTransform ( int num, Mat4 transform ) #
Sets a new transformation for the projector with the specified number.Arguments
- int num - Number of the projector in the range from 0 to the total number of projectors.
- Mat4 transform - New transformation to be set for the specified projector. The transformation includes position (relative to the viewer), rotation, and size (width and height).
Mat4 getProjectorTransform ( int num ) #
Returns the current transformation of the projector with the specified number.Arguments
- int num - Number of the projector in the range from 0 to the total number of projectors.
Return value
Current transformation of the specified projector.void setProjectorAspectRatio ( int num, float aspect ) #
Sets a new aspect ratio (width to height) for the projector with the specified number.Arguments
- int num - Number of the projector in the range from 0 to the total number of projectors.
- float aspect - New aspect ratio to be set for the specified projector.
float getProjectorAspectRatio ( int num ) #
Returns the current aspect ratio (width to height) of the projector with the specified number.Arguments
- int num - Number of the projector in the range from 0 to the total number of projectors.
Return value
Current aspect ratio of the specified projector.void setProjectorVFOV ( int num, float vfov ) #
Sets a new vertical FOV (field of view) of the projector with the specified number.Arguments
- int num - Number of the projector in the range from 0 to the total number of projectors.
- float vfov - New vertical field of view to be set for the specified projector, in degrees.
float getProjectorVFOV ( int num ) #
Returns the current vertical FOV (field of view) of the projector with the specified number.Arguments
- int num - Number of the projector in the range from 0 to the total number of projectors.
Return value
Current vertical field of view of the specified projector, in degrees.void setProjectorHorizontalOffset ( int num, float hoffset ) #
Sets a new horizontal offset of the viewport of the projector with the specified number. The offset measures the position of the image relative to the centerline of the lens.Arguments
- int num - Number of the projector in the range from 0 to the total number of projectors.
- float hoffset - New horizontal offset to be set for the viewport of the specified projector, in meters.
float getProjectorHorizontalOffset ( int num ) #
Returns the current horizontal offset of the viewport of the projector with the specified number. The offset measures the position of the image relative to the centerline of the lens.Arguments
- int num - Number of the projector in the range from 0 to the total number of projectors.
Return value
Current horizontal offset of the viewport of the specified projector, in meters.void setProjectorVerticalOffset ( int num, float voffset ) #
Sets a new vertical offset of the viewport of the projector with the specified number. The offset measures the position of the image relative to the centerline of the lens.Arguments
- int num - Number of the projector in the range from 0 to the total number of projectors.
- float voffset - New vertical offset to be set for the viewport of the specified projector, in meters.
float getProjectorVerticalOffset ( int num ) #
Returns the current vertical offset of the viewport of the projector with the specified number. The offset measures the position of the image relative to the centerline of the lens.Arguments
- int num - Number of the projector in the range from 0 to the total number of projectors.
Return value
Current vertical offset of the viewport of the specified projector, in meters.Last update:
2021-12-13
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)