Function PathTracer.SplicePath
SplicePath
(int startIndex, int toRemove, List<GraphNode> toInsert)
Removes nodes [startIndex, startIndex+toRemove) and then inserts the given nodes at startIndex.
Public
bool SplicePath (
int | startIndex | Absolute index of the first node to remove |
int | toRemove | Number of nodes to remove |
List<GraphNode> | toInsert | Nodes to insert at startIndex. The nodes must not be destroyed. Passing null is equivalent to an empty list. |
Removes nodes [startIndex, startIndex+toRemove) and then inserts the given nodes at startIndex.
Returns true if the splicing succeeded. Returns false if splicing failed because it would have to access destroyed nodes. In that case the path is left unmodified.