Hope you don't mind, but I thought I'd copy the osg-users mailing list with your post the lua list. I thought others in the community would find it very interesting, and also give a bit of context about your questions about osgIntrospection.
Thanks for your efforts on osgLua :)
Robert.
---------- Forwarded message ----------
From: Jose Luis Hidalgo ValiƱo < [EMAIL PROTECTED]>
Date: Aug 31, 2006 1:43 PM
Subject: osgLua: lua dynamic wrapper for OSG
To: Lua list <[EMAIL PROTECTED]>
This is a dynamic wrapper that uses osgIntrospection to instance and
invoke methods of the classes reflected by
OSG. It could be used to load data, but since osgProducer is
reflected you can set up a viewer from the script.
subversion repository: http://svn.pplux.com/lab/osgLua
This is the first version, and needs a lot of improvement... but may
be someone else will find this useful.
Example (http://svn.pplux.com/lab/osgLua/scripts/test.lua):
root = osg.Group()
geode = osg.Geode()
shape = osg.ShapeDrawable()
shape:setShape( osg.Sphere(osg.Vec3(4,5,6),15) )
geode:addDrawable(shape)
root:addChild(geode)
viewer = osgProducer.Viewer()
viewer:setSceneData(root)
viewer:setUpViewer(osgProducer.Viewer.ViewerOptions.STANDARD_SETTINGS )
viewer:realize()
while ( not viewer:done()) do
viewer:update()
viewer:frame()
viewer:sync()
end
Cheers,
Jose L.
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
