Kanzi  3.9.7
Kanzi Engine API
kanzi::Tag Class Reference

Tag represents a mark that can be added to a node to mark that the node is of certain kind. More...

#include <kanzi/core.ui/graphics3d/tag.hpp>

Public Member Functions

 Tag (const string &name)
 Creates a tag. More...
 

Static Public Member Functions

static void addTag (Node &node, const Tag &tag)
 Adds a tag to the node. More...
 
static Tag createTransparentTag ()
 Creates a transparent tag that is used in the default composer. More...
 
static bool hasTag (const Node &node, const Tag &tag)
 Checks if a node has a tag. More...
 
static void removeTag (Node &node, const Tag &tag)
 Removes a tag from the node. More...
 

Detailed Description

Tag represents a mark that can be added to a node to mark that the node is of certain kind.

For example transparent nodes can be marked with a "Transparent" tag. The transparent nodes can then be rendered in a different way than other objects by using a tag filter that selects only nodes with the "Transparent" tag.

Constructor & Destructor Documentation

kanzi::Tag::Tag ( const string &  name)
explicit

Creates a tag.

Parameters
nameThe name of the tag.

Member Function Documentation

static Tag kanzi::Tag::createTransparentTag ( )
static

Creates a transparent tag that is used in the default composer.

Returns
A tag for transparent objects.
static void kanzi::Tag::addTag ( Node node,
const Tag tag 
)
static

Adds a tag to the node.

If the node already has the tag, does nothing.

Parameters
nodeThe node that is tagged.
tagThe added tag.
static void kanzi::Tag::removeTag ( Node node,
const Tag tag 
)
static

Removes a tag from the node.

If the node doesn't have the tag, does nothing.

Parameters
nodeThe node where the tag is removed.
tagThe removed tag.
static bool kanzi::Tag::hasTag ( const Node node,
const Tag tag 
)
static

Checks if a node has a tag.

Parameters
nodeThe node that is checked.
tagThe tag that is checked.
Returns
True if the node has the tag; false otherwise.

The documentation for this class was generated from the following file: