API Documentation
Public Member Functions | List of all members
nkGraphics::CompositorNode Class Reference

A node in the rendering graph described by a Compositor. More...

Inheritance diagram for nkGraphics::CompositorNode:
nkExport::Exportable

Public Member Functions

 CompositorNode (System *system) noexcept
 
 CompositorNode (const CompositorNode &)=delete
 
virtual ~CompositorNode ()
 
nkMemory::StringView getName () const
 
CompositorgetParentCompositor () const
 
bool getActive () const
 
void setName (const nkMemory::StringView &name)
 
void setParentCompositor (Compositor *value)
 
virtual void setActive (bool value)
 
TargetOperationsaddOperations ()
 
TargetOperationsgetOperations (unsigned int index) const
 
unsigned int getOperationsCount () const
 
virtual void deleteOperations (unsigned int index)
 
virtual void changeOperationsOrder (unsigned int fromIndex, unsigned int toIndex)
 
virtual void renderOperations ()
 
virtual void exportClassToTree (nkExport::Node *rootNode) override
 
virtual void importClassFromTree (nkExport::Node *rootNode) override
 
CompositorNodeoperator= (const CompositorNode &)=delete
 
- Public Member Functions inherited from nkExport::Exportable
 Exportable () noexcept
 
virtual ~Exportable ()
 

Detailed Description

A node in the rendering graph described by a Compositor.

Constructor & Destructor Documentation

◆ CompositorNode() [1/2]

nkGraphics::CompositorNode::CompositorNode ( System system)
noexcept

Constructor. In theory, should never be called by external code, see Compositor::addNode().

Parameters
systemThe system the resource should live in.

◆ CompositorNode() [2/2]

nkGraphics::CompositorNode::CompositorNode ( const CompositorNode )
delete

Copy constructor.

◆ ~CompositorNode()

virtual nkGraphics::CompositorNode::~CompositorNode ( )
virtual

Destructor.

Member Function Documentation

◆ getName()

nkMemory::StringView nkGraphics::CompositorNode::getName ( ) const
Returns
The name attached to the node.

◆ getParentCompositor()

Compositor* nkGraphics::CompositorNode::getParentCompositor ( ) const
Returns
The parent compositor.

◆ getActive()

bool nkGraphics::CompositorNode::getActive ( ) const
Returns
Whether the node is active (true) or not (false).

◆ setName()

void nkGraphics::CompositorNode::setName ( const nkMemory::StringView name)

Sets the name used by the node.

Parameters
nameThe name to use.

◆ setParentCompositor()

void nkGraphics::CompositorNode::setParentCompositor ( Compositor value)

Sets the parent compositor.

Parameters
valueThe compositor to mark as parent.

◆ setActive()

virtual void nkGraphics::CompositorNode::setActive ( bool  value)
virtual

Activates or not the node for rendering. A deactivated node won't participate in the rendering pipeline.

Parameters
valueIf the node is active (true) or not (false).

◆ addOperations()

TargetOperations* nkGraphics::CompositorNode::addOperations ( )

Adds an operation within the node.

Returns
The newly created operation. The node owns the memory allocated, external code should never delete it. See deleteOperations().

◆ getOperations()

TargetOperations* nkGraphics::CompositorNode::getOperations ( unsigned int  index) const

Returns an existing operation.

Parameters
indexThe index if the operation to retrieve.

◆ getOperationsCount()

unsigned int nkGraphics::CompositorNode::getOperationsCount ( ) const
Returns
The number of operations active in the node.

◆ deleteOperations()

virtual void nkGraphics::CompositorNode::deleteOperations ( unsigned int  index)
virtual

Erases and frees the memory of an operation.

Parameters
indexThe index of the operation to free.

◆ changeOperationsOrder()

virtual void nkGraphics::CompositorNode::changeOperationsOrder ( unsigned int  fromIndex,
unsigned int  toIndex 
)
virtual

Changes the order of operations within the node. This changes the rendering, as currently the operations are executed sequentially.

Parameters
fromIndexThe index of the target to move.
toIndexThe index to which the operation should be moved.

◆ renderOperations()

virtual void nkGraphics::CompositorNode::renderOperations ( )
virtual

Triggers a rendering. In theory, should never be called by external code. Prefer to use Compositor::renderChain.

◆ exportClassToTree()

virtual void nkGraphics::CompositorNode::exportClassToTree ( nkExport::Node rootNode)
overridevirtual

Basic exporting capabilities.

Parameters
rootNodeThe tree to export to.

Implements nkExport::Exportable.

◆ importClassFromTree()

virtual void nkGraphics::CompositorNode::importClassFromTree ( nkExport::Node rootNode)
overridevirtual

Basic importing capabilities.

Parameters
rootNodeThe tree to import from.

Implements nkExport::Exportable.

◆ operator=()

CompositorNode& nkGraphics::CompositorNode::operator= ( const CompositorNode )
delete

Copy operator.


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