|
| ShaderGraph (const ShaderGraph *parent, const string &name, ConstDocumentPtr document, const StringSet &reservedWords) |
| Constructor. More...
|
|
virtual | ~ShaderGraph () |
| Desctructor. More...
|
|
bool | isAGraph () const override |
| Return true if this node is a graph. More...
|
|
ShaderNode * | getNode (const string &name) |
| Get an internal node by name. More...
|
|
const ShaderNode * | getNode (const string &name) const |
| Get an internal node by name. More...
|
|
const vector< ShaderNode * > & | getNodes () const |
| Get a vector of all nodes in order. More...
|
|
size_t | numInputSockets () const |
| Get number of input sockets. More...
|
|
size_t | numOutputSockets () const |
| Get number of output sockets. More...
|
|
ShaderGraphInputSocket * | getInputSocket (size_t index) |
| Get socket by index. More...
|
|
ShaderGraphOutputSocket * | getOutputSocket (size_t index=0) |
|
const ShaderGraphInputSocket * | getInputSocket (size_t index) const |
|
const ShaderGraphOutputSocket * | getOutputSocket (size_t index=0) const |
|
ShaderGraphInputSocket * | getInputSocket (const string &name) |
| Get socket by name. More...
|
|
ShaderGraphOutputSocket * | getOutputSocket (const string &name) |
|
const ShaderGraphInputSocket * | getInputSocket (const string &name) const |
|
const ShaderGraphOutputSocket * | getOutputSocket (const string &name) const |
|
const vector
< ShaderGraphInputSocket * > & | getInputSockets () const |
| Get vector of sockets. More...
|
|
const vector
< ShaderGraphOutputSocket * > & | getOutputSockets () const |
|
ShaderNode * | createNode (const Node &node, GenContext &context) |
| Create a new node in the graph. More...
|
|
ShaderGraphInputSocket * | addInputSocket (const string &name, const TypeDesc *type) |
| Add input/output sockets. More...
|
|
ShaderGraphOutputSocket * | addOutputSocket (const string &name, const TypeDesc *type) |
|
IdentifierMap & | getIdentifierMap () |
| Return the map of unique identifiers used in the scope of this graph. More...
|
|
virtual | ~ShaderNode () |
|
| ShaderNode (const ShaderGraph *parent, const string &name) |
| Constructor. More...
|
|
const ShaderGraph * | getParent () const |
|
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...
|
|
ScopeInfo & | getScopeInfo () |
| Return the scope info for this node. More...
|
|
const ScopeInfo & | getScopeInfo () const |
| Return the scope info for this node. More...
|
|
bool | referencedConditionally () const |
| Returns true if this node is only referenced by a conditional. More...
|
|
void | initialize (const Node &node, const NodeDef &nodeDef, GenContext &context) |
|
ShaderInput * | addInput (const string &name, const TypeDesc *type) |
| Add inputs/outputs. More...
|
|
ShaderOutput * | addOutput (const string &name, const 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 |
|
|
void | createConnectedNodes (const ElementPtr &downstreamElement, const ElementPtr &upstreamElement, ElementPtr connectingElement, GenContext &context) |
|
void | addNode (ShaderNodePtr node) |
| Add a node to the graph. More...
|
|
void | addInputSockets (const InterfaceElement &elem, GenContext &context) |
| Add input sockets from an interface element (nodedef, nodegraph or node) More...
|
|
void | addOutputSockets (const InterfaceElement &elem) |
| Add output sockets from an interface element (nodedef, nodegraph or node) More...
|
|
void | addUpstreamDependencies (const Element &root, GenContext &context) |
|
void | addDefaultGeomNode (ShaderInput *input, const GeomPropDef &geomprop, GenContext &context) |
| Add a default geometric node and connect to the given input. More...
|
|
void | addColorTransformNode (ShaderInput *input, const ColorSpaceTransform &transform, GenContext &context) |
| Add a color transform node and connect to the given input. More...
|
|
void | addColorTransformNode (ShaderOutput *output, const ColorSpaceTransform &transform, GenContext &context) |
| Add a color transform node and connect to the given output. More...
|
|
void | addUnitTransformNode (ShaderInput *input, const UnitTransform &transform, GenContext &context) |
| Add a unit transform node and connect to the given input. More...
|
|
void | addUnitTransformNode (ShaderOutput *output, const UnitTransform &transform, GenContext &context) |
| Add a unit transform node and connect to the given output. More...
|
|
void | finalize (GenContext &context) |
| Perform all post-build operations on the graph. More...
|
|
void | optimize (GenContext &context) |
| Optimize the graph, removing redundant paths. More...
|
|
void | bypass (GenContext &context, ShaderNode *node, size_t inputIndex, size_t outputIndex=0) |
|
void | topologicalSort () |
|
void | calculateScopes () |
| Calculate scopes for all nodes in the graph. More...
|
|
void | setVariableNames (GenContext &context) |
|
string | populateColorTransformMap (ColorManagementSystemPtr colorManagementSystem, ShaderPort *shaderPort, ValueElementPtr element, const string &targetColorSpace, bool asInput) |
|
void | populateUnitTransformMap (UnitSystemPtr unitSystem, ShaderPort *shaderPort, ValueElementPtr element, const string &targetUnitSpace, bool asInput) |
|
void | disconnect (ShaderNode *node) const |
| Break all connections on a node. More...
|
|
void | createMetadata (const NodeDef &nodeDef, GenContext &context) |
| Create metadata from the nodedef according to registered metadata. More...
|
|
Class representing a graph (DAG) for shader generation
Definition at line 43 of file ShaderGraph.h.