This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
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
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

engine.projection Functions

Warning
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.
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.

This set of functions is available when the AppProjection plugin is loaded. This plugin allows creating multi-projector setups.

Notice
AppProjection plugin cannot be used in a Qt-based application

If the plugin is loaded together with the engine, the HAS_APP_PROJECTION definition is set. This definition can be used, for example, to avoid errors if the plugin is not loaded: the code in which the plugin functions are executed can be wrapped around as follows:

Source code (UnigineScript)
#ifdef HAS_APP_PROJECTION
	// engine.projection functions
#endif

AppProjection Class

Members


void engine.projection.showSetupWindow ( ) #

Shows the setup window for the AppProjection plugin.

void engine.projection.setResolutionUpscale ( float upscale ) #

Sets the resolution upscale factor.

Arguments

  • float upscale - Resolution upscale factor.

float engine.projection.getResolutionUpscale ( ) #

Returns the current resolution upscale factor.

Return value

Resolution upscale factor.

void engine.projection.setPluginEnabled ( bool enabled ) #

Enables or disables the AppProjection plugin.
Notice
All distortions will be removed.

Arguments

  • bool enabled - true to enable the AppProjection plugin; false to disable it.

bool engine.projection.isPluginEnabled ( ) #

Returns a value indicating if the AppProjection plugin is enabled.

Return value

true if the AppProjection plugin is enabled; otherwise, false.

int engine.projection.getWidth ( ) #

Returns the number of projections set via video_width CLI option.

Return value

Number of projections.

void engine.projection.setPrimary ( int primary ) #

Specifies which projection to use as a primary one.

Arguments

int engine.projection.getPrimary ( ) #

Returns the number of projection, which is used as a primary one.

Return value

Projection number, in the range from 0 to the total number of projections.

int engine.projection.saveState ( Stream stream ) #

Saves current states of all projections (warping, blending, color, etc.) to the specified stream.

Saving into the stream requires creating a blob to save into. To restore the saved state the restoreState() method is used:

Source code (UnigineScript)
// set the projection state
//...//

// save state
Blob blob_state = new Blob();
appprojection1.saveState(blob_state);

// change state
//...//

// restore state
blob_state.seekSet(0); // returning the carriage to the start of the blob
appprojection1.restoreState(blob_state);

Arguments

  • Stream stream - Stream to save state data for all projections.

Return value

1 on success; otherwise, 0.

int engine.projection.saveState ( int num, Stream stream ) #

Saves the current state of the projection with the specified number to the specified stream.

Saving into the stream requires creating a blob to save into. To restore the saved state the restoreState() method is used:

Source code (UnigineScript)
// set the projection state
//...//

// save state
Blob blob_state = new Blob();
appprojection1.saveState(0, blob_state);

// change state
//...//

// restore state
blob_state.seekSet(0); // returning the carriage to the start of the blob
appprojection1.restoreState(0, blob_state);

Arguments

Return value

1 on success; otherwise, 0.

int engine.projection.restoreState ( Stream stream ) #

Restores states of all projections (warping, blending, color, etc.) from the specified stream.

Restoring from the stream requires creating a blob to save into and saving the state using the saveState() method:

Source code (UnigineScript)
// set the projection state
//...//

// save state
Blob blob_state = new Blob();
appprojection1.saveState(blob_state);

// change state
//...//

// restore state
blob_state.seekSet(0); // returning the carriage to the start of the blob
appprojection1.restoreState(blob_state);

Arguments

  • Stream stream - Stream containing saved state data for all projections.

Return value

1 on success; otherwise, 0.

int engine.projection.restoreState ( int num, Stream stream ) #

Restores the state of the projection with the specified number from the specified stream.

Restoring from the stream requires creating a blob to save into and saving the state using the saveState() method:

Source code (UnigineScript)
// set the projection state
//...//

// save state
Blob blob_state = new Blob();
appprojection1.saveState(0, blob_state);

// change state
//...//

// restore state
blob_state.seekSet(0); // returning the carriage to the start of the blob
appprojection1.restoreState(0, blob_state);

Arguments

Return value

1 on success; otherwise, 0.

void engine.projection.reset ( ) #

Resets all parameters (warping, blending, color, etc.) of all projections to default values.

void engine.projection.reset ( int num ) #

Resets all parameters (warping, blending, color, etc.) of the specified projection to default values.

Arguments

void engine.projection.save ( string file_name, int binary = 0 ) #

Saves configurations of all projections to the specified file.

Arguments

  • string file_name - Path to a .proj file, to which configurations of all projections are to be saved.
  • int binary - 1 to save in binary format, 0 to save in XML format. The default value is 0.

