SGNode Methods

The methods of the SGNode class are listed here. For a complete list of SGNode class members, see SGNode class.

Name

Description

appendChild Method

Adds a child node under the caller’s node.

removeChild Method

Removes a child node from the caller’s node.

parentNode Method

Returns the parent node of the caller’s node.

hasChildNodes Method

Checks if there are child nodes under the caller’s node.

firstChild Method

Returns the first child node of the caller’s node.

lastChild Method

Returns the last child node of the caller’s node.

nextSibling Method

Returns the next sibling node of the caller’s node.

childNodes Method

Returns a list of child nodes.

selectSingleNode Method

Searches for a child node under the caller’s node.

setVisibility Method

Sets the visibility of the caller’s node and all of its children.

getVisibility Method

Returns the visibility status of the node.

sort Method

Sets the sort mode for the node.

save Method

Saves the caller node and all its children as a fly layer.

load Method

Loads a previously saved fly layer to the node.

getPosition Method

Returns the node position in the 3D world.

setPosition Method

Sets the position of the node in the 3D world.

setMessage Method

Attaches a message object to the caller’s node.

setAttribute Method

Sets an attribute to the node.

getAttribute Method

Returns a node attribute.

setData Method

Stores a data string (usually an XML) in the node.

getData Method

Returns a data string that was stored in the node.

nodeType Method

Returns the node type.

nodeId Method

Returns a number that represents the ID of the node.

getName Method

Returns the name of the node.

setName Method

Sets the name of the node.

isEqual Method

Returns true if the two nodes represent internally the same innerObj.