HDK
|
#include <ShaderNode.h>
Classes | |
class | Classification |
Flags for classifying nodes into different categories. More... | |
struct | ScopeInfo |
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 | IMAGE |
static const string | COMPARE |
static const string | SWITCH |
static const string | SCATTER_MODE |
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 |
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 |
ScopeInfo | _scopeInfo |
Friends | |
class | ShaderGraph |
Class representing a node in the shader generation DAG
Definition at line 323 of file ShaderNode.h.
|
inlinevirtual |
Definition at line 326 of file ShaderNode.h.
ShaderNode::ShaderNode | ( | const ShaderGraph * | parent, |
const string & | name | ||
) |
Constructor.
ShaderInput* ShaderNode::addInput | ( | const string & | name, |
const TypeDesc * | type | ||
) |
Add inputs/outputs.
ShaderOutput* ShaderNode::addOutput | ( | const string & | name, |
const 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 |
Return the implementation used for this node.
Definition at line 441 of file ShaderNode.h.
|
inline |
Get inputs/outputs by index.
Definition at line 474 of file ShaderNode.h.
|
inline |
Definition at line 476 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 486 of file ShaderNode.h.
|
inline |
Get the metadata vector.
Definition at line 493 of file ShaderNode.h.
|
inline |
Get the metadata vector.
Definition at line 496 of file ShaderNode.h.
Return the name of this node.
Definition at line 435 of file ShaderNode.h.
|
inline |
Definition at line 475 of file ShaderNode.h.
|
inline |
Definition at line 477 of file ShaderNode.h.
ShaderOutput* ShaderNode::getOutput | ( | const string & | name | ) |
const ShaderOutput* ShaderNode::getOutput | ( | const string & | name | ) | const |
|
inline |
Definition at line 487 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 423 of file ShaderNode.h.
|
inline |
Return the scope info for this node.
Definition at line 447 of file ShaderNode.h.
Return the scope info for this node.
Definition at line 453 of file ShaderNode.h.
|
inline |
Return true if this node matches the given classification.
Definition at line 429 of file ShaderNode.h.
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 418 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 501 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 509 of file ShaderNode.h.
|
inline |
Get number of inputs/outputs.
Definition at line 470 of file ShaderNode.h.
|
inline |
Definition at line 471 of file ShaderNode.h.
bool ShaderNode::referencedConditionally | ( | ) | const |
Returns true if this node is only referenced by a conditional.
|
inline |
Set the metadata vector.
Definition at line 490 of file ShaderNode.h.
|
friend |
Definition at line 532 of file ShaderNode.h.
|
protected |
Definition at line 520 of file ShaderNode.h.
|
protected |
Definition at line 528 of file ShaderNode.h.
|
protected |
Definition at line 522 of file ShaderNode.h.
|
protected |
Definition at line 523 of file ShaderNode.h.
|
protected |
Definition at line 529 of file ShaderNode.h.
|
protected |
Definition at line 519 of file ShaderNode.h.
|
protected |
Definition at line 525 of file ShaderNode.h.
|
protected |
Definition at line 526 of file ShaderNode.h.
|
protected |
Definition at line 518 of file ShaderNode.h.
|
protected |
Definition at line 530 of file ShaderNode.h.
Definition at line 395 of file ShaderNode.h.
Definition at line 396 of file ShaderNode.h.
Definition at line 392 of file ShaderNode.h.
Definition at line 390 of file ShaderNode.h.
Definition at line 391 of file ShaderNode.h.
|
static |
Definition at line 388 of file ShaderNode.h.
Definition at line 402 of file ShaderNode.h.
Definition at line 403 of file ShaderNode.h.
Definition at line 394 of file ShaderNode.h.
Definition at line 393 of file ShaderNode.h.
Definition at line 400 of file ShaderNode.h.
Definition at line 401 of file ShaderNode.h.
Definition at line 399 of file ShaderNode.h.
Definition at line 397 of file ShaderNode.h.
Definition at line 398 of file ShaderNode.h.