C#| Override controls | VIZRT
Moderator: Moderators
-
- Posts: 6
- Joined: Sun Apr 14, 2019 8:22 am
C#| Override controls | VIZRT
Hi, I am doing a touch screen SCENE on VIZRT ARTIST (a 3D Renderer engine).
In fact I have finished all the inner API and waiting for input to invoke them, once those API be invoked, the virtual camera of this SCENE will move.
Therefore, If I wanna using SpaceMouse (Actually I only need the gear, do not need buttons) to control the virtual camera, I need to acquire the data of the gear moving: which axis, what direction and how much it moved, then send warp these infomation into a VIZRT COMMAND, finally send this command to VIZRT ARTIST via TCP link to INVOKE my APIs.
However, currently SpaceMouse driver can recongnize VIZRT, and I have totally no idea of how to achieving my goal by the giving "3DxSMM_USB_SensorDemo.sln"
In fact I have finished all the inner API and waiting for input to invoke them, once those API be invoked, the virtual camera of this SCENE will move.
Therefore, If I wanna using SpaceMouse (Actually I only need the gear, do not need buttons) to control the virtual camera, I need to acquire the data of the gear moving: which axis, what direction and how much it moved, then send warp these infomation into a VIZRT COMMAND, finally send this command to VIZRT ARTIST via TCP link to INVOKE my APIs.
However, currently SpaceMouse driver can recongnize VIZRT, and I have totally no idea of how to achieving my goal by the giving "3DxSMM_USB_SensorDemo.sln"
Re: C#| Override controls | VIZRT
Hi sun19890208@163.com,
Perhaps I misunderstood what you're telling us but have you used the 3DxWare driver API to integrate support for 3Dconnexion's device in the application? The SDK can be downloaded from here.
Perhaps I misunderstood what you're telling us but have you used the 3DxWare driver API to integrate support for 3Dconnexion's device in the application? The SDK can be downloaded from here.
-
- Posts: 6
- Joined: Sun Apr 14, 2019 8:22 am
Re: C#| Override controls | VIZRT
Hi, ngomes, Thanks for your feedback
In fact I have donwload the driver files, and the VIZRT can response the operations via SpaceMouse.
However, it can only control model itself, but not the virtual camera. In an other word, I can not control how to use the SpaceMouse.
My final requirement is like follow description:
1. User control the SpaceMouse;
2. I received the control information including which Axis moved, what is the direction, and how much it moved;
3. I send a TCP to VIZRT to invoke my API : e.g. sendTCP(VIZIP, PORT, " invoke move(ROTATION, LEFT, 0.16)"), the parameters "ROTATION, LEFT, 0.16" are comes from the step 2;
My problem now is I don't know how to run the step 2: get Information from SpaceMouse or from USB?
Due to the official driver support VIZRT already, So I think I have to write an new one to implement what I want do, I really need your help of how to conduct it, could you give me some sample codes or something alternative.
Thank you in advance.
In fact I have donwload the driver files, and the VIZRT can response the operations via SpaceMouse.
However, it can only control model itself, but not the virtual camera. In an other word, I can not control how to use the SpaceMouse.
My final requirement is like follow description:
1. User control the SpaceMouse;
2. I received the control information including which Axis moved, what is the direction, and how much it moved;
3. I send a TCP to VIZRT to invoke my API : e.g. sendTCP(VIZIP, PORT, " invoke move(ROTATION, LEFT, 0.16)"), the parameters "ROTATION, LEFT, 0.16" are comes from the step 2;
My problem now is I don't know how to run the step 2: get Information from SpaceMouse or from USB?
Due to the official driver support VIZRT already, So I think I have to write an new one to implement what I want do, I really need your help of how to conduct it, could you give me some sample codes or something alternative.
Thank you in advance.
Re: C#| Override controls | VIZRT
You can use the API that is most convenient for you. 3Dconnexion supports the driver API as documented in the 3DxWare SDK.sun19890208@163.com wrote: ↑Wed May 29, 2019 2:32 am [...]
2. I received the control information including which Axis moved, what is the direction, and how much it moved;
[...]
My problem now is I don't know how to run the step 2: get Information from SpaceMouse or from USB?
The 3DxWare SDK has a few samples you can refer to. The included documentation has a detailed description on 3D view manipulation. You may want to go through that as well.Due to the official driver support VIZRT already, So I think I have to write an new one to implement what I want do, I really need your help of how to conduct it, could you give me some sample codes or something alternative.
-
- Posts: 6
- Joined: Sun Apr 14, 2019 8:22 am
Re: C#| Override controls | VIZRT
Oh~ Thank you very much~
I only check the downloaded folders to explore the API documents before and cannot find any useful API document
By your guidance, I found them at ".../AppData/Local/Programs/3Dconnexion/3DxWare SDK/Doc".
That's so helpful, thank you again~
I only check the downloaded folders to explore the API documents before and cannot find any useful API document
By your guidance, I found them at ".../AppData/Local/Programs/3Dconnexion/3DxWare SDK/Doc".
That's so helpful, thank you again~
Re: C#| Override controls | VIZRT
The documentation can also be accessed from Start Menu > 3Dconnexion > 3DxWare SDK Documentationsun19890208@163.com wrote: ↑Wed May 29, 2019 10:45 pm By your guidance, I found them at ".../AppData/Local/Programs/3Dconnexion/3DxWare SDK/Doc".
-
- Posts: 6
- Joined: Sun Apr 14, 2019 8:22 am
Re: C#| Override controls | VIZRT
Hello,
I asked a friend to make a tool which can recognize the SpaceMouse's operation and then send the detected values to a given TCP/UDP server.
However when I started "VIZ Artist" on my PC, the SpaceMouse will always target on it, never can send any data to the tool. (The LED screen will forever display the VIZ ICON even I didn't focus on the VIZ Artist software)
What should we do, if I want the SpaceMouse always target on my own developed tool but not other software (no matter it is focused)
I asked a friend to make a tool which can recognize the SpaceMouse's operation and then send the detected values to a given TCP/UDP server.
However when I started "VIZ Artist" on my PC, the SpaceMouse will always target on it, never can send any data to the tool. (The LED screen will forever display the VIZ ICON even I didn't focus on the VIZ Artist software)
What should we do, if I want the SpaceMouse always target on my own developed tool but not other software (no matter it is focused)
-
- Posts: 6
- Joined: Sun Apr 14, 2019 8:22 am
Re: C#| Override controls | VIZRT
Hello, thanks for your help, here is my new problem T_Tngomes wrote: ↑Fri May 31, 2019 5:41 amThe documentation can also be accessed from Start Menu > 3Dconnexion > 3DxWare SDK Documentationsun19890208@163.com wrote: ↑Wed May 29, 2019 10:45 pm By your guidance, I found them at ".../AppData/Local/Programs/3Dconnexion/3DxWare SDK/Doc".
I asked a friend to make a tool which can recognize the SpaceMouse's operation and then send the detected values to a given TCP/UDP server.
However when I started "VIZ Artist" on my PC, the SpaceMouse will always target on it, never can send any data to the tool. (The LED screen will forever display the VIZ ICON even I didn't focus on the VIZ Artist software)
What should we do, if I want the SpaceMouse always target on my own developed tool but not other software (no matter it is focused)
Re: C#| Override controls | VIZRT
Our SDK has a function, SiGrabDevice, that your tool can use to grab the data from the device regardless of which application has focus.
It's not a very nice thing to do to other 3D programs. They will not get data if they use our SDK.
It's not a very nice thing to do to other 3D programs. They will not get data if they use our SDK.
-
- Posts: 6
- Joined: Sun Apr 14, 2019 8:22 am
Re: C#| Override controls | VIZRT
Thanks for your advice, In fact, we have used SiGrabDevice function in our own software, and it can really get data from SpaceMouce. However, Once VIZ Artist started, our tool can never accept any response from SpaceMouse, and VIz Artist take it over to accept them.
In another word, VIZ ARTIST seems has the highest priority of accepting SpaceMouse's data. How can I break the connection between VIZ ARTIST and SpaceMouse? OR grand my own Tool the highest priority to get DATA.
Thanks for your continues help, or I think I will be mad
Re: C#| Override controls | VIZRT
You are a victim of the unfriendly nature of SiGrabDevice(true) (exclusive grab).
It's a last in flag. The last one to set it will get it.
If you set it after VIZRT has set it, you will get it. Assuming they don't set it again and fight with you. I think the Grab request is logged into our log file, so you can see what they are doing.
Unfortunately it is not so sophisticated to have a mechanism to find out whether you got it, or lost it, or ...
I have a task to make it more capable.
It's a last in flag. The last one to set it will get it.
If you set it after VIZRT has set it, you will get it. Assuming they don't set it again and fight with you. I think the Grab request is logged into our log file, so you can see what they are doing.
Unfortunately it is not so sophisticated to have a mechanism to find out whether you got it, or lost it, or ...
I have a task to make it more capable.