MCPcopy Create free account
hub / github.com/cogentcore/core / AsNode

Function AsNode

xyz/node.go:110–116  ·  view source on GitHub ↗

AsNode converts the given tree node to a [Node] and [NodeBase], returning nil if that is not possible.

(n tree.Node)

Source from the content-addressed store, hash-verified

108// AsNode converts the given tree node to a [Node] and [NodeBase],
109// returning nil if that is not possible.
110func AsNode(n tree.Node) (Node, *NodeBase) {
111 ni, ok := n.(Node)
112 if ok {
113 return ni, ni.AsNodeBase()
114 }
115 return nil, nil
116}
117
118// AsNodeBase returns a generic NodeBase for our node, giving generic
119// access to all the base-level data structures without requiring

Callers 12

OnAddMethod · 0.70
UpdateMeshBBoxMethod · 0.70
RaySolidIntersectionsMethod · 0.70
ValidateMethod · 0.70
UpdateMeshBBoxMethod · 0.70
UpdateWorldMatrixFunction · 0.70
UpdateMVPMatrixMethod · 0.70
ConfigNodesMethod · 0.70
RenderImplMethod · 0.70
AddFromLibraryMethod · 0.70
NodesUnderPointFunction · 0.70

Calls 1

AsNodeBaseMethod · 0.65

Tested by

no test coverage detected