Blender V2.61 - r43446
Public Member Functions | Public Attributes | Protected Types | Protected Member Functions

ShaderGraph Class Reference

#include <graph.h>

List of all members.

Public Member Functions

 ShaderGraph ()
 ~ShaderGraph ()
ShaderGraphcopy ()
ShaderNodeadd (ShaderNode *node)
ShaderNodeoutput ()
void connect (ShaderOutput *from, ShaderInput *to)
void disconnect (ShaderInput *to)
void finalize (bool do_bump=false, bool do_osl=false)

Public Attributes

list< ShaderNode * > nodes
bool finalized

Protected Types

typedef pair< ShaderNode
*const, ShaderNode * > 
NodePair

Protected Member Functions

void find_dependencies (set< ShaderNode * > &dependencies, ShaderInput *input)
void copy_nodes (set< ShaderNode * > &nodes, map< ShaderNode *, ShaderNode * > &nnodemap)
void remove_proxy_nodes (vector< bool > &removed)
void break_cycles (ShaderNode *node, vector< bool > &visited, vector< bool > &on_stack)
void clean ()
void bump_from_displacement ()
void default_inputs (bool do_osl)

Detailed Description

Definition at line 196 of file graph.h.


Member Typedef Documentation

typedef pair<ShaderNode* const, ShaderNode*> ShaderGraph::NodePair [protected]

Definition at line 215 of file graph.h.


Constructor & Destructor Documentation

ShaderGraph::ShaderGraph ( )

Definition at line 132 of file graph.cpp.

References add(), and finalized.

Referenced by copy().

ShaderGraph::~ShaderGraph ( )

Definition at line 138 of file graph.cpp.

References nodes.


Member Function Documentation

ShaderNode * ShaderGraph::add ( ShaderNode node)
void ShaderGraph::break_cycles ( ShaderNode node,
vector< bool > &  visited,
vector< bool > &  on_stack 
) [protected]

Definition at line 331 of file graph.cpp.

References disconnect(), ShaderNode::id, ShaderNode::inputs, ShaderInput::link, and ShaderOutput::parent.

Referenced by clean().

void ShaderGraph::bump_from_displacement ( ) [protected]
void ShaderGraph::clean ( ) [protected]

Definition at line 355 of file graph.cpp.

References break_cycles(), ShaderNode::id, nodes, output(), and remove_proxy_nodes().

Referenced by finalize().

void ShaderGraph::connect ( ShaderOutput from,
ShaderInput to 
)
ShaderGraph * ShaderGraph::copy ( )

Definition at line 157 of file graph.cpp.

References add(), copy_nodes(), nodes, and ShaderGraph().

void ShaderGraph::copy_nodes ( set< ShaderNode * > &  nodes,
map< ShaderNode *, ShaderNode * > &  nnodemap 
) [protected]
void ShaderGraph::default_inputs ( bool  do_osl) [protected]
void ShaderGraph::disconnect ( ShaderInput to)

Definition at line 207 of file graph.cpp.

References assert, finalized, ShaderInput::link, ShaderOutput::links, and NULL.

Referenced by break_cycles(), and remove_proxy_nodes().

void ShaderGraph::finalize ( bool  do_bump = false,
bool  do_osl = false 
)

Definition at line 218 of file graph.cpp.

References bump_from_displacement(), clean(), default_inputs(), and finalized.

void ShaderGraph::find_dependencies ( set< ShaderNode * > &  dependencies,
ShaderInput input 
) [protected]

Definition at line 235 of file graph.cpp.

References ShaderNode::inputs, ShaderInput::link, NULL, and ShaderOutput::parent.

Referenced by bump_from_displacement().

ShaderNode * ShaderGraph::output ( )
void ShaderGraph::remove_proxy_nodes ( vector< bool > &  removed) [protected]

Member Data Documentation

Definition at line 199 of file graph.h.

Referenced by add(), connect(), disconnect(), finalize(), and ShaderGraph().


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