MCPcopy
hub / github.com/g3n/engine / Add

Method Add

core/node.go:311–317  ·  view source on GitHub ↗

Add adds the specified node to the list of children and sets its parent pointer. If the specified node had a parent, the specified node is removed from the original parent's list of children.

(ichild INode)

Source from the content-addressed store, hash-verified

309// Add adds the specified node to the list of children and sets its parent pointer.
310// If the specified node had a parent, the specified node is removed from the original parent's list of children.
311func (n *Node) Add(ichild INode) *Node {
312
313 setParent(n.GetINode(), ichild)
314 n.children = append(n.children, ichild)
315 n.Dispatch(OnDescendant, nil)
316 return n
317}
318
319// AddAt adds the specified node to the list of children at the specified index and sets its parent pointer.
320// If the specified node had a parent, the specified node is removed from the original parent's list of children.

Callers 10

NewSceneMethod · 0.95
LoadSceneMethod · 0.95
NewGroupMethod · 0.95
RotateMethod · 0.45
ZoomMethod · 0.45
PanMethod · 0.45
CloneMethod · 0.45
TranslateOnAxisMethod · 0.45
ProcessTimersMethod · 0.45
setTimerMethod · 0.45

Calls 3

GetINodeMethod · 0.95
setParentFunction · 0.85
DispatchMethod · 0.65

Tested by

no test coverage detected