This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
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
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
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
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.

Unigine::WidgetSpriteNode Class

Header: #include <UnigineWidgets.h>
Inherits from: 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

Members


static WidgetSpriteNodePtr create ( const Ptr<Gui> & gui, int width, int height ) #

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

Arguments

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

static WidgetSpriteNodePtr create ( 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 setAspectCorrection ( bool correction ) #

Sets the aspect correction for the WidgetSpriteNode. true enables correction, false disables.

Arguments

  • bool correction - true to enable aspect correction, false to disable.

bool isAspectCorrection ( ) const#

Returns the value indicating if the aspect correction enabled for WidgetSpriteNode.

Return value

true if the aspect correction enabled, otherwise false.

void setCamera ( const Ptr<Camera> & camera ) #

Copies parameters of the given Camera instance.

Arguments

  • const Ptr<Camera> & camera - Camera to be copied.

Ptr<Camera> getCamera ( ) const#

Copies the instance of camera.

Return value

Camera instance.

void setEnvironmentTexturePath ( const char * path ) #

Sets the given path for Environment texture.

Arguments

  • const char * path - Texture path to be set.

const char * getEnvironmentTexturePath ( ) const#

Returns the path of the Environment texture.

Return value

Texture path.

void setIFps ( float ifps ) #

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.

Arguments

  • float ifps - Frame duration in seconds (1/FPS). If a too small value is provided, 1E-6 will be used instead.

float getIFps ( ) const#

Returns the current frame duration used to render WidgetSpriteNode viewport.

Return value

Frame duration in seconds (1/FPS).

void setLightUsage ( int usage ) #

Sets the type of the lighting for the WidgetSpriteNode.

Arguments

int getLightUsage ( ) const#

Returns the type of lighting for the WidgetSpriteNode.

Return value

The lighting type. Can be one of the following:

void setModelview ( const Math::Mat4 & modelview ) #

Sets a model-view matrix.

Arguments

  • const Math::Mat4 & modelview - Model-view matrix.

Math::Mat4 getModelview ( ) const#

Returns the current model-view matrix.

Return value

Model-view matrix.

void setNode ( const Ptr<Node> & node ) #

Sets a node to be displayed.

Arguments

Ptr<Node> getNode ( ) const#

Returns the current node set for displaying.

Return value

The node.

void setProjection ( const Math::mat4 & projection ) #

Sets a projection matrix.

Arguments

  • const Math::mat4 & projection - Projection matrix.

Math::mat4 getProjection ( ) const#

Returns the current projection matrix.

Return value

Projection matrix.

void setReflectionViewportMask ( int mask ) #

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

Arguments

  • int mask - Integer, each bit of which is a mask.

int getReflectionViewportMask ( ) const#

Returns 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).

Return value

Integer, each bit of which is a mask.

void setSkipFlags ( int flags ) #

Sets the skip flag for the WidgetSpriteViewport viewport.

Arguments

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

int getSkipFlags ( ) const#

Returns the skip flag set for the current viewport.

Return value

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

void setTextureHeight ( int height ) #

Sets the height of the texture buffer used for a widget. This affects the widget size accordingly.

Arguments

  • int height - Height of the texture buffer size.

int getTextureHeight ( ) const#

Returns the height of the texture buffer used for a widget that affects the widget size.

Return value

Height of the texture buffer size.

void setTextureWidth ( int width ) #

Sets the width of the texture buffer used for a widget. This affects the widget size accordingly.

Arguments

  • int width - Width of the texture buffer size.

int getTextureWidth ( ) const#

Returns the width of the texture buffer used for a widget that affects the widget size.

Return value

Width of the texture buffer size.

void setUseTAAOffset ( bool offset ) #

Sets a value indicating if skipping render mode check is enabled for using TAA. Can be used to ensure proper TAA calculation when rendering mode for the Viewport is set to RENDER_DEPTH.

Arguments

  • bool offset - true to enable skipping render mode check and use TAA; otherwise false.

bool isUseTAAOffset ( ) const#

Returns a value indicating if skipping render mode check is enabled for using TAA. Can be used to ensure proper TAA calculation when rendering mode for the Viewport is set to RENDER_DEPTH.

Return value

true if skipping render mode check is enabled for using TAA; otherwise false.

void setViewportMask ( int mask ) #

Sets a bit mask for rendering into the viewport. Node is rendered in the sprite viewport if its mask matches this one.

Arguments

  • int mask - Integer, each bit of which is a mask.

int getViewportMask ( ) const#

Returns the current bit mask for rendering into the viewport. Node is rendered in the sprite viewport if its mask matches this one.

Return value

Integer, each bit of which is a mask.

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 ( const Ptr<Image> & image ) #

Renders the viewport into an image.

Arguments

  • const Ptr<Image> & image - Reference to a target image.
Last update: 2022-03-10
Build: ()