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 (const Ptr<Gui> & gui, int width, int height)
Constructor. Creates a new sprite with given properties.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.
void setAspectCorrection (int correction)
Arguments
- int correction
const char * getEnvironmentTextureName ()
Return value
void setNode (const Ptr<Node> & node)
Sets a node to be displayed.Arguments
- const Ptr<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 (const Ptr<Camera> & camera)
Arguments
- const Ptr<Camera> & camera
void renderImage (const Ptr<Image> & image)
Renders the viewport into an image.Arguments
- const Ptr<Image> & image - Reference to a target image.
Ptr<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).Ptr<WidgetSpriteNode> create (const Ptr<Widget> & widget)
Arguments
- const Ptr<Widget> & widget
Return value
Math::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.const char * getPostMaterials ()
Return value
Math::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 (const char * materials)
Arguments
- const char * materials
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.
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
Ptr<Camera> getCamera ()
Return value
void setEnvironmentTextureName (const char * name)
Arguments
- const char * name
int checkSkipFlags (int flags)
Arguments
- int flags
Return value
void setModelview (const Math::Mat4 & modelview)
Sets a model-view matrix.Arguments
- const Math::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 (const Math::mat4 & projection)
Sets a projection matrix.Arguments
- const Math::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: 03.07.2017
Помогите сделать статью лучше
Была ли эта статья полезной?
(или выберите слово/фразу и нажмите Ctrl+Enter