LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to fire events based on user clicks on a 3D model

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

0 Kudos
Message 1 of 5
(2,720 Views)

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

 

0 Kudos
Message 2 of 5
(2,705 Views)
I think using an AcitveX control is really your best bet for this. But don't underestimate the time needed to create a nice and friendly to use VI library that interfaces with your ActiveX object.
Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 5
(2,700 Views)

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 

0 Kudos
Message 4 of 5
(2,688 Views)

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.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 5
(2,672 Views)