simEigen Plugin API reference

A plugin wrapping some functions of the Eigen C++ library.

It also contains a Lua class for matrix operations:
a = simEigen.Matrix{{1, 2}, {3, 4}} ainv = a:pinv() a * ainv - simEigen.Matrix.eye(2)

simEigen.Matrix
simEigen.Matrix:abs
simEigen.Matrix:acos
simEigen.Matrix:add
simEigen.Matrix:asin
simEigen.Matrix:atan
simEigen.Matrix:block
simEigen.Matrix:blockassign
simEigen.Matrix:ceil
simEigen.Matrix:col
simEigen.Matrix:coldata
simEigen.Matrix:cols
simEigen.Matrix:copy
simEigen.Matrix:cos
simEigen.Matrix:count
simEigen.Matrix:cross
simEigen.Matrix:data
simEigen.Matrix:deg
simEigen.Matrix:det
simEigen.Matrix:div
simEigen.Matrix:dot
simEigen.Matrix:exp
simEigen.Matrix:eye
simEigen.Matrix:floor
simEigen.Matrix:horzcat
simEigen.Matrix:iabs
simEigen.Matrix:iacos
simEigen.Matrix:iadd
simEigen.Matrix:iasin
simEigen.Matrix:iatan
simEigen.Matrix:iceil
simEigen.Matrix:icos
simEigen.Matrix:ideg
simEigen.Matrix:idiv
simEigen.Matrix:iexp
simEigen.Matrix:ifloor
simEigen.Matrix:iintdiv
simEigen.Matrix:ilog
simEigen.Matrix:ilog10
simEigen.Matrix:ilog2
simEigen.Matrix:imax
simEigen.Matrix:imin
simEigen.Matrix:imod
simEigen.Matrix:imul
simEigen.Matrix:intdiv
simEigen.Matrix:inversetransform
simEigen.Matrix:irad
simEigen.Matrix:isin
simEigen.Matrix:ismatrix
simEigen.Matrix:isorthogonal
simEigen.Matrix:isqrt
simEigen.Matrix:isub
simEigen.Matrix:isvector
simEigen.Matrix:itan
simEigen.Matrix:item
simEigen.Matrix:itimes
simEigen.Matrix:kron
simEigen.Matrix:linspace
simEigen.Matrix:log
simEigen.Matrix:log10
simEigen.Matrix:log2
simEigen.Matrix:max
simEigen.Matrix:maxcoeff
simEigen.Matrix:maxcoeff
simEigen.Matrix:maxcoeff
simEigen.Matrix:min
simEigen.Matrix:mod
simEigen.Matrix:mul
simEigen.Matrix:norm
simEigen.Matrix:norm
simEigen.Matrix:normalize
simEigen.Matrix:normalized
simEigen.Matrix:pinv
simEigen.Matrix:print
simEigen.Matrix:prod
simEigen.Matrix:prod
simEigen.Matrix:rad
simEigen.Matrix:reshaped
simEigen.Matrix:row
simEigen.Matrix:rowdata
simEigen.Matrix:rows
simEigen.Matrix:setcol
simEigen.Matrix:setcoldata
simEigen.Matrix:setdata
simEigen.Matrix:setitem
simEigen.Matrix:setrow
simEigen.Matrix:setrowdata
simEigen.Matrix:sin
simEigen.Matrix:sqrt
simEigen.Matrix:sub
simEigen.Matrix:svd
simEigen.Matrix:tan
simEigen.Matrix:times
simEigen.Matrix:trace
simEigen.Matrix:transform
simEigen.Matrix:transpose
simEigen.Matrix:transposed
simEigen.Matrix:vertcat
simEigen.Pose
simEigen.Pose:data
simEigen.Pose:fromtransform
simEigen.Pose:inv
simEigen.Pose:ispose
simEigen.Pose:mul
simEigen.Pose:totransform
simEigen.Quaternion
simEigen.Quaternion:data
simEigen.Quaternion:fromaxisangle
simEigen.Quaternion:fromeuler
simEigen.Quaternion:fromrotation
simEigen.Quaternion:imul
simEigen.Quaternion:inv
simEigen.Quaternion:isquaternion
simEigen.Quaternion:mul
simEigen.Quaternion:slerp
simEigen.Quaternion:toaxisangle
simEigen.Quaternion:toeuler
simEigen.Quaternion:torotation
simEigen.Vector

