The IInstance graph node interface. More...
#include "murl_graph_i_instance.h"
Public Member Functions | |
virtual INode * | GetNodeInterface ()=0 |
Get the mutable Graph::INode interface. More... | |
virtual const INode * | GetNodeInterface () const =0 |
Get the constant Graph::INode interface. More... | |
virtual IGraphResourceTarget * | GetGraphResourceTarget ()=0 |
Get a mutable Graph::IGraphResourceTarget container. More... | |
virtual const IGraphResourceTarget * | GetGraphResourceTarget () const =0 |
Get a constant Graph::IGraphResourceTarget container. More... | |
virtual ITemplateNodeTarget * | GetTemplateNodeTarget ()=0 |
Get the mutable Graph::ITemplateNodeTarget container. More... | |
virtual const ITemplateNodeTarget * | GetTemplateNodeTarget () const =0 |
Get the constant Graph::ITemplateNodeTarget container. More... | |
virtual Bool | SetNumberOfReplications (UInt32 numberOfReplications)=0 |
Set the number of replications. More... | |
virtual UInt32 | GetNumberOfReplications () const =0 |
Get the number of replications. More... | |
virtual INode * | GetReplicationNode (UInt32 index)=0 |
Return the replication at a given position. More... | |
virtual const INode * | GetReplicationNode (UInt32 index) const =0 |
Return the replication at a given position. More... | |
virtual Bool | AddParameter (const String &name, const String &value)=0 |
Add a user-defined instance parameter. More... | |
virtual UInt32 | GetNumberOfParameters () const =0 |
Get the total number of user-defined instance parameters. More... | |
virtual String | GetParameterName (UInt32 index) const =0 |
Get the name of a user-defined instance parameter at a given index. More... | |
virtual String | GetParameterValue (UInt32 index) const =0 |
Get the value of a user-defined instance parameter at a given index. More... | |
Detailed Description
The IInstance graph node interface.
This interface provides a means to instantiate zero, one, or more sub-graphs in the current scene graph. The source object (i.e. graph template) can either be a Resource::IGraph object from the resource collection set via GetGraphResourceTarget(), or an already instantiated Graph::ITemplate node referenced via GetTemplateNodeTarget().
Member Function Documentation
◆ GetNodeInterface() [1/2]
|
pure virtual |
Get the mutable Graph::INode interface.
This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.
- Returns
- The mutable Graph::INode interface, or null if not available
◆ GetNodeInterface() [2/2]
|
pure virtual |
Get the constant Graph::INode interface.
This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.
- Returns
- The constant Graph::INode interface, or null if not available
◆ GetGraphResourceTarget() [1/2]
|
pure virtual |
Get a mutable Graph::IGraphResourceTarget container.
This method returns a mutable pointer to a Graph::IGraphResourceTarget container, which allows to add, remove or query the graph resources referenced by a node implementing this interface.
- Returns
- The mutable Graph::IGraphResourceTarget container, or null if not available
◆ GetGraphResourceTarget() [2/2]
|
pure virtual |
Get a constant Graph::IGraphResourceTarget container.
This method returns a constant pointer to a Graph::IGraphResourceTarget container, which allows to query the graph resources referenced by a node implementing this interface.
- Returns
- The constant Graph::IGraphResourceTarget container, or null if not available
◆ GetTemplateNodeTarget() [1/2]
|
pure virtual |
Get the mutable Graph::ITemplateNodeTarget container.
This method returns a mutable pointer to the node's Graph::ITemplateNodeTarget container, which allows to set or query the template graph node used for instantiaton.
- Returns
- The mutable Graph::ITemplateNodeTarget container, or null if not available.
◆ GetTemplateNodeTarget() [2/2]
|
pure virtual |
Get the constant Graph::ITemplateNodeTarget container.
This method returns a constant pointer to the node's Graph::ITemplateNodeTarget container, which allows to query the template graph node used for instantiaton.
- Returns
- The mutable Graph::ITemplateNodeTarget container, or null if not available.
◆ SetNumberOfReplications()
|
pure virtual |
Set the number of replications.
This method sets the number of times the referenced graph resource should be instantiated. By default, this value is set to 1; it is also possible to set it to zero to not instantiate any graphs at all, useful e.g. when the instance node itself is used from within a parameterized sub-graph.
- Parameters
-
numberOfReplications The number of replications of the graph to create.
- Returns
- true if successful.
◆ GetNumberOfReplications()
|
pure virtual |
Get the number of replications.
- Returns
- The number of replications of the graph to create.
Referenced by Murl::Logic::GraphInstanceObjects< InstanceObjectType >::Init().
◆ GetReplicationNode() [1/2]
Return the replication at a given position.
This returns a mutable pointer to this node's replication at a given index.
- Parameters
-
index The zero-based index of the replication.
- Returns
- A pointer to the replication node, or null if the index was out of range.
Referenced by Murl::Logic::GraphInstanceObjects< InstanceObjectType >::Init().
◆ GetReplicationNode() [2/2]
Return the replication at a given position.
This returns a constant pointer to this node's replication at a given index.
- Parameters
-
index The zero-based index of the replication.
- Returns
- A pointer to the replication node, or null if the index was out of range.
◆ AddParameter()
|
pure virtual |
Add a user-defined instance parameter.
It is possible to parameterize a graph instance by adding individual parameter name/value pairs, which are then evaluated during creation of the given sub-graph. If a node attribute from the given graph resource contains an identifier name enclosed in curly braces, e.g. "{myVariable}", that sequence is replaced by the value of the parameter with the given name if present, otherwise a default value is used that can be defined in the graph resource (or an empty string if that default value is also not present).
- Parameters
-
name The parameter name. value The parameter value.
- Returns
- true if successful.
◆ GetNumberOfParameters()
|
pure virtual |
Get the total number of user-defined instance parameters.
- Returns
- The number of parameters.
◆ GetParameterName()
Get the name of a user-defined instance parameter at a given index.
- Parameters
-
index The zero-based index of the parameter to query.
- Returns
- The parameter name at the given index.
◆ GetParameterValue()
Get the value of a user-defined instance parameter at a given index.
- Parameters
-
index The zero-based index of the parameter to query.
- Returns
- The parameter value at the given index.
The documentation for this interface was generated from the following file:
- murl_graph_i_instance.h