Topic: Starting some additional lua binding
I'm starting a code session to improve the lua integration of Maratis engine as a lot of feature are still missing,
the first wave is already on svn, with a focus on vector manipulation and object.
I added a minimal vector manipulation for 3d vector, compatible with the current table system,
allowing basic math (addition, multiplication etc), for example :
pos = (getPosition(object) + vec3(1, 0, 0)) * 2
-- it's still a table like before :
x = pos[1]
y = pos[2]
z = pos[3]
With the classic math :
length(vec) > return a number
normalize(vec) > return a vec3
dot(veca, vecb) > return a number
cross(veca, vecb) > return a vec3
Plus some object missing functions (there is still a lot missing) :
- object data
isActive(object)
getName(object)
getParent(object)
setParent(object, parent)
- to get object global coordinates (if parenting) :
getTransformedPosition(object)
getTransformedRotation(object)
getTransformedScale(object)
-- some vector/matrix manipulation :
getInverseRotatedVector(object, vec)
getRotatedVector(object, vec)
getInverseVector(object, vec)
getTransformedVector(object, vec)
updateMatrix(object)
getMatrix(object) > return a table of 16 entries