engine.projection Functions
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 UnigineScipt (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
This set of functions is available when the AppProjection plugin is loaded. This plugin allows creating multi-projector setups.
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:
#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.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 primary - Projection number, in the range from 0 to the total number of projections.
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.Arguments
- Stream stream - Stream to save state data for all projections.
Return value
1 if states of all projections are saved successfully; 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.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
- Stream stream - Stream to save state data for the specified projection.
Return value
1 if the current state of the projection with the specified number is restored successfully; otherwise, 0.int engine.projection.restoreState ( Stream stream ) #
Restores states of all projections (warping, blending, color, etc.) from the specified stream.Arguments
- Stream stream - Stream containing saved state data for all projections.
Return value
1 if states of all projections are restored successfully; otherwise, 0.int engine.projection.restoreState ( int num, Stream stream ) #
Restores the state of the projection with the specified number from the specified stream.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
- Stream stream - Stream containing saved state data for the specified projection.
Return value
1 if the state of the projection with the specified number is restored successfully; 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
- int num - Projection number, in the range from 0 to the total number of projections.
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
- int num - Projection number, in the range from 0 to the total number of projections.
Return value
1 if the projection is enabled for rendering; otherwise, 0.void engine.projection.setViewportMask ( int num, int mask ) #
Sets a viewport bit mask for the specified projection. Object surfaces, materials, decals, lights and GUI objects will be rendered into this viewport only if their viewport mask matches this one (one matching bit is enough).Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
- int mask - Integer, each bit of which is a mask.
void engine.projection.setReflectionViewportMask ( int num, int mask ) #
Sets a bit mask for rendering reflections on the specified projection. Reflections are rendered in the viewport if masks of reflective materials match this one (one matching bit is enough).Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
- int mask - Integer, each bit of which is a mask.
void engine.projection.setProjection ( int num, mat4 projection ) #
Sets the projection matrix for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
- mat4 projection - Projection matrix.
mat4 engine.projection.getProjection ( int num ) #
Returns the current projection matrix used for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
Return value
Projection matrix used for the specified projection.void engine.projection.setModelview ( int num, Mat4 modelview ) #
Sets the model-view matrix for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
- Mat4 modelview - Model-view matrix.
Mat4 engine.projection.getModelview ( int num ) #
Gets the current model-view matrix used for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
Return value
Model-view matrix used for the specified projection.void engine.projection.setMaterials ( int num, string materials ) #
Sets postprocess materials to be applied to the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
- string materials - Postprocess materials (comma-separated list).
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
- int num - Projection number, in the range from 0 to the total number of projections.
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
- int num - Projection number, in the range from 0 to the total number of projections.
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
- int num - Projection number, in the range from 0 to the total number of projections.
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.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.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.
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.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.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.
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.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.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.
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.
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.
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
- int num - Projection number, in the range from 0 to the total number of projections.
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).
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).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
- int num - Projection number, in the range from 0 to the total number of projections.
- Image image - Image with an edge blending map to be set.
void engine.projection.setMultiplyTexture ( int num, Texture texture ) #
Sets the edge blending map for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
- Texture texture - Texture with an edge blending map to be set.
Texture engine.projection.getMultiplyTexture ( int num ) #
Returns the current edge blending map for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
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.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
- int num - Projection number, in the range from 0 to the total number of projections.
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 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.
- int enabled - 1 to enable the specified screen-space blend area of the specified projection, 0 to disable it.
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
- 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.
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
- 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.
- float alpha - New transparency value to be set.
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
- 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.
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
- 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.
- float alpha - New gradient part contrast value to be set.
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
- 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.
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
- 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.
- float power - New gamma correction value to be set.
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
- 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.
Return value
Current gamma correction value.void engine.projection.clearBlends ( int num ) #
Removes all screen-space blend area created for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
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.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.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.
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.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
- int num - Projection number, in the range from 0 to the total number of projections.
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
- 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.
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 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 smooth - Smoothing value to be set.
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
- 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.
Return value
Current smoothing value.void engine.projection.clearMasks ( int num ) #
Removes all mask created for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
void engine.projection.setColorScale ( int num, vec4 scale ) #
Sets the color multiplier for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
- vec4 scale - Per-channel color scale.
vec4 engine.projection.getColorScale ( int num ) #
Returns the color multiplier for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
Return value
Per-channel color scale.void engine.projection.setColorBias ( int num, vec4 bias ) #
Sets the color bias for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
- vec4 bias - Per-channel color bias.
vec4 engine.projection.getColorBias ( int num ) #
Returns the color bias for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
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
- int num - Projection number, in the range from 0 to the total number of projections.
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.Meshes are used for complex-shaped projection screens.
Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
- Mesh mesh - Mesh to be added.
- Mat4 transform - Mesh transformation.
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.Meshes are used for complex-shaped projection screens.
Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
- int mesh_num - Mesh number.
Return value
Mesh.Mat4 engine.projection.getMeshTransform ( int num, int mesh_num ) #
Returns the transformation of the specified mesh of the specified projection.Meshes are used for complex-shaped projection screens.
Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
- int mesh_num - Mesh number.
Return value
Mesh transformation.void engine.projection.resetMesh ( int num ) #
Resets the mesh for the specified projection.Meshes are used for complex-shaped projection screens.
Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
void engine.projection.setProjectorModelview ( int num, Mat4 modelview ) #
Sets the projector's model-view matrix for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
- Mat4 modelview - Projector's model-view matrix.
Mat4 engine.projection.getProjectorModelview ( int num ) #
Returns the current projector's model-view matrix for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
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
- int num - Projection number, in the range from 0 to the total number of projections.
- mat4 projection - Projector's projection matrix.
mat4 engine.projection.getProjectorProjection ( int num ) #
Returns the current projector's projection matrix for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
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
- int num - Projection number, in the range from 0 to the total number of projections.
- Mat4 modelview - Viewer's model-view matrix.
Mat4 engine.projection.getViewerModelview ( int num ) #
Returns the current viewer's model-view matrix for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
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
- int num - Projection number, in the range from 0 to the total number of projections.
- mat4 projection - Viewer's projection matrix.
mat4 engine.projection.getViewerProjection ( int num ) #
Returns the current viewer's projection matrix for the specified projection.Arguments
- int num - Projection number, in the range from 0 to the total number of projections.
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
- int num - Projection number, in the range from 0 to the total number of projections.
Return value
GUI instance.Last update:
2020-08-06
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)