void engine.projection.save ( int num, string file_name, int binary = 0 ) #

Saves configuration of the specified projection to the specified file.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • string file_name - Path to a .proj file, to which configuration of the specified projection is to be saved.
  • int binary - 1 to save in binary format, 0 to save in XML format. The default value is 0.

void engine.projection.load ( string file_name, int binary = 0 ) #

Loads configurations of all projections from the specified file.

Arguments

  • string file_name - Path to a .proj file containing configurations of all projections.
  • int binary - 1 to save in binary format, 0 to save in XML format. The default value is 0.

void engine.projection.load ( int num, string file_name, int binary = 0 ) #

Loads configuration of the specified projection from the specified file.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • string file_name - Path to a .proj file containing configuration of the specified projection.
  • int binary - 1 to save in binary format, 0 to save in XML format. The default value is 0.

void engine.projection.setEnabled ( int num, int enable ) #

Enables the specified projection for viewport rendering.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • int enable - 1 to enable the projection for rendering; 0 to disable it.

int engine.projection.isEnabled ( int num ) #

Returns a value indicating if the specified projection is enabled for viewport rendering.

Arguments

Return value

1 if the projection is enabled for rendering; otherwise, 0.

void engine.projection.setAngle ( int num, int angle ) #

Sets canvas rotation angle for the specified projection.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • int angle - Canvas rotation angle:
    • 0 - 0 degrees
    • 1 - 90 degrees
    • 2 - 180 degrees
    • 3 - 270 degrees

int engine.projection.getAngle ( int num ) #

Returns the current canvas rotation angle for the specified projection.

Arguments

Return value

Current canvas rotation angle:
  • 0 - 0 degrees
  • 1 - 90 degrees
  • 2 - 180 degrees
  • 3 - 270 degrees

void engine.projection.setFlipHorizontal ( int num, int flip ) #

Enables or disables horizontal flipping of canvas for the specified projection.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • int flip - 1 to enable horizontal flipping for the canvas of the specified projection, 0 to disable it.

int engine.projection.isFlipHorizontal ( int num ) #

Returns a value indicating if the canvas of the specified projection is flipped horizontally.

Arguments

Return value

1 if the canvas of the specified projection is flipped horizontally; otherwise, 0.

void engine.projection.setFlipVertical ( int num, int flip ) #

Enables or disables vertical flipping of canvas for the specified projection.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • int flip - 1 to enable vertical flipping for the canvas of the specified projection, 0 to disable it.

int engine.projection.isFlipVertical ( int num ) #

Returns a value indicating if the canvas of the specified projection is flipped vertically.

Arguments

Return value

1 if the canvas of the specified projection is flipped vertically; otherwise, 0.

void engine.projection.setDebugFillColor ( int num, int color_num ) #

Sets a color to be used for the specified projection in debug mode.
Notice
Setting individual colors for different projections enables you to visualize overlapping regions for different projections and facilitates the setup process.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • int color_num - Color to be used for the specified projection in debug mode, one of the following values:
    • 0 - no color
    • 1 - red
    • 2 - green
    • 3 - blue
    • 4 - cyan
    • 5 - magenta
    • 6 - yellow
    • 7 - white
    • 8 - black

int engine.projection.getDebugFillColor ( int num ) #

Returns the current color used for the specified projection in debug mode.
Notice
Setting individual colors for different projections enables you to visualize overlapping regions for different projections and facilitates the setup process.

Arguments

Return value

Color currently used for the specified projection in debug mode, one of the following values:
  • 0 - no color
  • 1 - red
  • 2 - green
  • 3 - blue
  • 4 - cyan
  • 5 - magenta
  • 6 - yellow
  • 7 - white
  • 8 - black

void engine.projection.setDebugShowGrid ( int num, int show ) #

Enables or disables visualization of warping grid for the specified projection on the screen.
Notice
This option significantly facilitates the process of debugging configuration of a multi-projector setup.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • int show - 1 to enable visualization of warping grid for the specified projection on the screen, 0 to disable it.

int engine.projection.isDebugShowGrid ( int num ) #

Returns a value indicating if warping grid for the specified projection is displayed on the screen.
Notice
This option significantly facilitates the process of debugging configuration of a multi-projector setup.

Arguments

Return value

1 if warping grid for the specified projection is displayed on the screen; otherwise, 0.

void engine.projection.setDebugShowWarpPoints ( int num, int show ) #

Enables or disables visualization of warping control points for the specified projection on the screen.
Notice
This option significantly facilitates the process of debugging configuration of a multi-projector setup.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • int show - 1 to enable visualization of warping control points for the specified projection on the screen, 0 to disable it.