simEigen.Matrix

Description construct a new matrix; can also use the form: simEigen.Matrix{{1, 2}, {3, 4}} to construct directly from data, size will be determined automatically
Lua synopsis table m = simEigen.Matrix(int rows, int cols, float[] data)
Lua parameters
rows (int): number of rows
cols (int): number of columns
data (table of float): initialization data (optional; can also be a single value)
Lua return values
m (table): the new matrix (Matrix)

simEigen.Matrix:abs

Description compute element-wise absolute value
Lua synopsis table m = simEigen.Matrix:abs()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:acos

Description compute element-wise arccosine
Lua synopsis table m = simEigen.Matrix:acos()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:add

Description compute element-wise addition with another matrix or scalar
Lua synopsis table m = simEigen.Matrix:add(table m2)
Lua parameters
m2 (table): the other matrix (Matrix) or a scalar (float)
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:asin

Description compute element-wise arcsine
Lua synopsis table m = simEigen.Matrix:asin()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:atan

Description compute element-wise arctangent
Lua synopsis table m = simEigen.Matrix:atan()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:block

Description return a block of this matrix
Lua synopsis table m = simEigen.Matrix:block(int i, int j, int p, int q)
Lua parameters
i (int): start row
j (int): start column
p (int): block rows
q (int): block columns
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:blockassign

Description assign a matrix to a block of this matrix
Lua synopsis table self = simEigen.Matrix:blockassign(table m, int i, int j, int p, int q)
Lua parameters
m (table): the other matrix (Matrix)
i (int): start row
j (int): start column
p (int): block rows
q (int): block columns
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:ceil

Description compute element-wise ceiling
Lua synopsis table m = simEigen.Matrix:ceil()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:col

Description return the j-th column as a new vector
Lua synopsis table m = simEigen.Matrix:col(int j)
Lua parameters
j (int): column index
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:coldata

Description get the data of the j-th column
Lua synopsis float[] a = simEigen.Matrix:coldata(int j)
Lua parameters
j (int): column index
Lua return values
a (table of float): table of numbers

simEigen.Matrix:cols

Description return the number of columns
Lua synopsis int number = simEigen.Matrix:cols()
Lua parameters -
Lua return values
number (int): of columns

simEigen.Matrix:copy

Description create a copy of this matrix
Lua synopsis table m = simEigen.Matrix:copy()
Lua parameters -
Lua return values
m (table): a new matrix with same dimensions and data (Matrix)

simEigen.Matrix:cos

Description compute element-wise cosine
Lua synopsis table m = simEigen.Matrix:cos()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:count

Description return the number of data items
Lua synopsis int number = simEigen.Matrix:count()
Lua parameters -
Lua return values
number (int): of data items

simEigen.Matrix:cross

Description compute the vector cross product with 'v2'
Lua synopsis table v = simEigen.Matrix:cross(table v2)
Lua parameters
v2 (table): the other vector (Matrix)
Lua return values
v (table): the resulting vector (Matrix)

simEigen.Matrix:data

Description get the data of this matrix, in row-major order
Lua synopsis float[] a = simEigen.Matrix:data()
Lua parameters -
Lua return values
a (table of float): table of numbers

simEigen.Matrix:deg

Description compute element-wise radians to degree conversion
Lua synopsis table m = simEigen.Matrix:deg()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:det

Description compute matrix determinant
Lua synopsis float d = simEigen.Matrix:det()
Lua parameters -
Lua return values
d (float): matrix determinant

simEigen.Matrix:div

Description compute element-wise division with another matrix or scalar
Lua synopsis table m = simEigen.Matrix:div(table m2)
Lua parameters
m2 (table): the other matrix (Matrix) or a scalar (float)
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:dot

