Class: l2dnode

The List2D is drawn after the List3D and orthogonally. It is mainly used for HUD rendering text and buttons.The origin 0,0 is top left, the width is 640 and height is 480 independently of the current resolution.

Hierarchy

o-+ l2dnode
  o-- l2dflag
  o-- l2dimage
  o-- l2dnode3d
  o-- l2dtext

Interfaces:

Methods:

Method overview:


new (string name)
returns: (l2dnode)
returns a new l2dnode, that can be used for hierarchy and organisation
color (l2dnode,[float r,g,b,a])
returns: ([float r,g,b,a])
returns or sets l2dnode's color
delete (l2dnode,[boolean withchildren])
returns: ()
deletes node. If withchildren is set children are deleted as well, if not (as by default) they are linked to root.
deleteall ()
returns: ()
deletes all node
firstchild (l2dnode,[l2dnode])
returns: ([l2dnode])
returns or sets first child of the children list. First child is rendered first. Useful for manual sorting.
get (string)
returns: ([l2dnode])
returns l2dnode with given name
getroot ()
returns: (l2dnode)
returns root node. Root doesn't inherit its position info.
l3dtarget (l2dnode node,[l3dnode])
returns: ([l3dnode])
returns or sets l3dtarget
l3dtargetoff (l2dnode node)
returns: ()
sets l3dtarget off
local2world (l2dnode,float x,y,z)
returns: (float x,y,z)
returns coordinates after transforms. l3dtargets will not be taken in account.
parent (l2dnode,[l2dnode parent])
returns: ([l2dnode])
returns or sets parent node. We will inherit transforms of parents and also won't be drawn if parent is not drawn.
pos (l2dnode,[float x,y,z])
returns: ([float x,y,z])
returns or sets l2dnode's position
rotcenter (l2dnode,[float x,y,z])
returns: ([float x,y,z])
returns or sets l2dnode's center of rotation
rotdeg (l2dnode,[float x,y,z])
returns: ([float x,y,z])
returns or sets l2dnode's rotation in degrees
rotrad (l2dnode,[float x,y,z])
returns: ([float x,y,z])
returns or sets l2dnode's rotation in radians
scale (l2dnode,[float x,y,z])
returns: ([float x,y,z])
returns or sets l2dnode's scale
scissor (l2dnode,[boolean])
returns: ([boolean])
returns or sets if scissoring should be used. If scissoring is enabled only pixels within scissor rectangle are drawn. Makes sure proper scissorsize and scissorstart are set.
scissorlocal (l2dnode,[boolean])
returns: ([boolean])
returns or sets if own scissorstart is transformed with the node's matrix. The size is not transformed.
scissorparent (l2dnode,[boolean])
returns: ([boolean])
returns or sets if parent's scissor information is used as well. If own node has no scissor set we will use parents, else we cap own with parent's
scissorsize (l2dnode,[float x,y])
returns: ([float x,y])
returns or sets scissor rectangle size.
scissorstart (l2dnode,[float x,y])
returns: ([float x,y])
returns or sets scissor rectangle startpoint.
sortid (l2dnode,[int])
returns: ([int])
returns or sets l2dnode's sortid (lower gets rendered first). Setting a value will result into the parent's children list being resorted.
swapinchildlist (l2dnode,l2dnode)
returns: ()
swaps the children within the parent's childlist.
world2local (l2dnode,float x,y,z)
returns: (float x,y,z)
returns coordinates in localspace. l3dtargets will not be taken in account.