vancegroup / vr-jugglua

VR JuggLua: A Framework for VR Applications Combining Lua, OpenSceneGraph, and VR Juggler
Boost Software License 1.0
11 stars 11 forks source link

.matrix properties for MatrixTransform{} osg binding crash VRJuggLua #124

Closed lpberg closed 10 years ago

lpberg commented 10 years ago

the getter / setter property - .matrix crashes for the setter

example: MT = MatrixTransform{} mat = MT.matrix (works just fine) MT.matrix = mat (.matrix isn't recognized property) MT.Matrix = mat (listed under the help() func crashes VRJugglua)

rpavlik commented 10 years ago

Hmm.

Well, MT.matrix is actually a function (see results of help(mat)) - typically called with MT:matrix() so I'm not terribly surprised you can't set MT.matrix, but MT.Matrix = mat should error but not crash.

rpavlik commented 10 years ago

MT.Matrix = osg.Matrixd() works. MT.Matrix = osg.Matrixf() crashes.

rpavlik commented 10 years ago

and the "error" in your third line, which should have come back like:

bin/vrjlua: [string "MatrixTransform{}.matrix = osg.Matrixd()"]:1: No property 'matrix' defined in 'osg::MatrixTransform'

is the right error - there is no such property.