vancegroup / vr-jugglua

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

osg.Box Constructor Parameters Issue #115

Open carlsonp opened 11 years ago

carlsonp commented 11 years ago

I think perhaps this may be an issue upstream with the osgLua binding but I'm not sure.

osg.Box can have a couple constructors.

box = osg.Box(Vecf(0,0,0), 10, 5, 5)
print(box.HalfLengths)
-- 5 5 5 .... this is wrong...

It looks like if you specify both the center and each of width, height, and depth... it incorrectly is using the constructor for center and width. Running the help() method on the box appears to show that all constructors are bound. I am not sure what order or how luabind evaluates the multiple constructor options that are available.

The workaround right now is manually creating a box using the empty constructor and then manually setting the center and dimensions of the box using the provided methods.

Thanks to @cdiss for finding this one.