Module laneutil.nodeutil

Provides basic classes for node handling

Functions

node (v, t[, id]) Constructor returning nodeInstance
nodeManager (nodeClass[, precision=0.02]) Constructor returning nodeManagerInstance

Class nodeInstance

nodeInstance:addTag (key, value) Add a tag with any value to the node
nodeInstance:getTag (key) Get the value of the specified tag
nodeInstance:removeTag (key) Remove the specified tag and return its value

Class nodeManagerInstance

nodeManagerInstance:get (v, t) Get a node with the given position and tangent
nodeManagerInstance:nodeList () Returns all stored nodes in a simple list


Functions

node (v, t[, id])
Constructor returning nodeInstance

Parameters:

  • v vec3
  • t vec3
  • id string (optional)

Returns:

    nodeInstance
nodeManager (nodeClass[, precision=0.02])
Constructor returning nodeManagerInstance

Parameters:

  • nodeClass node
  • precision number (default 0.02)

Returns:

    nodeManagerInstance

Class nodeInstance

Base class for nodes
nodeInstance:addTag (key, value)
Add a tag with any value to the node

Parameters:

Returns:

    boolean if setting the tag was successfull
nodeInstance:getTag (key)
Get the value of the specified tag

Parameters:

Returns:

    content of the tag or nil
nodeInstance:removeTag (key)
Remove the specified tag and return its value

Parameters:

Returns:

    content of the tag or nil

Class nodeManagerInstance

Stores all nodes and makes sure there aren't two identical nodes
nodeManagerInstance:get (v, t)
Get a node with the given position and tangent

Parameters:

  • v vec3
  • t vec3

Returns:

    nodeInstance
nodeManagerInstance:nodeList ()
Returns all stored nodes in a simple list

Returns:

    {nodeInstance,...}
generated by LDoc 1.4.6 Last updated 2018-11-09 12:08:57