mathematical functions for scripting in LDCad


RE: mathematical functions for scripting in LDCad
#10
(2018-03-15, 18:13)Roland Melkert Wrote:
Code:
local matrix=ldc.matrix()
matrix:setTranslate(center:getInverted())
matrix:mulAB(rotation)
matrix:mulTranslateAB(center)
mulAB with a matrix using a vector in its constructor acts like a translate as it is basically an alias, but it can be very confusing.

Indeed, I thought about why using mulAB once with a matrix once with a vector, but I didn't dare to ask Wink

I just stumbled over the center:getInverted(). In your manual getInverted is for matrices. What does it do with the vector?
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: mathematical functions for scripting in LDCad - by Joscha - 2018-03-16, 15:33

Forum Jump:


Users browsing this thread: 1 Guest(s)