This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm (Experimental)
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
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
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine.WidgetSpriteNode Class

Inherits: WidgetSprite

This class is used to display separate nodes together with all their children. This widget supports alpha channel masking. But unlike WidgetSpriteViewport, it does not support engine postprocesses (like HDR, DOF, motion blur, glow, etc.); only postprocess materials can be applied to it.

WidgetSpriteNode Class

Properties

Node Node#

The current node set for displaying.
set
Sets a node to be displayed.
set value - Node.

float IFps#

The current frame duration used to render widgetspritenode viewport.
set
Sets a constant frame duration used to render WidgetSpriteNode viewport. For example, it can be used to decrease the frame rate to get higher performance.
set value - Frame duration in seconds (1/FPS). If a too small value is provided, 1E-6 will be used instead.

int LightUsage#

The type of lighting for the widgetspritenode.
set
Sets the type of the lighting for the WidgetSpriteNode.
set value - The lighting type. Can be one of the following:

int SkipFlags#

The skip flag set for the current viewport.
set
Sets the skip flag for the WidgetSpriteViewport viewport.
set value - A skip flag. Available flags:
  • SKIP_SHADOWS
  • SKIP_VISUALIZER
  • SKIP_POSTEFFECTS
  • SKIP_DYNAMIC_REFLECTIONS
  • SKIP_VELOCITY_BUFFER
  • SKIP_SRGB

string EnvironmentTextureName#

The name of the environment texture.
set
Sets the given name for Environment texture.
set value - Texture name to be set.

string PostMaterials#

Names of the current post postprocess materials that are applied after all other postprocess are rendered. they are used after engine.render.getpostmaterials(), if any.
set
Sets post postprocess materials that are applied after all other postprocess are rendered. They are used after engine.render.setPostMaterials(), if any.
set value - Comma-separated names of postprocess materials.

mat4 Modelview#

The current model-view matrix.
set
Sets a model-view matrix.
set value - Model-view matrix.

mat4 Projection#

The current projection matrix.
set
Sets a projection matrix.
set value - Projection matrix.

int ReflectionViewportMask#

The current bit mask for rendering reflections into the viewport. reflections are rendered in the sprite viewport if masks of reflective materials match this one (one bit at least).
set
Sets a bit mask for rendering reflections into the viewport. Reflections are rendered in the sprite viewport if masks of reflective materials match this one (one bit at least).
set value - Integer, each bit of which is a mask.

int ViewportMask#

The current bit mask for rendering into the viewport. node is rendered in the sprite viewport if its mask matches this one.
set
Sets a bit mask for rendering into the viewport. Node is rendered in the sprite viewport if its mask matches this one.
set value - Integer, each bit of which is a mask.

int TextureHeight#

The height of the texture buffer used for a widget that affects the widget size.
set
Sets the height of the texture buffer used for a widget. This affects the widget size accordingly.
set value - Height of the texture buffer size.

int TextureWidth#

The width of the texture buffer used for a widget that affects the widget size.
set
Sets the width of the texture buffer used for a widget. This affects the widget size accordingly.
set value - Width of the texture buffer size.

int AspectCorrection#

The value indicating if the aspect correction enabled for widgetspritenode.
set
Sets the aspect correction for the WidgetSpriteNode. 1 enables correction, 0 disables.
set value - 1 to enable aspect correction, 0 to disable.

Members


static WidgetSpriteNode ( Gui gui, int width, int height ) #

Constructor. Creates a new sprite with given properties and adds it to the specified GUI.

Arguments

  • Gui gui - GUI, to which the new sprite will belong.
  • int width - Width of the sprite.
  • int height - Height of the sprite.

static WidgetSpriteNode ( int width, int height ) #

Constructor. Creates a new sprite with given properties and adds it to the Engine GUI.

Arguments

  • int width - Width of the sprite.
  • int height - Height of the sprite.

void SetCamera ( Camera camera ) #

Copies parameters of the given Camera instance.

Arguments

  • Camera camera - Camera to be copied.

Camera GetCamera ( ) #

Copies the instance of camera.

Return value

Camera instance.

void AppendSkipFlags ( int flags ) #

Appends a new skip flag without rewriting already set.

Arguments

  • int flags - A skip flag. Available flags:
    • SKIP_SHADOWS
    • SKIP_VISUALIZER
    • SKIP_POSTEFFECTS
    • SKIP_DYNAMIC_REFLECTIONS
    • SKIP_VELOCITY_BUFFER
    • SKIP_SRGB

int CheckSkipFlags ( int flags ) #

Checks if given flags are already set.

Arguments

  • int flags - A skip flag. Available flags:
    • SKIP_SHADOWS
    • SKIP_VISUALIZER
    • SKIP_POSTEFFECTS
    • SKIP_DYNAMIC_REFLECTIONS
    • SKIP_VELOCITY_BUFFER
    • SKIP_SRGB

Return value

1 if flag/flags already set, otherwise 0.

void RemoveSkipFlags ( int flags ) #

Removes the given skip flag without affecting other set flags.

Arguments

  • int flags - A skip flag to be removed. Available flags:
    • SKIP_SHADOWS
    • SKIP_VISUALIZER
    • SKIP_POSTEFFECTS
    • SKIP_DYNAMIC_REFLECTIONS
    • SKIP_VELOCITY_BUFFER
    • SKIP_SRGB

void RenderImage ( Image image ) #

Renders the viewport into an image.

Arguments

  • Image image - Reference to a target image.
Last update: 2020-11-24
Build: ()