Description compute the dot product with 'v2'
Lua synopsis float the = simEigen.Matrix:dot(table v2)
Lua parameters
v2 (table): the other vector (Matrix)
Lua return values
the (float): result

simEigen.Matrix:exp

Description compute element-wise exponential
Lua synopsis table m = simEigen.Matrix:exp()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:eye

Description (class method) create a new identity matrix of given size
Lua synopsis table m = simEigen.Matrix:eye(int n)
Lua parameters
n (int): size
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:floor

Description compute element-wise floor
Lua synopsis table m = simEigen.Matrix:floor()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:horzcat

Description stack two or more matrices horizontally
Lua synopsis table m = simEigen.Matrix:horzcat(table m2)
Lua parameters
m2 (table): matrix to stack (Matrix)
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:iabs

Description compute element-wise absolute value, in place
Lua synopsis table self = simEigen.Matrix:iabs()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:iacos

Description compute element-wise arccosine, in place
Lua synopsis table self = simEigen.Matrix:iacos()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:iadd

Description compute element-wise addition with another matrix or scalar, in place
Lua synopsis table self = simEigen.Matrix:iadd(table m)
Lua parameters
m (table): the other matrix (Matrix) or a scalar (float)
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:iasin

Description compute element-wise arcsine, in place
Lua synopsis table self = simEigen.Matrix:iasin()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:iatan

Description compute element-wise arctangent, in place
Lua synopsis table self = simEigen.Matrix:iatan()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:iceil

Description compute element-wise ceiling, in place
Lua synopsis table self = simEigen.Matrix:iceil()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:icos

Description compute element-wise cosine, in place
Lua synopsis table self = simEigen.Matrix:icos()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:ideg

Description compute element-wise radians to degrees conversion, in place
Lua synopsis table self = simEigen.Matrix:ideg()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:idiv

Description compute element-wise division with another matrix or scalar, in place
Lua synopsis table self = simEigen.Matrix:idiv(table m)
Lua parameters
m (table): the other matrix (Matrix) or a scalar (float)
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:iexp

Description compute element-wise exponential, in place
Lua synopsis table self = simEigen.Matrix:iexp()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:ifloor

Description compute element-wise floor, in place
Lua synopsis table self = simEigen.Matrix:ifloor()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:iintdiv

Description compute element-wise integer division with another matrix or scalar, in place
Lua synopsis table self = simEigen.Matrix:iintdiv(table m)
Lua parameters
m (table): the other matrix (Matrix) or a scalar (float)
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:ilog

Description compute element-wise natural logarithm, in place
Lua synopsis table self = simEigen.Matrix:ilog()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:ilog10

Description compute element-wise base-10 logarithm, in place
Lua synopsis table self = simEigen.Matrix:ilog10()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:ilog2

Description compute element-wise base-2 logarithm, in place
Lua synopsis table self = simEigen.Matrix:ilog2()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:imax

Description compute element-wise maximum with another matrix or scalar, in place
Lua synopsis table self = simEigen.Matrix:imax(table m)
Lua parameters
m (table): the other matrix (Matrix) or a scalar (float)
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:imin

Description compute element-wise minimum with another matrix or scalar, in place
Lua synopsis table self = simEigen.Matrix:imin(table m)
Lua parameters
m (table): the other matrix (Matrix) or a scalar (float)
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:imod

Description compute element-wise modulo with another matrix or scalar, in place
Lua synopsis table self = simEigen.Matrix:imod(table m)
Lua parameters
m (table): the other matrix (Matrix) or a scalar (float)
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:imul

Description compute matrix multiplication with another matrix or scalar, in place
Lua synopsis table self = simEigen.Matrix:imul(table m)
Lua parameters
m (table): the other matrix (Matrix) or a scalar (float)
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:intdiv

Description compute element-wise integer division with another matrix or scalar
Lua synopsis table m = simEigen.Matrix:intdiv(table m2)
Lua parameters
m2 (table): the other matrix (Matrix) or a scalar (float)
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:inversetransform

