Community
A copy of a popular discussion thread from 2012.
Dim mtx(3, 3) As Double,
Bar.GetLocalMtx mtx(0, 0), mtx(0, 1), mtx(0, 2), mtx(1, 0), mtx(1, 1), mtx(1, 2), mtx(2, 0), mtx(2, 1), mtx(2, 2)
'- then transform results from GCS to LCS this way I guess:
'F(x,y,z)
newvals(0) = vals(0) * mtx(0, 0) + vals(1) * mtx(0, 1) + vals(2) * mtx(0, 2)
newvals(1) = vals(0) * mtx(1, 0) + vals(1) * mtx(1, 1) + vals(2) * mtx(1, 2)
newvals(2) = vals(0) * mtx(2, 0) + vals(1) * mtx(2, 1) + vals(2) * mtx(2, 2)
'M(x,y,z)
newvals(3) = vals(3) * mtx(0, 0) + vals(4) * mtx(0, 1) + vals(5) * mtx(0, 2)
newvals(4) = vals(3) * mtx(1, 0) + vals(4) * mtx(1, 1) + vals(5) * mtx(1, 2)
newvals(5) = vals(3) * mtx(2, 0) + vals(4) * mtx(2, 1) + vals(5) * mtx(2, 2)
next
Can't find what you're looking for? Ask the community or share your knowledge.