int engine.projection.isDebugShowWarpPoints ( int num ) #

Returns a value indicating if warping control points for the specified projection are displayed on the screen.
Notice
This option significantly facilitates the process of debugging configuration of a multi-projector setup.

Arguments

Return value

1 if warping control points for the specified projection are displayed on the screen; otherwise, 0.

void engine.projection.setWarpPoints ( int num, Vector<vec2> points, int columns, int rows ) #

Sets warping grid size (width, height) and positions of all its control points for the specified projection.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • Vector<vec2> points - Array containing positions of all warping grid points. Array size is determined by the values for columns and rows specified.
  • int columns - Grid width, defines the number of warping grid points horizontally.
  • int rows - Grid height, defines the number of warping grid points vertically.

void engine.projection.getWarpPoints ( int num, Vector<vec2>& points, int & columns, int & rows ) #

Gets the current size (width, height) of the warping grid along with positions of all its control points for the specified projection and puts them to the specified variables.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • Vector<vec2>& points - Array to which positions of all warping grid points are to be put.
  • int & columns - Grid width, defines the number of warping grid points horizontally.
  • int & rows - Grid height, defines the number of warping grid points vertically.

void engine.projection.setWarpHandles ( int num, Vector<vec2> handles ) #

Sets coordinates of control handles for all warping grid points of the specified projection.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • Vector<vec2> handles - Array containing coordinates of handles for all warping grid points. First half - vertical handles, next half - horizontal ones.
    Notice
    The number of control handles must be twice as large as the number of grid points, as there are two handles for each point.

void engine.projection.getWarpHandles ( int num, Vector<vec2>& handles ) #

Gets coordinates of control handles of all warping grid points for the specified projection and puts them to the specified array.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • Vector<vec2>& handles - Array containing coordinates of control handles for all mask polygon points. First half - vertical handles, next half - horizontal ones.
    Notice
    The number of control handles must be twice as large as the number of grid points, as there are two handles for each point.

void engine.projection.resetWarpGrid ( int num ) #

Resets warping grid for the specified projection to the default one.

Arguments

void engine.projection.setBorderBlend ( int num, int border_num, vec4 blend ) #

Sets edge blending parameters for the specified side of the specified projection.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • int border_num - Number of projection's side:
    • 0 - left
    • 1 - right
    • 2 - top
    • 3 - bottom
  • vec4 blend - Four-component vector containing soft edge blending parameters for the specified side of the specified projection: (X - size, Y - alpha, Z - contrast, W - gamma).
    Notice
    The power component should have a non-zero value to enable blending.

vec4 engine.projection.getBorderBlend ( int num, int border_num ) #

Returns current edge blending parameters for the specified side of the specified projection.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • int border_num - Number of projection's side:
    • 0 - left
    • 1 - right
    • 2 - top
    • 3 - bottom

Return value

Four-component vector containing soft edge blending parameters for the specified side of the specified projection: (X - size, Y - alpha, Z - contrast, W - gamma).
Notice
The power component should have a non-zero value to enable blending.

void engine.projection.setMultiplyImage ( int num, Image image ) #

Sets the edge blending map for the specified projection.

Arguments

void engine.projection.setMultiplyTexture ( int num, Texture texture ) #

Sets the edge blending map for the specified projection.

Arguments

Texture engine.projection.getMultiplyTexture ( int num ) #

Returns the current edge blending map for the specified projection.

Arguments

Return value

Current edge blending map.

int engine.projection.addBlend ( int num, Vector<vec2> points, Vector<vec2> handles_left, Vector<vec2> handles_right ) #

Adds a new screen-space blend area for the specified projection. The form of the new screen-space blend area is defined by the positions of points and control handles (left and right) stored in the arrays specified.
Notice
All three arrays must have the same size.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • Vector<vec2> points - Array containing positions of all screen-space blend area polygon points
  • Vector<vec2> handles_left - Array containing coordinates of left control handles for all screen-space blend area polygon points.
  • Vector<vec2> handles_right - Array containing coordinates of right control handles for all screen-space blend area polygon points.

Return value

Number of the last added screen-space blend area.

void engine.projection.getBlend ( int num, int blend_num, Vector<vec2>& points, Vector<vec2>& handles_left, Vector<vec2>& handles_right ) #

Gets all points, along with their control handles, for the specified screen-space blend area of the specified projection and puts the data to the corresponding arrays specified.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • int blend_num - Screen-space blend area number, in the range from 0 to the total number of screen-space blend areas.
  • Vector<vec2>& points - Array containing positions of all screen-space blend area polygon points
  • Vector<vec2>& handles_left - Array containing coordinates of left control handles for all screen-space blend area polygon points.
  • Vector<vec2>& handles_right - Array containing coordinates of right control handles for all screen-space blend area polygon points.

