# Class: actornode

The actorlist is a double linked ring list containing actornodes. The purpose of actors is to provide positional and movement information as dynamic spatialnodes.

Actors are normaly used for objects that are moved around and can be directly linked with dbody objects, which are used in physical simulations.

## Example

A simple visible box, attached to an actor. The visual appearance can be manipulated with the functions listed in the l3dnode or l3dprimitive classes.

     -- connect a l3dprimitive with an actor and use another actor as camera
     UtilFunctions.simplerenderqueue() actor = actornode.new('actor')
     actor.l3d = l3dprimitive.newbox('box',1,1,1)
     actor.l3d:linkinterface(actor) -- connect the box with the actor
     cam = actornode.new('camera',5,4,3)
     l3dcamera.default():linkinterface(cam) -- use the cam actornode as camera
     cam:lookat(0,0,0, 0,0,1) -- look at 0,0,0 and up is 0,0,1

## Hierarchy

    o-+ spatialnode
      o-+ actornode

## Methods:

### Method overview:

- delete
- fromindex
- getcount
- link
- linkbone
- lookat
- matrix
- name
- new
- next
- pos
- prev
- rotaxis
- rotdeg
- rotquat
- rotrad
- vistestbbox

new (string name,[boolean drawable],[float x,y,z])
  returns: (actornode)
  creates a new actornode (default is drawable at 0,0,0) with the given name
delete (actornode)
  returns: ()
  deletes the actornode
fromindex (int index)
  returns: ([actornode])
  returns the actornode at the given index. Returns nothing if the index is out of bounds. Index may be negative and will count back from the end of the list then.
getcount ()
  returns: (int count)
  returns the current number of actornodes in the system.
link (actornode, [dgeom/dbody/other])
  returns: ()
  links actornode to given body or unlinks it if other type is given (i.e. boolean) or if nothing is given. An actor can't tell you the body that it is linked to.
linkbone (actornode self, l3dmodel model, string bone,[matrix4x4 offset])
  returns: ()
  Links the actor to a certain bone. The position of the actor can not be changed anymore when it is linked. The matrix of a bone is only correct if the l3dnode is visible! Otherwise the behaviour is undefined.
lookat (actornode self, float tox,toy,toz,upx,upy,upz,[int axis 0-2])
  returns: ()
  rotates actornode to look at a point along defined axis. axis can be 0:x, 1:y (defualt) 2:z.
matrix (actornode self, [matrix4x4 m])
  returns: ([matrix4x4 m])
  sets/gets matrix
name
  [string name] name (ActorNode self) - gets the name
next (actornode)
  returns: (actornode)
  returns the next actornode in the list (which can be the same if only one actornode is present).
pos (actornode self, [float x,y,z])
  returns: ([float x,y,z])
  sets/gets position
prev (actornode)
  returns: (actornode)
  returns the prev actornode in the list (which can be the same if only one actornode is present).
rotaxis (ActorNode self,[float Xx,Xy,Xz, Yx,Yy,Yz, Zx,Zy,Zz])
  returns: ([float Xx,Xy,Xz, Yx,Yy,Yz, Zx,Zy,Zz])
  returns or sets rotation axis, make sure they make a orthogonal basis.
rotdeg (actornode self, [float x,y,z])
  returns: ([float x,y,z])
  sets/gets rotation in degrees
rotquat (actornode self, [float x,y,z,w])
  returns: ([float x,y,z,w])
  sets/gets rotation as quaternion
rotrad (actornode self, [float x,y,z])
  returns: ([float x,y,z])
  sets/gets rotation in radians
vistestbbox (actornode self, [float minX,minY,minZ,maxX,maxY,maxZ])
  returns: ([float minX,minY,minZ,maxX,maxY,maxZ])
  sets/gets visibility testing boundingbox when actornode is drawable

## Inherited Methods: