Class: RenderNode

og.scene.RenderNode

new og.scene.RenderNode(name)

Render node is a logical part of a render mechanism. Represents scene rendering. Forexample one scene node for rendering the Earth, another one for rendering the Moon, another node for rendering stars etc. Each render node has own model view space defined with matrices(scale, rotation, translation, transformation). There are collections of ligh sources, entities and so on in the node. Access to the node is renderer.renderNodes["Earth"]
Name Type Description
name string Node name.

Extends

Members

protectedbillboardsTextureAtlasog.utils.TextureAtlas

Texture atlas for the billboards images. One atlas per node.

childNodesArray.<og.scene.Node>

Children nodes.

entityCollectionsArray.<og.EntityCollection>

Entity collection array.

eventsog.Events

Render node events.

fontAtlasog.utils.FontAtlas

Texture font atlas for the font families and styles. One atlas per node.

lightEnabledboolean

Lighting calculations.

namestring

Node name.

parentNodeog.scene.Node

Parent node pointer.

rendererog.Renderer

Renderer that calls frame() callback.

show

Show rendering.

topNodeog.scene.Node

Top scene tree node pointer.

Methods

inherited protected_clear()

Clear current node.

addEntityCollection(entityCollection, isHidden){og.scene.RenderNode}

Adds entity collection.
Name Type Description
entityCollection og.EntityCollection Entity collection.
isHidden boolean optional If it's true that this collection has specific rendering.
Returns:
Type Description
og.scene.RenderNode
Adds point light source.
Name Type Description
light og.LightSource Light source.
Returns:
Type Description
og.scene.RenderNode
Adds node to the current hierarchy.

assignRenderer(renderer)

Assign render node with renderer.
Name Type Description
renderer og.Renderer Redner node's renderer.
Destroy node.

drawEntityCollections()

Calls render frame node's callback. Used in renderer.

drawPickingEntityCollections()

Gets light object by its name.
Name Type Description
name string Point light name.
Returns:
Type Description
og.LightSource
Gets node by name in the current.
Name Type Description
name string Node name.
Returns:
Type Description
og.scene.Node Node object in the current node.

isActive(){boolean}

Gets render node activity.
Returns:
Type Description
boolean

removeEntityCollection(entityCollection)

Removes entity collection.
Name Type Description
entityCollection og.EntityCollection Entity collection for remove.

removeLight(light)

Removes light source.
Name Type Description
light og.LightSource Light source object.

setActive(isActive)

Activate rendering this node.
Name Type Description
isActive boolean Activation flag.

transformLights()

This function have to be called manualy in each render node frame callback, before drawing scene geometry.