Description compute the inverse of a 4x4 transform matrix, returns a new matrix
Lua synopsis table m = simEigen.Matrix:inversetransform()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:irad

Description compute element-wise degrees to radians conversion, in place
Lua synopsis table self = simEigen.Matrix:irad()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:isin

Description compute element-wise sine, in place
Lua synopsis table self = simEigen.Matrix:isin()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:ismatrix

Description (class method) check wether the argument is a simEigen.Matrix
Lua synopsis bool true = simEigen.Matrix:ismatrix(any m)
Lua parameters
m (any)
Lua return values
true (bool): if the argument is an instance of simEigen.Matrix

simEigen.Matrix:isorthogonal

Description check wether the matrix is orthogonal
Lua synopsis bool true = simEigen.Matrix:isorthogonal(float tol=1e-6)
Lua parameters
tol (float, default: 1e-6): tolerance
Lua return values
true (bool): if the matrix is orthogonal

simEigen.Matrix:isqrt

Description compute element-wise square root, in place
Lua synopsis table self = simEigen.Matrix:isqrt()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:isub

Description compute element-wise subtraction with another matrix or scalar, in place
Lua synopsis table self = simEigen.Matrix:isub(table m)
Lua parameters
m (table): the other matrix (Matrix) or a scalar (float)
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:isvector

Description (class method) check wether the argument is a Nx1 simEigen.Matrix
Lua synopsis bool true = simEigen.Matrix:isvector(any m)
Lua parameters
m (any)
Lua return values
true (bool): if the argument is an instance of simEigen.Matrix of size Nx1

simEigen.Matrix:itan

Description compute element-wise tangent, in place
Lua synopsis table self = simEigen.Matrix:itan()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:item

Description return the item at position (i, j)
Lua synopsis float value = simEigen.Matrix:item(int i, int j)
Lua parameters
i (int): row index
j (int): column index
Lua return values
value (float)

simEigen.Matrix:itimes

Description compute element-wise multiplication with another matrix or scalar, in place
Lua synopsis table self = simEigen.Matrix:itimes(table m)
Lua parameters
m (table): the other matrix (Matrix) or a scalar (float)
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:kron

Description compute kronecker product with another matrix
Lua synopsis table m = simEigen.Matrix:kron(table m2)
Lua parameters
m2 (table): the other matrix (Matrix)
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:linspace

Description (class method) create a new matrix of 'count' evenly spaced elements from 'low' to 'high'
Lua synopsis table m = simEigen.Matrix:linspace(float low, float high, int count)
Lua parameters
low (float): lower bound
high (float): upper bound
count (int): number of elements
Lua return values
m (table): a new matrix (Matrix)

simEigen.Matrix:log

Description compute element-wise natural logarithm
Lua synopsis table m = simEigen.Matrix:log()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:log10

Description compute element-wise base-10 logarithm
Lua synopsis table m = simEigen.Matrix:log10()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:log2

Description compute element-wise base-2 logarithm
Lua synopsis table m = simEigen.Matrix:log2()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:max

Description compute element-wise maximum with another matrix or scalar
Lua synopsis table m = simEigen.Matrix:max(table m2)
Lua parameters
m2 (table): the other matrix (Matrix) or a scalar (float)
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:maxcoeff

Description compute the maximum value amongst all elements
Lua synopsis float result = simEigen.Matrix:maxcoeff()
Lua parameters -
Lua return values
result (float)

simEigen.Matrix:maxcoeff

Description compute the mean value amongst all elements
Lua synopsis float result = simEigen.Matrix:maxcoeff()
Lua parameters -
Lua return values
result (float)

simEigen.Matrix:maxcoeff

Description compute the minimum value amongst all elements
Lua synopsis float result = simEigen.Matrix:maxcoeff()
Lua parameters -
Lua return values
result (float)

simEigen.Matrix:min

Description compute element-wise minimum with another matrix or scalar
Lua synopsis table m = simEigen.Matrix:min(table m2)
Lua parameters
m2 (table): the other matrix (Matrix) or a scalar (float)
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:mod