int engine.projection.getNumBlends ( int num ) #

Returns the total number of screen-space blend areas assigned for the specified projection. Blends can be used for blending regions or to cut out certain areas (e.g. top and bottom areas for a curved screen projection).

Arguments

Return value

Total number of blends assigned for the specified projection, including the ones enabled and disabled.

void engine.projection.setBlendEnabled ( int num, int blend_num, int enabled ) #

Enables or disables the specified screen-space blend area of the specified projection.

Arguments

int engine.projection.isBlendEnabled ( int num, int blend_num ) #

Returns a value indicating if the specified screen-space blend area of the specified projection is enabled.

Arguments

Return value

1 if warping grid for the specified projection is displayed on the screen; otherwise, 0.

void engine.projection.setBlendAlpha ( int num, int blend_num, float alpha ) #

Sets a new transparency value for the specified screen-space blend area of the specified projection.

Arguments

float engine.projection.getBlendAlpha ( int num, int blend_num ) #

Returns the current transparency value for the specified screen-space blend area of the specified projection.

Arguments

Return value

Current transparency value.

void engine.projection.setBlendContrast ( int num, int blend_num, float alpha ) #

Sets a new gradient part contrast value for the specified screen-space blend area of the specified projection.

Arguments

float engine.projection.getBlendContrast ( int num, int blend_num ) #

Returns the current gradient part contrast value for the specified screen-space blend area of the specified projection.

Arguments

Return value

Current gradient part contrast value.

void engine.projection.setBlendGamma ( int num, int blend_num, float power ) #

Sets a new gamma correction value for the specified screen-space blend area of the specified projection.

Arguments

float engine.projection.getBlendGamma ( int num, int blend_num ) #

Returns the current gamma correction value for the specified screen-space blend area of the specified projection.

Arguments

Return value

Current gamma correction value.

void engine.projection.clearBlends ( int num ) #

Removes all screen-space blend area created for the specified projection.

Arguments

void engine.projection.setDebugShowBlendPoints ( int num, int show ) #

Enables or disables visualization of screen-space blend area control points for the specified projection on the screen.
Notice
This option significantly facilitates the process of debugging configuration of a multi-projector setup.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • int show - 1 to enable visualization of screen-space blend area control points for the specified projection on the screen, 0 to disable it.

int engine.projection.isDebugShowBlendPoints ( int num ) #

Returns a value indicating if screen-space blend area control points for the specified projection are displayed on the screen.
Notice
This option significantly facilitates the process of debugging configuration of a multi-projector setup.

Arguments

Return value

1 if screen-space blend area control points for the specified projection are displayed on the screen; otherwise, 0.

int engine.projection.addMask ( int num, Vector<vec2> points, Vector<vec2> handles_left, Vector<vec2> handles_right ) #

Adds a new mask for the specified projection. The form of the new mask is defined by the positions of points and control handles (left and right) stored in the arrays specified.
Notice
All three arrays must have the same size.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • Vector<vec2> points - Array containing positions of all mask polygon points
  • Vector<vec2> handles_left - Array containing coordinates of left control handles for all mask polygon points.
  • Vector<vec2> handles_right - Array containing coordinates of right control handles for all mask polygon points.

Return value

Number of the last added mask.

void engine.projection.getMask ( int num, int mask_num, Vector<vec2>& points, Vector<vec2>& handles_left, Vector<vec2>& handles_right ) #

Gets all points, along with their control handles, for the specified mask of the specified projection and puts the data to the corresponding arrays specified.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • int mask_num - Mask number, in the range from 0 to the total number of masks.
  • Vector<vec2>& points - Array containing positions of all mask polygon points
  • Vector<vec2>& handles_left - Array containing coordinates of left control handles for all mask polygon points.
  • Vector<vec2>& handles_right - Array containing coordinates of right control handles for all mask polygon points.

int engine.projection.getNumMasks ( int num ) #

Returns the total number of masks assigned for the specified projection. Masks can be used for blending regions or to cut out certain areas (e.g. top and bottom areas for a curved screen projection).

Arguments

Return value

Total number of masks assigned for the specified projection, including the ones enabled and disabled.

void engine.projection.setMaskEnabled ( int num, int mask_num, int enabled ) #

Enables or disables the specified mask of the specified projection.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • int mask_num - Mask number, in the range from 0 to the total number of masks.
  • int enabled - 1 to enable the specified mask of the specified projection, 0 to disable it.

int engine.projection.isMaskEnabled ( int num, int mask_num ) #

