Class: floatarray

Floatarray in Luxinia for array operations.

Hierarchy

o-+ mathlib
  o-+ staticarray
    o-+ floatarray

Methods:

Method overview:


new (int count)
returns: (floatarray)
creates a new staticarray. Count must be >0.
add (floatarray self,floatarray / value a, [staticarray b])
returns: ()
self+=a or self = a + b
div (floatarray self,floatarray / value a, [staticarray b])
returns: ()
self/=a or self = a / b
lerp (floatarray interpolated(i), floatarray splinepos(n))
returns: ()
does linear interpolation based on the n floats (eventimed), and interpolates using i steps.
lerp3 (floatarray interpolated(3i), floatarray splinepos(3n))
returns: ()
does linear interpolation based on the n vectors (eventimed), and interpolates using i steps.
lerp4 (floatarray interpolated(4i), floatarray splinepos(4n))
returns: ()
does linear interpolation based on the n vectors (eventimed), and interpolates using i steps.
lit (floatarray outputintensities(4n), floatarray vertexpos(3n), floatarray vertexnormal(3n), float lightpos x,y,z ,float diffuse r,g,b ,float ambient r,g,b ,float attconst, float attlin, float attsq)
returns: ()
computes per vertex lighting intensities for n vertices into the given array. The given light position, attenuation and color values are used. Note that light position must be in same coordinate system as vertices (local).
max (floatarray self,floatarray / value a, [staticarray b])
returns: ()
self = max(self,a) or self = max(a,b)
min (floatarray self,floatarray / value a, [staticarray b])
returns: ()
self = min(self,a) or self = min(a,b)
mul (floatarray self,floatarray / value a, [staticarray b])
returns: ()
self*=a or self = a * b
set (floatarray self,floatarray / value a)
returns: ()
self = a (copy an array or set value to all)
spline3 (floatarray interpolated(3i), floatarray splinepos(3n))
returns: ()
does spline interpolation based on the n splinepos vectors (eventimed), and interpolates using i steps.
sub (floatarray self,floatarray / value a, [staticarray b])
returns: ()
self-=a or self = a - b
tonext3 (floatarray out(3n))
returns: ()
for every vector we do (next-self)
vector3 (floatarray,int index, [float x,y,z])
returns: ([float x,y,z])
returns or sets ith vector3, make sure count is 3*maxindex.
vector3all (floatarray,float x,y,z,[int startfloat, vectorcount, stride])
returns: ()
returns or sets all values of the floatarray, optionally can set from which float to start and how many vectors. Vectorsize is 3+stride.
vector4 (floatarray,int index, [float x,y,z,w])
returns: ([float x,y,z,w])
returns or sets ith vector4, make sure count is 4*maxindex.

Inherited Methods:

From staticarray

clamp, count, index, resize