[osg-users] Object from LUA Script

Matus Gabriska matus.gabriska at gmail.com
Sat May 14 02:22:12 PDT 2016


I figured out correct solution. This value is represented as DoubleValueObject not IntValueObject because Lua represents Number as double.

Here is working code:

Code:

osg::ref_ptr<osg::DoubleValueObject > test = static_cast<osg::DoubleValueObject *>(outputObject.get());
				 if (test == nullptr) {
					 std::cout << "null" << std::endl;
				 }				
				 else {					 
					 std::cout << test->getValue() << std::endl;
				 }




Thank you Robert for pointing me in right way. You can close this post.

Matus

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67103#67103








More information about the osg-users mailing list