Public Member Functions | |
| Node * | lastNode (void) |
| Node * | addNode (string name) |
| NodeGraph * | addSubGraph (void) |
| bool | moveNode (Node *node, NodeGraph *dest) |
| bool | moveNodeGraph (NodeGraph *graph, NodeGraph *dest) |
| NodeDescriptorList * | availableNodeList (void) |
| ToolList * | availableToolList (void) |
| NodeList * | nodeList (void) |
| bool | contains (string uuid, bool recursive=true) |
| NodeList * | findNodes (string uuid, bool recursive=true) |
| Node * | findNode (int id, bool recursive=true) |
| Node * | findNodeByName (name) |
| NodeGraphList * | findNodeGraphsByName (string name) |
| bool | removeNode (Node *) |
| Tool * | getTool (string uuid) |
| Mesh * | getMesh (bool recursive=false) |
| Vector3 * | boundingBoxSize (void) |
| Vector3 * | boundingBox (int minMax) |
| void | sortNodes (void) |
| void | loadObjectTemplate (string templateId, int year=-1, string style="", string tag="", string adjectives="") |
| void | loadMaterialTemplate (string templateId) |
Public Member Functions inherited from Node | |
| string | name (void) |
| void | setName (string) |
| int | id (void) |
| ParameterContainer * | paramContainer (void) |
| NodeGraph * | parentGraph (void) |
| NodeGraph * | rootGraph (void) |
| NodeGraph * | toNodeGraph (void) |
| NodeDescriptor * | descriptor (void) |
| TerminalList * | terminalList (void) |
| Terminal * | terminal (string name) |
Represents a Node Container.
The NodeGraph class represents a container which holds a certain amount of Nodes and other NodeGraphs. In RaySupreme, a top level NodeGraph is an Object, it's sub Objects are represented by child NodeGraphs.
| Node* NodeGraph::addNode | ( | string | name) |
Add a Node of the given path to the Graph.
| name | The path of the Node to be added. You can get a list of available Nodes and their paths via the availableNodeList() function. |
| NodeGraph* NodeGraph::addSubGraph | ( | void | ) |
Add a Subgraph to this Graph.
| NodeDescriptorList* NodeGraph::availableNodeList | ( | void | ) |
Returns a NodeDescriptorList of all available Node types (not actual nodes, use nodeList() for this).
| ToolList* NodeGraph::availableToolList | ( | void | ) |
| Vector3* NodeGraph::boundingBox | ( | int | minMax) |
Returns a vector with either the min values of the bounding box or the max values.
| minMax | If 0, returns the minimum values of the bounding box, if 1, returns the maximum values. |
| Vector3* NodeGraph::boundingBoxSize | ( | void | ) |
| bool NodeGraph::contains | ( | string | uuid, |
| bool | recursive = true |
||
| ) |
Returns true if this graph (or also it's sub-graphs if recursive is specified) contains a node with the given uuid or path.
| uuid | The uuid or path of the node. |
| recursive | If true, the search will look recursively into all sub-graphs of this graph. |
| Node* NodeGraph::findNode | ( | int | id, |
| bool | recursive = true |
||
| ) |
Finds the node of the given id, each node inside a graph has a unique id valid during it's lifetime. You can query this id using Node::id().
| recursive | If true, the search will look recursively into all sub-graphs of this graph. |
| NodeGraphList* NodeGraph::findNodeGraphsByName | ( | string | name) |
| NodeList* NodeGraph::findNodes | ( | string | uuid, |
| bool | recursive = true |
||
| ) |
Returns a list of all nodes in this graph (or also it's sub-graphs if recursive is specified) which have a uuid or path of the given value. This way you can get a list of certain type of nodes inside this graph.
| uuid | The uuid or path of the node to search for. |
| recursive | If true, the search will look recursively into all sub-graphs of this graph. |
| Mesh* NodeGraph::getMesh | ( | bool | recursive = false) |
Returns the mesh of this NodeGraph. If recursive is true, also searches all childs and returns the first found. If no MeshEditor node was found in the NodeGraph, this function will return null.
| recursive | Defines if the childs should be searched too, default value is false. |
| Tool* NodeGraph::getTool | ( | string | uuid) |
| Node* NodeGraph::lastNode | ( | void | ) |
| void NodeGraph::loadMaterialTemplate | ( | string | templateId) |
Loads the material template identified by templateId as a subgraph.
| templateId | The templateId identifies the template to be loaded. It can either be it's uuid, name or alternative name. |
| year | Optionally defines the year the template has to support. -1 means the current year. |
| style | Optionally defines a style which the template should support. |
| tag | Optionally defines a tag the template should support. |
| adjectives | Optionally defines the adjectives for the template (Not yet supported). |
| void NodeGraph::loadObjectTemplate | ( | string | templateId, |
| int | year = -1, |
||
| string | style = "", |
||
| string | tag = "", |
||
| string | adjectives = "" |
||
| ) |
Loads the object template identified by templateId as a subgraph.
| templateId | The templateId identifies the template to be loaded. It can either be it's uuid, name or alternative name. |
| year | Optionally defines the year the template has to support. -1 means the current year. |
| style | Optionally defines a style which the template should support. |
| tag | Optionally defines a tag the template should support. |
| adjectives | Optionally defines the adjectives for the template (Not yet supported). |
| NodeList* NodeGraph::nodeList | ( | void | ) |
Returns a list of all nodes inside this graph. Note that NodeGraphs are also returned as Node's, you will have to check via Node::toNodeGraph() if a certain node is a Node or actually a NodeGraph.
| bool NodeGraph::removeNode | ( | Node * | ) |
Delete the given Node which has to be inside this graph. If the node represents a graph, all the content of the sub-graph will be deleted.
| void NodeGraph::sortNodes | ( | void | ) |
NodeGraphs in RaySupreme are structured based on the connections of the contained nodes. The last node of a Graph is most certainly always a transform. When adding nodes manually, this structure is not enforced. You can call sortNodes() to make the Graph sort it's nodes immediately.
1.8.4