Description compute element-wise modulo with another matrix or scalar
Lua synopsis table m = simEigen.Matrix:mod(table m2)
Lua parameters
m2 (table): the other matrix (Matrix) or a scalar (float)
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:mul

Description compute element-wise multiplication with another matrix or scalar
Lua synopsis table m = simEigen.Matrix:mul()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:norm

Description compute the euclidean norm
Lua synopsis float result = simEigen.Matrix:norm()
Lua parameters -
Lua return values
result (float)

simEigen.Matrix:norm

Description compute the squared euclidean norm
Lua synopsis float result = simEigen.Matrix:norm()
Lua parameters -
Lua return values
result (float)

simEigen.Matrix:normalize

Description normalize the value of elements, in place
Lua synopsis table self = simEigen.Matrix:normalize()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:normalized

Description return a new matrix with element values normalized
Lua synopsis table m = simEigen.Matrix:normalized()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:pinv

Description compute the pseudo inverse of this matrix, and if 'b' is passed, return also the 'x' solution to m*x=b
Lua synopsis table m, table the = simEigen.Matrix:pinv(table b, float damping)
Lua parameters
b (table): optional vector to solve for m*x=b
damping (float)
Lua return values
m (table): a new matrix with result (Matrix)
the (table): solution to m*x=b, if b was passed (Matrix)

simEigen.Matrix:print

Description print the contents of this matrix
Lua synopsis simEigen.Matrix:print()
Lua parameters -
Lua return values -

simEigen.Matrix:prod

Description compute the product of all elements of this matrix
Lua synopsis float damping = simEigen.Matrix:prod()
Lua parameters -
Lua return values
damping (float)

simEigen.Matrix:prod

Description compute the sum of all elements of this matrix
Lua synopsis float damping = simEigen.Matrix:prod()
Lua parameters -
Lua return values
damping (float)

simEigen.Matrix:rad

Description compute element-wise degrees to radians conversion
Lua synopsis table m = simEigen.Matrix:rad()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:reshaped

Description return a reshaped version of this matrix
Lua synopsis table m = simEigen.Matrix:reshaped(int rows, int cols)
Lua parameters
rows (int): new row count
cols (int): new column count
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:row

Description return the i-th row as a new vector
Lua synopsis table m = simEigen.Matrix:row(int i)
Lua parameters
i (int): row index
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:rowdata

Description get the data of the i-th row
Lua synopsis float[] a = simEigen.Matrix:rowdata(int i)
Lua parameters
i (int): row index
Lua return values
a (table of float): table of numbers

simEigen.Matrix:rows

Description return the number of rows
Lua synopsis int number = simEigen.Matrix:rows()
Lua parameters -
Lua return values
number (int): of rows

simEigen.Matrix:setcol

Description assign a vector to the j-th column
Lua synopsis table self = simEigen.Matrix:setcol(int j, table col)
Lua parameters
j (int): column index
col (table): a column vector
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:setcoldata

Description assign data to the j-th column
Lua synopsis table self = simEigen.Matrix:setcoldata(int j, float[] data)
Lua parameters
j (int): column index
data (table of float): column data
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:setdata

Description assign data to the matrix, in row-major order
Lua synopsis table self = simEigen.Matrix:setdata(float[] data)
Lua parameters
data (table of float): matrix data
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:setitem

Description change one element in the matrix
Lua synopsis table self = simEigen.Matrix:setitem(int i, int j, float[] data)
Lua parameters
i (int): row index
j (int): column index
data (table of float): element value
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:setrow

Description assign a vector to the i-th row
Lua synopsis table m = simEigen.Matrix:setrow(int i, table row)
Lua parameters
i (int): row index
row (table): a row vector
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:setrowdata

Description assign data to the i-th row
Lua synopsis table self = simEigen.Matrix:setrowdata(int i, float[] data)
Lua parameters
i (int): row index
data (table of float): row data
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:sin

Description compute element-wise sine
Lua synopsis table m = simEigen.Matrix:sin()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:sqrt

Description compute element-wise square root
Lua synopsis table m = simEigen.Matrix:sqrt()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:sub

