WidgetSpriteNode Class
This class is used to display separate nodes together with all their children (like the View object option in the Nodes settings). 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
WidgetSpriteNode (Gui gui, int width, int height)
Constructor. Creates a new sprite with given properties.Arguments
- Gui gui - GUI, to which the new sprite will belong.
- int width - Width of the sprite.
- int height - Height of the sprite.
void setAspectCorrection (int correction)
Arguments
- int correction
string getEnvironmentTextureName ()
Return value
void setNode (Node node)
Sets a node to be displayed.Arguments
- Node node - Node.
int getTextureHeight ()
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 appendSkipFlags (int flags)
Arguments
- int flags
void setCamera (Camera camera)
Arguments
- Camera camera
void renderImage (Image image)
Renders the viewport into an image.Arguments
- Image image - Reference to a target image.
Node getNode ()
Returns the current node set for displaying.Return value
The node.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.
void setLightUsage (int usage)
Arguments
- int usage
float getIFps ()
Returns the current frame duration used to render WidgetSpriteNode viewport.Return value
Frame duration in seconds (1/FPS).WidgetSpriteNode create (Widget widget)
Arguments
- Widget widget
Return value
mat4 getProjection ()
Returns the current projection matrix.Return value
Projection matrix.int getViewportMask ()
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.string getPostMaterials ()
Return value
Mat4 getModelview ()
Returns the current model-view matrix.Return value
Model-view matrix.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 getTextureWidth ()
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 setPostMaterials (string materials)
Arguments
- string materials
CHANGE ME getCamera ()
NEW! Add descriptionReturn value
NEW! Return descriptionvoid 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.
int getAspectCorrection ()
Return value
void setReflectionMask (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.Arguments
- int mask - Integer, each bit of which is a mask.
void setSkipFlags (int flags)
Arguments
- int flags
int getLightUsage ()
Return value
void setEnvironmentTextureName (string name)
Arguments
- string name
int checkSkipFlags (int flags)
Arguments
- int flags
Return value
void setModelview (Mat4 modelview)
Sets a model-view matrix.Arguments
- Mat4 modelview - Model-view matrix.
int getReflectionMask ()
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.Return value
Integer, each bit of which is a mask.void removeSkipFlags (int flags)
Arguments
- int flags
void setProjection (mat4 projection)
Sets a projection matrix.Arguments
- mat4 projection - Projection matrix.
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 getSkipFlags ()
Return value
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)