MCPcopy Index your code
hub / github.com/g3n/engine / Node

Struct Node

core/node.go:44–67  ·  view source on GitHub ↗

Node represents an object in 3D space existing within a hierarchy.

Source from the content-addressed store, hash-verified

42
43// Node represents an object in 3D space existing within a hierarchy.
44type Node struct {
45 Dispatcher // Embedded event dispatcher
46 inode INode // The INode associated with this Node
47 parent INode // Parent node
48 children []INode // Children nodes
49 name string // Optional node name
50 loaderID string // ID used by loader
51 visible bool // Whether the node is visible
52 matNeedsUpdate bool // Whether the the local matrix needs to be updated because position or scale has changed
53 rotNeedsUpdate bool // Whether the euler rotation and local matrix need to be updated because the quaternion has changed
54 userData interface{} // Generic user data
55
56 // Spatial properties
57 position math32.Vector3 // Node position in 3D space (relative to parent)
58 scale math32.Vector3 // Node scale (relative to parent)
59 direction math32.Vector3 // Initial direction (relative to parent)
60 rotation math32.Vector3 // Node rotation specified in Euler angles (relative to parent)
61 quaternion math32.Quaternion // Node rotation specified as a Quaternion (relative to parent)
62
63 // Local transform matrix stores position/rotation/scale relative to parent
64 matrix math32.Matrix4
65 // World transform matrix stores position/rotation/scale relative to highest ancestor (generally the scene)
66 matrixWorld math32.Matrix4
67}
68
69// NewNode returns a pointer to a new Node.
70func NewNode() *Node {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected