Navlib stops calling into user code

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

Moderator: Moderators

Post Reply
JoelWilliamson
Posts: 6
Joined: Thu Aug 03, 2023 8:43 am

Navlib stops calling into user code

Post by JoelWilliamson »

I am working on integrating the 3DxWare SDK into my C# application. When I first move the mouse after application start, I receive a few calls into the INavigation3D implementation, but there is no call to SetCameraPosition and no calls for further mouse moves. I assume I'm returning a wrong value to one of these function calls, but I'm not sure which one or how to figure that out. Can anyone give me any pointers? I've included a log file that shows all the calls and returns from the SDK. (This is with v4.0.3 if that matters.)

Code: Select all

17:05:42,307 GetCameraMatrix() => [N[0.577,-0.577,0.577,0.000], O[0.707,0.707,0.000,0.000], A[-0.408,0.408,0.816,0.000], P[10873.373,-9048.447,11604.066,1.000]]
17:05:42,309 Got coordinate system: [N[0.000,1.000,0.000,0.000], O[0.000,0.000,1.000,0.000], A[1.000,0.000,0.000,0.000], P[0.000,0.000,0.000,1.000]]
17:05:42,314 IsViewPerspective() => true
17:05:42,317 GetViewFrustum() => F[(-0.0314314561909158, -0.0314314561909158) (0.0314314561909158, 0.0314314561909158) (-0.00100000004749745 - 100000)]
17:05:42,318 GetModelExtents() => TDx.SpaceMouse.Navigation3D.Box
17:05:42,319 GetCameraMatrix() => [N[0.577,-0.577,0.577,0.000], O[0.707,0.707,0.000,0.000], A[-0.408,0.408,0.816,0.000], P[10873.373,-9048.447,11604.066,1.000]]
17:05:42,320 GetCameraTarget() => [0.000,0.000,0.000,0.000]
17:05:42,320 IsViewPerspective() => true
17:05:42,321 GetViewFrustum() => F[(-0.0314314561909158, -0.0314314561909158) (0.0314314561909158, 0.0314314561909158) (-0.00100000004749745 - 100000)]
17:05:42,322 IsSelectionEmpty() => true
17:05:42,323 GetModelExtents() => TDx.SpaceMouse.Navigation3D.Box
17:05:42,323 GetCameraMatrix() => [N[0.577,-0.577,0.577,0.000], O[0.707,0.707,0.000,0.000], A[-0.408,0.408,0.816,0.000], P[10873.373,-9048.447,11604.066,1.000]]
17:05:42,325 SetLookAperture(0.0198789983478188)
17:05:42,326 SetLookDirection(V[-0.577350262576614 1.07990024422744E-08 -0.816496580927726])
17:05:42,327 SetLookFrom(P[0 0 0])
17:05:42,328 GetLookAt() => P[-57.7350262576614 1.07990024422744E-06 -81.6496580927726]
17:05:42,329 SetPivotPosition(P[0 0 1000])
17:05:42,330 GetCameraTarget() => [-0.577,0.000,-0.816,1.000]
17:05:42,331 IsViewPerspective() => true
17:05:42,332 GetViewFrustum() => F[(-0.0314314561909158, -0.0314314561909158) (0.0314314561909158, 0.0314314561909158) (-0.00100000004749745 - 100000)]
17:05:42,333 IsSelectionEmpty() => true
17:05:42,335 SetPivotVisible(True)
ngomes
Moderator
Moderator
Posts: 3344
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: Navlib stops calling into user code

Post by ngomes »

The camera "target" is probably not what you expect (it is a sort of rotation point for the "target camera" navigation mode).

What value are you returning? Normally, applications return a "no data" code.
JoelWilliamson
Posts: 6
Joined: Thu Aug 03, 2023 8:43 am

Re: Navlib stops calling into user code

Post by JoelWilliamson »

I was projecting the camera direction a fixed direction ahead.

Is there a minimal set of operations that need to be implemented just to get basic movement working? If I just want to translate/rotate the camera along each of its axes without worrying about any parts in the scene, what do I need to do?
JoelWilliamson
Posts: 6
Joined: Thu Aug 03, 2023 8:43 am

Re: Navlib stops calling into user code

Post by JoelWilliamson »

I found the sample projects included with the SDK and used those as a starting point. I'm not sure what was different from my first attempt, but it's working now,
Post Reply