Class: Math3D

LuxModule: luxinialuacore

The Math3D class contains some generic math operations. Vectors and matrices are passed as indexed tables from 1-3 or 1-16.

Methods:

Method overview:


cross (table a, b)
returns: (table vector)
returns cross product of 3d vector a and b
dif (table a,b)
returns: (table difference)
returns difference vector between a and b
len (table vec)
returns: (float len)
euklid length of vecotr (a²+b²+c²)^0.5
normalize (table vec)
returns: (table normalized,float origlength)
returns normalized vector 3d vector and the original length of the vector
sqlen (table vec)
returns: (float len)
square distance. This function is a little bit faster than the len function which returns the squareroot of this function. If you only want to compare distances (i.e. is this point inside my distance), you can square the distance you would like to compare with. This is worth the effort since it does not make much difference in code and work.
sum (table a,b)
returns: (table sum)
returns summed vector between a and b