Description compute element-wise subtraction with another matrix or scalar
Lua synopsis table m = simEigen.Matrix:sub(table m2)
Lua parameters
m2 (table): the other matrix (Matrix) or a scalar (float)
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:svd

Description compute the singular value decomposition
Lua synopsis table s, table u, table v, table x = simEigen.Matrix:svd(bool computeThinU=false, bool computeThinV=false, table b=nil)
Lua parameters
computeThinU (bool, default: false)
computeThinV (bool, default: false)
b (table, default: nil): 'b' vector, optional (Matrix)
Lua return values
s (table): (Matrix)
u (table): (Matrix)
v (table): (Matrix)
x (table): (Matrix)

simEigen.Matrix:tan

Description compute element-wise tangent
Lua synopsis table m = simEigen.Matrix:tan()
Lua parameters -
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:times

Description compute element-wise multiplication with another matrix or scalar
Lua synopsis table m = simEigen.Matrix:times(table m2)
Lua parameters
m2 (table): the other matrix (Matrix) or a scalar (float)
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Matrix:trace

Description compute the matrix trace
Lua synopsis float trace = simEigen.Matrix:trace()
Lua parameters -
Lua return values
trace (float)

simEigen.Matrix:transform

Description transform a 3D vector using this 4x4 transform matrix, returns a new vector
Lua synopsis table m = simEigen.Matrix:transform(table v)
Lua parameters
v (table): a 3D vector (Matrix)
Lua return values
m (table): a new vector with result (Matrix)

simEigen.Matrix:transpose

Description transpose the matrix, in place
Lua synopsis table self = simEigen.Matrix:transpose()
Lua parameters -
Lua return values
self (table): this matrix (Matrix)

simEigen.Matrix:transposed

Description return transposed matrix
Lua synopsis table m = simEigen.Matrix:transposed()
Lua parameters -
Lua return values
m (table): a new matrix transposed (Matrix)

simEigen.Matrix:vertcat

Description stack two or more matrices vertically
Lua synopsis table m = simEigen.Matrix:vertcat(table m2)
Lua parameters
m2 (table): matrix to stack (Matrix)
Lua return values
m (table): a new matrix with result (Matrix)

simEigen.Pose

Description a combination of a rotation and a translation
Lua synopsis table p = simEigen.Pose(table t, table q)
Lua parameters
t (table): the translation vector (Matrix)
q (table): the rotation quaternion (Quaternion)
Lua return values
p (table): the pose (Pose)

simEigen.Pose:data

Description get the data of this pose, in (tx, ty, tz, qx, qy, qz, qw) order
Lua synopsis float[] data = simEigen.Pose:data()
Lua parameters -
Lua return values
data (table of float): the pose data

simEigen.Pose:fromtransform

Description (class method) convert 4x4 transform matrix to new pose
Lua synopsis table p = simEigen.Pose:fromtransform(table m)
Lua parameters
m (table): a 4x4 transform matrix (Matrix)
Lua return values
p (table): a new pose with result (Pose)

simEigen.Pose:inv

Description return a new pose inverse of this
Lua synopsis table result = simEigen.Pose:inv()
Lua parameters -
Lua return values
result (table): inverse pose (Pose)

simEigen.Pose:ispose

Description (class method) check wether the argument is a simEigen.Pose
Lua synopsis bool true = simEigen.Pose:ispose(any m)
Lua parameters
m (any)
Lua return values
true (bool): if the argument is an instance of simEigen.Pose

simEigen.Pose:mul

Description multiply with another pose/vector, returning new pose/vector
Lua synopsis table p = simEigen.Pose:mul(table o)
Lua parameters
o (table): the other pose (Pose)
Lua return values
p (table): a new pose with result (Pose)

simEigen.Pose:totransform

Description convert pose to 4x4 transform matrix
Lua synopsis table m = simEigen.Pose:totransform()
Lua parameters -
Lua return values
m (table): a new 4x4 transform matrix (Matrix)

simEigen.Quaternion