Returns a value indicating if the specified mask of the specified projection is enabled.

Arguments

Return value

1 if warping grid for the specified projection is displayed on the screen; otherwise, 0.

void engine.projection.setMaskSmooth ( int num, int mask_num, int smooth ) #

Sets smoothing of edges of the specified mask of the specified projection. This value determines the number of additional points to be inserted between the control points of the mask.

Arguments

int engine.projection.getMaskSmooth ( int num, int mask_num ) #

Returns the current smoothing value used for edges of the specified mask of the specified projection. This value determines the number of additional points to be inserted between the control points of the mask.

Arguments

Return value

Current smoothing value.

void engine.projection.clearMasks ( int num ) #

Removes all mask created for the specified projection.

Arguments

void engine.projection.setColorScale ( int num, vec4 scale ) #

Sets the color multiplier for the specified projection.

Arguments

vec4 engine.projection.getColorScale ( int num ) #

Returns the color multiplier for the specified projection.

Arguments

Return value

Per-channel color scale.

void engine.projection.setColorBias ( int num, vec4 bias ) #

Sets the color bias for the specified projection.

Arguments

vec4 engine.projection.getColorBias ( int num ) #

Returns the color bias for the specified projection.

Arguments

Return value

Per-channel color bias.

void engine.projection.setCornerBrightness ( int num, vec4 brightness ) #

Sets brightness correction values for corners of the specified projection using a four-component vector specified.

Arguments

  • int num - Projection number, in the range from 0 to the total number of projections.
  • vec4 brightness - Four-component vector containing brightness values, in the [0.0f, 1.0f] range, for projection's corners (upper left, upper right, lower left, lower right).

vec4 engine.projection.getCornerBrightness ( int num ) #

Returns current brightness correction values for corners of the specified projection as a four-component vector.

Arguments

Return value

Four-component vector containing brightness values, in the [0.0f, 1.0f] range, for projection's corners (upper left, upper right, lower left, lower right).

int engine.projection.addMesh ( int num, Mesh mesh, Mat4 transform ) #

Adds a new mesh for the specified projection.
Notice
Meshes are used for complex-shaped projection screens.

Arguments

Return value

Total number of meshes for the specified projection.

Mesh engine.projection.getMesh ( int num, int mesh_num ) #

Returns the specified mesh of the specified projection.
Notice
Meshes are used for complex-shaped projection screens.

Arguments

Return value

Mesh.

Mat4 engine.projection.getMeshTransform ( int num, int mesh_num ) #

Returns the transformation of the specified mesh of the specified projection.
Notice
Meshes are used for complex-shaped projection screens.

Arguments

Return value

Mesh transformation.

void engine.projection.resetMesh ( int num ) #

Resets the mesh for the specified projection.
Notice
Meshes are used for complex-shaped projection screens.

Arguments

void engine.projection.setProjectorModelview ( int num, Mat4 modelview ) #

Sets the projector's model-view matrix for the specified projection.

Arguments

Mat4 engine.projection.getProjectorModelview ( int num ) #

Returns the current projector's model-view matrix for the specified projection.

Arguments

Return value

Projector's model-view matrix.

void engine.projection.setProjectorProjection ( int num, mat4 projection ) #

Sets the projector's projection matrix for the specified projection.

Arguments

mat4 engine.projection.getProjectorProjection ( int num ) #

Returns the current projector's projection matrix for the specified projection.

Arguments

Return value

Projector's projection matrix.

void engine.projection.setViewerModelview ( int num, Mat4 modelview ) #

Sets the viewer's model-view matrix for the specified projection.

Arguments

Mat4 engine.projection.getViewerModelview ( int num ) #

Returns the current viewer's model-view matrix for the specified projection.

Arguments

Return value

Viewer's model-view matrix.

void engine.projection.setViewerProjection ( int num, mat4 projection ) #

Sets the viewer's projection matrix for the specified projection.

Arguments

mat4 engine.projection.getViewerProjection ( int num ) #

Returns the current viewer's projection matrix for the specified projection.

Arguments

Return value

Viewer's projection matrix.

Gui engine.projection.getGui ( int num ) #

Returns a GUI instance to draw interface on for the specified projection.

Arguments

Return value

GUI instance.

void engine.projection.setCamera ( int num, Camera camera ) #

Copies the camera from the specified display to the provided camera.

Arguments

  • int num - Display index.
  • Camera camera - Camera to copy the data to.

Camera engine.projection.getCamera ( int num ) #

Returns the camera from the display with the specified index.

Arguments

  • int num - Display index.

Return value

Camera.
Last update: 2021-12-13
Build: ()