space Navigator and openScenceGraph application

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

rodrigo.seabra
Posts: 44
Joined: Fri Apr 04, 2008 7:03 am

Post by rodrigo.seabra »

The use of Visual C++ 2005 Express Edition is a problem??
Because of the error of compilation me seems that the problem is in the librarys "atlcom.h and atlwin.h", not in the version do Visual Studio...

Anyone have any idea?

Thanks.
ngomes
Moderator
Moderator
Posts: 3344
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Post by ngomes »

rodrigo.seabra wrote:I am using Visual C++ 2005 Express Edition.
I'm sorry but our demos are not for the "express" edition. You'll be lacking the ATL which that demo depends on.
I believe you'll need to have the latest platform SDK with all options installed but we have not tried it ourselves.
mony84
Posts: 7
Joined: Mon May 19, 2008 8:10 am

Post by mony84 »

hi rodrigo.seabra,

Finally, the unique solution is to work with the VRPN (Virtual Reality Peripheral Network) and the osgVRPN .



Good luck
rodrigo.seabra
Posts: 44
Joined: Fri Apr 04, 2008 7:03 am

Post by rodrigo.seabra »

Hi mony84,

Ok. I have VRPN (although it has not yet used). A few days ago, I tried to download a version of osgVRPN. I did not find a link right to it, much less usage instructions. You could pass me some details?

If possible, I would like to see your code. Thus, it could try to adapt to my case ... you could help me?

Thank you.
mony84
Posts: 7
Joined: Mon May 19, 2008 8:10 am

Post by mony84 »

Hi rodrigo.seabra,
Finally, I didn't use VRPN. I get help from the osg mailing list. (I would like to say thank you very much).

Code: Select all

main ()
{
    // init
 
   // osg inits ..
 
    SbInit ()//connect to the spacenavigator
 
    // main loop
 
    while (!viewer.done())
    {
// DispatchLoop is similar to the sdk example but  instead of
// while (GetMessage (&msg, NULL, 0, 0))                    -- original
// use this:
// if (PeekMessage (&msg, NULL, 0,0,PM_REMOVE))  -- otherwise it blocks your main loop
 
        DispatchLoop()
 
 
        if (Spw_Redraw)
        {
            setViewMatrix(....) // position and rotation from 3dConnexion
 
            Spw_Redraw = false
        }
 
        viewer.frame()
    }
}
 [code]

Dipatch loop is the message loop.
You can use either the cityfly example or the cube3Dpolling example. The last one is easier to understand and is included in the SDK.

You can also call setViewMatrix each FRAME in your manipulator.


Hope this can help

Monia
rodrigo.seabra
Posts: 44
Joined: Fri Apr 04, 2008 7:03 am

Post by rodrigo.seabra »

Hi mony84,

I thank your attention and available to try to help me. However, I still have many questions...

First: You used OSGVRPN in your code? If so, what link you used to donwload the library? What libraries or drivers I must use?

Second: Where I find the definition of the methods SbInit(), DispatchLoop()?

Third: In which part of your code you call your 3D application?

Fourth: I have tried to run the example, however, the compiler points out some errors in compiling...

1>c:\programas\microsoft platform sdk for windows server 2003 r2\include\atl\atlcom.h(3242) : error C2065: '_Module' : undeclared identifier
1>c:\programas\microsoft platform sdk for windows server 2003 r2\include\atl\atlcom.h(3242) : error C2228: left of '.Lock' must have class/struct/union
1> type is ''unknown-type''
1>c:\programas\microsoft platform sdk for windows server 2003 r2\include\atl\atlcom.h(3244) : error C2228: left of '.Unlock' must have class/struct/union
1> type is ''unknown-type''
...

Do you have any idea?

I think perhaps it would be easier if I could see your code complete (main.cpp). I confess that things are still difficult for me :-(
Is possible?

Thank you very much for your attention...
rodrigo.seabra
Posts: 44
Joined: Fri Apr 04, 2008 7:03 am

Post by rodrigo.seabra »

Hi mony84,

In my application, I connected the SpaceNavigator, but I don't understand the reason of instruction "if (g3DSensor)" of the method calc3DMovement ().

In my code, even if it does not happen any interaction with the device, the application enters this "if" and prints the values 0,0,0. I need to get the values of translation and rotation only when they actually occur.

I already have a main loop that controls the application. In this case, how I could use these methods in parallel without blocking the implementation of the application? How is your main loop??

Thanks.
Post Reply