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

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

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

Public Member Functions

 CompositorNode ()
 
 CompositorNode (const CompositorNode &)=delete
 
virtual ~CompositorNode ()
 
virtual TargetOperationsaddOperations ()=0
 
TargetOperationsgetOperations (unsigned int index) const
 
unsigned int getOperationsCount () const
 
virtual void deleteOperations (unsigned int index)
 
virtual void changeOperationsOrder (unsigned int fromIndex, unsigned int toIndex)
 
nkMemory::StringView getName () const
 
bool getActive () const
 
void setName (const nkMemory::StringView &name)
 
virtual void setActive (bool value)
 
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 ( )

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

◆ CompositorNode() [2/2]

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

Copy constructor.

◆ ~CompositorNode()

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

Destructor.

Member Function Documentation

◆ addOperations()

virtual TargetOperations* nkGraphics::CompositorNode::addOperations ( )
pure virtual

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.

◆ getName()

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

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

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

◆ 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: