|
HDK
|
#include <ShaderNode.h>
Inheritance diagram for ShaderNode:Classes | |
| class | Classification |
| Flags for classifying nodes into different categories. More... | |
Public Member Functions | |
| virtual | ~ShaderNode () |
| ShaderNode (const ShaderGraph *parent, const string &name) | |
| Constructor. More... | |
| virtual bool | isAGraph () const |
| Return true if this node is a graph. More... | |
| const ShaderGraph * | getParent () const |
| void | setClassification (uint32_t c) |
| uint32_t | getClassification () const |
| Get classification bits set for this node. More... | |
| void | addClassification (uint32_t c) |
| Add classification bits to this node. More... | |
| bool | hasClassification (uint32_t c) const |
| Return true if this node matches the given classification. More... | |
| const string & | getName () const |
| Return the name of this node. More... | |
| const ShaderNodeImpl & | getImplementation () const |
| Return the implementation used for this node. More... | |
| void | initialize (const Node &node, const NodeDef &nodeDef, GenContext &context) |
| ShaderInput * | addInput (const string &name, TypeDesc type) |
| Add inputs/outputs. More... | |
| ShaderOutput * | addOutput (const string &name, TypeDesc type) |
| size_t | numInputs () const |
| Get number of inputs/outputs. More... | |
| size_t | numOutputs () const |
| ShaderInput * | getInput (size_t index) |
| Get inputs/outputs by index. More... | |
| ShaderOutput * | getOutput (size_t index=0) |
| const ShaderInput * | getInput (size_t index) const |
| const ShaderOutput * | getOutput (size_t index=0) const |
| ShaderInput * | getInput (const string &name) |
| Get inputs/outputs by name. More... | |
| ShaderOutput * | getOutput (const string &name) |
| const ShaderInput * | getInput (const string &name) const |
| const ShaderOutput * | getOutput (const string &name) const |
| const vector< ShaderInput * > & | getInputs () const |
| Get vector of inputs/outputs. More... | |
| const vector< ShaderOutput * > & | getOutputs () const |
| void | setMetadata (ShaderMetadataVecPtr metadata) |
| Set the metadata vector. More... | |
| ShaderMetadataVecPtr | getMetadata () |
| Get the metadata vector. More... | |
| const ShaderMetadataVecPtr & | getMetadata () const |
| Get the metadata vector. More... | |
| bool | isEditable (const ShaderInput &input) const |
| bool | isEditable (const ShaderGraphInputSocket &input) const |
Static Public Member Functions | |
| static ShaderNodePtr | create (const ShaderGraph *parent, const string &name, const NodeDef &nodeDef, GenContext &context) |
| Create a new node from a nodedef. More... | |
| static ShaderNodePtr | create (const ShaderGraph *parent, const string &name, ShaderNodeImplPtr impl, unsigned int classification=Classification::TEXTURE) |
| Create a new node from a node implementation. More... | |
Static Public Attributes | |
| static const ShaderNodePtr | NONE |
| static const string | CONSTANT |
| static const string | DOT |
| static const string | IMAGE |
| static const string | SURFACESHADER |
| static const string | BSDF_R |
| static const string | BSDF_T |
| static const string | TRANSFORM_POINT |
| static const string | TRANSFORM_VECTOR |
| static const string | TRANSFORM_NORMAL |
| static const string | TEXTURE2D_GROUPNAME |
| static const string | TEXTURE3D_GROUPNAME |
| static const string | PROCEDURAL2D_GROUPNAME |
| static const string | PROCEDURAL3D_GROUPNAME |
| static const string | GEOMETRIC_GROUPNAME |
Protected Member Functions | |
| void | createMetadata (const NodeDef &nodeDef, GenContext &context) |
| Create metadata from the nodedef according to registered metadata. More... | |
Protected Attributes | |
| const ShaderGraph * | _parent |
| string | _name |
| uint32_t | _classification |
| std::unordered_map< string, ShaderInputPtr > | _inputMap |
| vector< ShaderInput * > | _inputOrder |
| std::unordered_map< string, ShaderOutputPtr > | _outputMap |
| vector< ShaderOutput * > | _outputOrder |
| ShaderNodeImplPtr | _impl |
| ShaderMetadataVecPtr | _metadata |
Friends | |
| class | ShaderGraph |
Class representing a node in the shader generation DAG
Definition at line 319 of file ShaderNode.h.
|
inlinevirtual |
Definition at line 322 of file ShaderNode.h.
| ShaderNode::ShaderNode | ( | const ShaderGraph * | parent, |
| const string & | name | ||
| ) |
Constructor.
|
inline |
Add classification bits to this node.
Definition at line 410 of file ShaderNode.h.
| ShaderInput* ShaderNode::addInput | ( | const string & | name, |
| TypeDesc | type | ||
| ) |
Add inputs/outputs.
| ShaderOutput* ShaderNode::addOutput | ( | const string & | name, |
| TypeDesc | type | ||
| ) |
|
static |
Create a new node from a nodedef.
|
static |
Create a new node from a node implementation.
|
protected |
Create metadata from the nodedef according to registered metadata.
|
inline |
Get classification bits set for this node.
Definition at line 404 of file ShaderNode.h.
|
inline |
Return the implementation used for this node.
Definition at line 428 of file ShaderNode.h.
|
inline |
Get inputs/outputs by index.
Definition at line 446 of file ShaderNode.h.
|
inline |
Definition at line 448 of file ShaderNode.h.
| ShaderInput* ShaderNode::getInput | ( | const string & | name | ) |
Get inputs/outputs by name.
| const ShaderInput* ShaderNode::getInput | ( | const string & | name | ) | const |
|
inline |
Get vector of inputs/outputs.
Definition at line 458 of file ShaderNode.h.
|
inline |
Get the metadata vector.
Definition at line 465 of file ShaderNode.h.
|
inline |
Get the metadata vector.
Definition at line 468 of file ShaderNode.h.
|
inline |
Return the name of this node.
Definition at line 422 of file ShaderNode.h.
|
inline |
Definition at line 447 of file ShaderNode.h.
|
inline |
Definition at line 449 of file ShaderNode.h.
| ShaderOutput* ShaderNode::getOutput | ( | const string & | name | ) |
| const ShaderOutput* ShaderNode::getOutput | ( | const string & | name | ) | const |
|
inline |
Definition at line 459 of file ShaderNode.h.
|
inline |
Return the parent graph that owns this node. If this node is a root graph it has no parent and nullptr will be returned.
Definition at line 391 of file ShaderNode.h.
|
inline |
Return true if this node matches the given classification.
Definition at line 416 of file ShaderNode.h.
| void ShaderNode::initialize | ( | const Node & | node, |
| const NodeDef & | nodeDef, | ||
| GenContext & | context | ||
| ) |
Initialize this shader node with all required data from the given node and nodedef.
|
inlinevirtual |
Return true if this node is a graph.
Reimplemented in ShaderGraph.
Definition at line 386 of file ShaderNode.h.
|
inline |
Returns true if an input is editable by users. Editable inputs are allowed to be published as shader uniforms and hence must be presentable in a user interface.
Definition at line 473 of file ShaderNode.h.
|
inline |
Returns true if a graph input is accessible by users. Editable inputs are allowed to be published as shader uniforms and hence must be presentable in a user interface.
Definition at line 481 of file ShaderNode.h.
|
inline |
Get number of inputs/outputs.
Definition at line 442 of file ShaderNode.h.
|
inline |
Definition at line 443 of file ShaderNode.h.
|
inline |
Set classification bits for this node, replacing any previous set bits.
Definition at line 398 of file ShaderNode.h.
|
inline |
Set the metadata vector.
Definition at line 462 of file ShaderNode.h.
|
friend |
Definition at line 503 of file ShaderNode.h.
|
protected |
Definition at line 492 of file ShaderNode.h.
|
protected |
Definition at line 500 of file ShaderNode.h.
|
protected |
Definition at line 494 of file ShaderNode.h.
|
protected |
Definition at line 495 of file ShaderNode.h.
|
protected |
Definition at line 501 of file ShaderNode.h.
|
protected |
Definition at line 491 of file ShaderNode.h.
|
protected |
Definition at line 497 of file ShaderNode.h.
|
protected |
Definition at line 498 of file ShaderNode.h.
|
protected |
Definition at line 490 of file ShaderNode.h.
|
static |
Definition at line 362 of file ShaderNode.h.
|
static |
Definition at line 363 of file ShaderNode.h.
|
static |
Definition at line 358 of file ShaderNode.h.
|
static |
Definition at line 359 of file ShaderNode.h.
|
static |
Definition at line 371 of file ShaderNode.h.
|
static |
Definition at line 360 of file ShaderNode.h.
|
static |
Definition at line 356 of file ShaderNode.h.
|
static |
Definition at line 369 of file ShaderNode.h.
|
static |
Definition at line 370 of file ShaderNode.h.
|
static |
Definition at line 361 of file ShaderNode.h.
|
static |
Definition at line 367 of file ShaderNode.h.
|
static |
Definition at line 368 of file ShaderNode.h.
|
static |
Definition at line 366 of file ShaderNode.h.
|
static |
Definition at line 364 of file ShaderNode.h.
|
static |
Definition at line 365 of file ShaderNode.h.