04-20-2010 11:35 PM
Hi !
I am needing to have interaction with a 3D model, just like using VRMLs touch-sensors (i,e generating information from clicking or dragging the moue pointer over especific elements of the 3D model.... without dealing with the view).
It would be great if you could tell me a clue on how to implement that easily.
I thought that maybe i should use EAI - JAVA as middle man, but .... there must be something like this done already ... somewhere... right?
Thanks in advance
04-21-2010 01:02 AM
hi!!
Is it posible to have the full capability of VRML inside of my VI by using ActiveX controllers over the CORTONA plug-in?
please, i would appreciate some guidance in developing this idea -if the idea is viable, of course-
thanks in advance
04-21-2010 01:27 AM
04-21-2010 06:02 AM
Thanks for the comment.
It seems that it could take for a long time to implement that, specialy because i am relatively new at .activeX and .NET. Something is not going all right and I cannot find the way solve it. If i could just find the way to represent the following statement in a VI, everything would be more clear to me
cortona.Engine.Nodes.Item("SomeShape").Fields.Item("appearance").Value
"ENGINE" appears as a variant property of "CORTONA" and I am obtaining it from a property node. Then I cannot find "NODES" by using property or invoke nodes. I guess i am doing something wrong while changing variant ENGINE to ref ENGINE (for feeding the incomming invoke node). I guess i cannot find the right "ref" to put in the TYPE pin, in the VARIANT TO DATA function i am using (to change variant ENGINE to ref ENGINE )
I would really appreciate any clue on this....
or maybe an alternative ... with the 3D control toolkit ( i need to fire an event when clicking an especific object of the 3D scene, w/0 dealing with the view)
Thanks
K-LYN
04-21-2010 08:30 AM
Well you will most likely have to cast the variant returned into an explicite Engine refnum and then go from there. Unfortunately if the typelibrary of your automation server doesn't specify the exact class name for a returned object, giving back a variant is the best thing LabVIEW can do for you.
To cast a returned ActiveX variant into a specific automation refnum you do use the Variant to Data function. Simply wire the variant into "Variant" input, a refnum control of the desired type to the "type" input, et voila.
It is similar to the explanation here http://digital.ni.com/public.nsf/allkb/6EC98441BFAF93A486256DCD000179A2?OpenDocument only that you take your variant as input to the Variant to Data function instead of the refnum of the original class.