Description construct a new quaternion
Lua synopsis table q = simEigen.Quaternion(float[] data={})
Lua parameters
data (table of float, default: {}): initialization data, in (qx, qy, qz, qw) order
Lua return values
q (table): the new quaternion (Quaternion)

simEigen.Quaternion:data

Description get the data of this quaternion, in (qx, qy, qz, qw) order
Lua synopsis float[] data = simEigen.Quaternion:data()
Lua parameters -
Lua return values
data (table of float): the quaternion data

simEigen.Quaternion:fromaxisangle

Description (class method) create a new quaternion from axis/angle
Lua synopsis table q = simEigen.Quaternion:fromaxisangle(table axis, float angle)
Lua parameters
axis (table): the rotation axis vector 3D (Matrix)
angle (float): the rotation angle
Lua return values
q (table): the quaternion (Quaternion)

simEigen.Quaternion:fromeuler

Description (class method) create a new quaternion from euler angles
Lua synopsis table q = simEigen.Quaternion:fromeuler(table euler)
Lua parameters
euler (table): the Euler angles as 3D vector (Matrix)
Lua return values
q (table): the quaternion (Quaternion)

simEigen.Quaternion:fromrotation

Description (class method) create a new quaternion from rotation matrix
Lua synopsis table q = simEigen.Quaternion:fromrotation(table r)
Lua parameters
r (table): the rotation matrix (Matrix)
Lua return values
q (table): the quaternion (Quaternion)

simEigen.Quaternion:imul

Description multiply with another quaternion, in place
Lua synopsis table self = simEigen.Quaternion:imul(table o)
Lua parameters
o (table): the other quaternion (Quaternion)
Lua return values
self (table): this quaternion (Quaternion)

simEigen.Quaternion:inv

Description return a new quaternion inverse of this
Lua synopsis table result = simEigen.Quaternion:inv()
Lua parameters -
Lua return values
result (table): inverted quaternion (Quaternion)

simEigen.Quaternion:isquaternion

Description (class method) check wether the argument is a simEigen.Quaternion
Lua synopsis bool true = simEigen.Quaternion:isquaternion(any m)
Lua parameters
m (any)
Lua return values
true (bool): if the argument is an instance of simEigen.Quaternion

simEigen.Quaternion:mul

Description multiply with another quaternion/vector, returning new quaternion/vector
Lua synopsis table q = simEigen.Quaternion:mul(table o)
Lua parameters
o (table): the other quaternion (Quaternion)
Lua return values
q (table): a new quaternion with result (Quaternion)

simEigen.Quaternion:slerp

Description interpolate quaternions
Lua synopsis table q = simEigen.Quaternion:slerp(float t, table q2)
Lua parameters
t (float): interpolation factor 0..1
q2 (table): the other quaternion (Quaternion)
Lua return values
q (table): a new quaternion with result (Quaternion)

simEigen.Quaternion:toaxisangle

Description convert this quaternion to a axis/angle representation
Lua synopsis table axis, float angle = simEigen.Quaternion:toaxisangle()
Lua parameters -
Lua return values
axis (table): a new vector 3D with rotation axis (Matrix)
angle (float): the rotation angle

simEigen.Quaternion:toeuler

Description convert this quaternion to a Euler angles representation
Lua synopsis table euler = simEigen.Quaternion:toeuler()
Lua parameters -
Lua return values
euler (table): a new vector 3D with euler angles (Matrix)

simEigen.Quaternion:torotation

Description convert this quaternion to a rotation matrix
Lua synopsis table q = simEigen.Quaternion:torotation()
Lua parameters -
Lua return values
q (table): a new matrix with result (Matrix)

simEigen.Vector

Description construct a new vector (that is: a one-column matrix); can also use the form: simEigen.Vector{1, 2, 3, 4} to construct directly from data, size will be determined automatically
Lua synopsis table v = simEigen.Vector(int size, float[] data)
Lua parameters
size (int): number of elements (matrix rows)
data (table of float): initialization data (optional; can also be a single value)
Lua return values
v (table): the new vector (Matrix)