Class: l3dtrail

Contains a collection of points, that are rendered as a quad strip.

Hierarchy

o-+ l3dlist
  o-+ l3dnode
    o-+ l3dtrail

Interfaces:

Methods:

Method overview:


new (string name,[l3dlayerid],int length)
returns: (trail)
a new trail system
closed (l3dtrail,[boolean])
returns: ([boolean])
sets or returns if trail ends where it starts. The last added point will be skipped and the first is used instead, so add one more point than the ones you really need.
closestdistance (l3dtrail,[float x,y,z])
returns: ([float dist,trailpoint,float fracc ])
returns closest line segment and distance to it. The closest point is fracc*(nexttpoint-tpoint). Last frame's state is used.
closestpoint (l3dtrail,[float x,y,z])
returns: ([float dist,trailpoint])
returns closest active trailpoint and distance to it. Last frame's state is used.
color (l3dtrail,int step,[float r,g,b,a])
returns: ([float r,g,b,a])
sets or returns color interpolater at step. There is 0-2 steps, step 3 or -1 sets all.
drawlength (l3dtrail,[int])
returns: ([int])
sets or return drawlength of trail
facecamera (l3dtrail,[bool])
returns: ([bool])
sets or return facecamera flag
indexcolor (l3dtrail,int step,[float r,g,b,a])
returns: ([float r,g,b,a])
sets or returns color at index. There is 0...length-1 steps. The regular color function creates linear interpolated values. This function lets you precisely modify every single value. However if you start using it, the regular color function will be ignored
indexsize (l3dtrail,int step,[float r,g,b,a])
returns: ([float r,g,b,a])
sets or returns size at index. There is 0...length-1 steps. The regular size function creates linear interpolated values. This function lets you precisely modify every single value. However if you start using it, the regular size function will be ignored.
localtime (l3dtrail,[int])
returns: ([int])
sets or returns trail's own localtime (in ms). Only active when uselocaltime is used.
materialnormalized (l3dtrail,[boolean])
returns: ([boolean])
sets or returns if the material/texture is stretched in such a fashion that its width is the length of the trail. If materialscale was applied before uscale will be applied, too.
materialscale (l3dtrail,float length, width)
returns: ()
sets how often a material/texture is repeated/minified. length is along x axis
matsurface (l3dtrail,[matsurface])
returns: ([material/texture])
sets or returns matsurface
normalizedsize (l3dtrail,[float])
returns: ([float])
sets or returns size of an absolute ulength when materialnormalized is used (0 disables).
planarmap (l3dtrail,[int])
returns: ([int])
sets or returns planar projection axis. -1 is none/disabled, 0 = x, 1 = y, z = 2. Materials will be projected along these axis.
planarscale (l3dtrail,[float])
returns: ([float])
sets or returns planarscale multiplier. texcoord = worldpos.projected * planarscale.
reset (l3dtrail)
returns: ()
clears all points
size (l3dtrail,int step,[float size])
returns: ([float s])
sets or returns size interpolater at step. There is 0-2 steps, step 3 or -1 sets all.
spawn (l3dtrail,float pos x,y,z,float normal x,y,z,[float vel x,y,z])
returns: (trailpoint)
spawns a new point in world/local coordinates, normal is needed when you dont use facecamera, and velocity when you use velocity. You can automaically spawn points with spawnstep. Illegal if typeworldref is used.
spawnstep (l3dtrail,[int])
returns: (int)
sets or returns spawnstep in ms, one point will be spawned every spawnstep, if spanwstep is greater 0.
spawnworldref (l3dtrail,actornode/scenenode,int axis)
returns: (trailpoint)
spawns a single particle that is autolinked to the given node. Axis is 0(X),1(Y),2(Z) and will mark the axis used for normals. Only works if typeworldref is used.
tpNext (l3dtrail,trailpoint)
returns: ([trailpoint])
gets next trailpoint (or null).
tpNormal (l3dtrail,trailpoint,[float x,y,z])
returns: ([float x,y,z])
gets or sets trailpoint's position. Either local or world coordinates, depending on if trail:uselocalpoints is set.
tpNormalarray (l3dtrail,[floatarray 3t])
returns: ([floatarray 3t])
sets or returns normal of active trailpoints from floatarray
tpPos (l3dtrail,trailpoint,[float x,y,z])
returns: ([float x,y,z])
gets or sets trailpoint's position. Either local or world coordinates, depending on if trail:uselocalpoints is set.
tpPosarray (l3dtrail,[floatarray 3t])
returns: ([floatarray 3t])
sets or returns position of active trailpoints from floatarray
tpPrev (l3dtrail,trailpoint)
returns: ([trailpoint])
gets previous trailpoint (or null).
tpTime (l3dtrail,trailpoint,[int])
returns: ([int])
gets or sets trailpoint's spawntime in ms.
tpVel (l3dtrail,trailpoint,[float x,y,z])
returns: ([float x,y,z])
gets or sets trailpoint's position. Either local or world coordinates, depending on if trail:uselocalpoints is set.
tpVelarray (l3dtrail,[floatarray 3t])
returns: ([floatarray 3t])
sets or returns velocity of active trailpoints from floatarray
typelocal (l3dtrail)
returns: ()
local transforms are used on the points. You should do this after a new trail, or after resetting. It does not allow spawnstep.
typeworld (l3dtrail)
returns: ()
local transforms are used on the points. You should do this after a new trail, or after resetting. (default)
typeworldref (l3dtrail)
returns: ()
points take their world coordinates from linked references. You should do this after a new trail, or after resetting. It does not allow spawnstep.
uselocaltime (l3dtrail,[boolean])
returns: ([boolean])
sets or returns if trail uses its own localtime (in ms). If false(default) the global time by luxinia is used. All events such as spawstep, usevelocity and spawntime for manually created tpoints depend on this.
usevelocity (l3dtrail,[boolean])
returns: ([boolean])
sets or returns if velocity vector should be added
velocity (l3dtrail,[float x,y,z])
returns: ([float x,y,z])
sets or returns velocity vector in local space, units per second.

Inherited Methods:

From l3dnode

cambox, camsphere, camvolumedelete, color, delete, isanimateable, lightmap, lightmaptexmatrix, linkinterface, localmatrix, localpos, localrotaxis, localrotdeg, localrotquat, localrotrad, name, novistest, parent, parentbone, renderscale, rotationlock, setlayer, unlink, unparentbone, uselocal, uselookat, usemanualworld, visflag, worldmatrix, worldpos, worldrotaxis, worldrotdeg, worldrotquat, worldrotrad

From l3dlist