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

A clear target pass, during which some targets are cleared. More...

Inheritance diagram for nkGraphics::ClearTargetsPass:
nkGraphics::Pass nkExport::Exportable

Public Member Functions

nkMaths::Vector getClearColor () const
 
unsigned int getColorTargetIndex () const
 
float getClearDepthValue () const
 
unsigned char getClearStencilValue () const
 
bool getShouldClearColor () const
 
bool getShouldClearDepth () const
 
bool getShouldClearStencil () const
 
void setClearColor (const nkMaths::Vector &value)
 
void setColorTargetIndex (unsigned int value)
 
void setClearDepthValue (float value)
 
void setClearStencilValue (unsigned char value)
 
void setShouldClearColor (bool value)
 
void setShouldClearDepth (bool value)
 
void setShouldClearStencil (bool value)
 
virtual void exportClassToTree (nkExport::Node *rootNode) override
 
virtual void importClassFromTree (nkExport::Node *rootNode) override
 
- Public Member Functions inherited from nkGraphics::Pass
 Pass (System *system) noexcept
 
virtual ~Pass ()
 
System * getSystem () const
 
TargetOperationsgetParent () const
 
PASS_TYPE getType () const
 
nkMemory::StringView getName () const
 
void setParent (TargetOperations *parent)
 
void setName (nkMemory::StringView name)
 
- Public Member Functions inherited from nkExport::Exportable
 Exportable () noexcept
 
virtual ~Exportable ()
 

Detailed Description

A clear target pass, during which some targets are cleared.

During this operation, the targets selected are cleared using the settings of the pass.
See TargetOperations::addClearTargetsPass() to use it.

Member Function Documentation

◆ getClearColor()

nkMaths::Vector nkGraphics::ClearTargetsPass::getClearColor ( ) const
Returns
The color used for clearing the color target.

◆ getColorTargetIndex()

unsigned int nkGraphics::ClearTargetsPass::getColorTargetIndex ( ) const
Returns
In a multi target operations, the index of the color target cleared.

◆ getClearDepthValue()

float nkGraphics::ClearTargetsPass::getClearDepthValue ( ) const
Returns
The depth value used during depth target clearing.

◆ getClearStencilValue()

unsigned char nkGraphics::ClearTargetsPass::getClearStencilValue ( ) const
Returns
The stencil value used during stencil target clearing.

◆ getShouldClearColor()

bool nkGraphics::ClearTargetsPass::getShouldClearColor ( ) const
Returns
Whether the color target should be cleared during the pass (true) or not (false).

◆ getShouldClearDepth()

bool nkGraphics::ClearTargetsPass::getShouldClearDepth ( ) const
Returns
Whether the depth target should be cleared during the pass (true) or not (false).

◆ getShouldClearStencil()

bool nkGraphics::ClearTargetsPass::getShouldClearStencil ( ) const
Returns
Whether the stencil target should be cleared during the pass (true) or not (false).

◆ setClearColor()

void nkGraphics::ClearTargetsPass::setClearColor ( const nkMaths::Vector value)

Sets the color to use when clearing a color target.

Parameters
valueThe color to use.

◆ setColorTargetIndex()

void nkGraphics::ClearTargetsPass::setColorTargetIndex ( unsigned int  value)

In a multi target operations, sets the index of the color target that should be cleared.

Parameters
valueThe index of the color target to clear.

◆ setClearDepthValue()

void nkGraphics::ClearTargetsPass::setClearDepthValue ( float  value)

Sets the depth value to use when clearing the depth target.

Parameters
valueThe value to use.

◆ setClearStencilValue()

void nkGraphics::ClearTargetsPass::setClearStencilValue ( unsigned char  value)

Sets the stencil value to use when clearing the stencil target.

Parameters
valueThe value to use.

◆ setShouldClearColor()

void nkGraphics::ClearTargetsPass::setShouldClearColor ( bool  value)

Sets whether the color target should be cleared during the pass.

Parameters
valueIf the target should be cleared (true) or not (false).

◆ setShouldClearDepth()

void nkGraphics::ClearTargetsPass::setShouldClearDepth ( bool  value)

Sets whether the depth target should be cleared during the pass.

Parameters
valueIf the target should be cleared (true) or not (false).

◆ setShouldClearStencil()

void nkGraphics::ClearTargetsPass::setShouldClearStencil ( bool  value)

Sets whether the stencil target should be cleared during the pass.

Parameters
valueIf the target should be cleared (true) or not (false).

◆ exportClassToTree()

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

Basic exporting capabilities. The tree will be formatted as :

{
 "clearColor" : {0.4, 0.8, 0.6, 1.0},
 "colorTargetIndex" : 0,
 "clearDepthValue" : 1.0,
 "clearStencilValue" : 0,
 "shouldClearColor" : true,
 "shouldClearDepth" : true,
 "shouldClearStencil" : true
}
Parameters
rootNodeThe tree to export to.

Reimplemented from nkGraphics::Pass.

◆ importClassFromTree()

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

Basic importing capabilities. For the format expected, see exportClassToTree().

Parameters
rootNodeThe tree to import from.

Reimplemented from nkGraphics::Pass.


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