HDK
|
#include <ShaderNode.h>
Classes | |
class | Classification |
Flags for classifying nodes into different categories. More... | |
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 | 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 |
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 322 of file ShaderNode.h.
|
inlinevirtual |
Definition at line 325 of file ShaderNode.h.
ShaderNode::ShaderNode | ( | const ShaderGraph * | parent, |
const string & | name | ||
) |
Constructor.
|
inline |
Add classification bits to this node.
Definition at line 415 of file ShaderNode.h.
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 |
Get classification bits set for this node.
Definition at line 409 of file ShaderNode.h.
|
inline |
Return the implementation used for this node.
Definition at line 433 of file ShaderNode.h.
|
inline |
Get inputs/outputs by index.
Definition at line 451 of file ShaderNode.h.
|
inline |
Definition at line 453 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 463 of file ShaderNode.h.
|
inline |
Get the metadata vector.
Definition at line 470 of file ShaderNode.h.
|
inline |
Get the metadata vector.
Definition at line 473 of file ShaderNode.h.
Return the name of this node.
Definition at line 427 of file ShaderNode.h.
|
inline |
Definition at line 452 of file ShaderNode.h.
|
inline |
Definition at line 454 of file ShaderNode.h.
ShaderOutput* ShaderNode::getOutput | ( | const string & | name | ) |
const ShaderOutput* ShaderNode::getOutput | ( | const string & | name | ) | const |
|
inline |
Definition at line 464 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 396 of file ShaderNode.h.
|
inline |
Return true if this node matches the given classification.
Definition at line 421 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 391 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 478 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 486 of file ShaderNode.h.
|
inline |
Get number of inputs/outputs.
Definition at line 447 of file ShaderNode.h.
|
inline |
Definition at line 448 of file ShaderNode.h.
|
inline |
Set classification bits for this node, replacing any previous set bits.
Definition at line 403 of file ShaderNode.h.
|
inline |
Set the metadata vector.
Definition at line 467 of file ShaderNode.h.
|
friend |
Definition at line 508 of file ShaderNode.h.
|
protected |
Definition at line 497 of file ShaderNode.h.
|
protected |
Definition at line 505 of file ShaderNode.h.
|
protected |
Definition at line 499 of file ShaderNode.h.
|
protected |
Definition at line 500 of file ShaderNode.h.
|
protected |
Definition at line 506 of file ShaderNode.h.
|
protected |
Definition at line 496 of file ShaderNode.h.
|
protected |
Definition at line 502 of file ShaderNode.h.
|
protected |
Definition at line 503 of file ShaderNode.h.
|
protected |
Definition at line 495 of file ShaderNode.h.
Definition at line 367 of file ShaderNode.h.
Definition at line 368 of file ShaderNode.h.
Definition at line 362 of file ShaderNode.h.
Definition at line 363 of file ShaderNode.h.
Definition at line 376 of file ShaderNode.h.
Definition at line 364 of file ShaderNode.h.
|
static |
Definition at line 360 of file ShaderNode.h.
Definition at line 374 of file ShaderNode.h.
Definition at line 375 of file ShaderNode.h.
Definition at line 366 of file ShaderNode.h.
Definition at line 365 of file ShaderNode.h.
Definition at line 372 of file ShaderNode.h.
Definition at line 373 of file ShaderNode.h.
Definition at line 371 of file ShaderNode.h.
Definition at line 369 of file ShaderNode.h.
Definition at line 370 of file ShaderNode.h.