How to properly use the NavLib on macOS

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

Moderator: Moderators

Post Reply
ChuA
Posts: 1
Joined: Thu Jul 24, 2025 5:38 am

How to properly use the NavLib on macOS

Post by ChuA »

Hi.
I recently started using the 3Dconnexion SpaceMouse. I tried to integrate support for it into our application. I was able to use navlib on Windows successfully, but on macOS, I'm having difficulties with the SDK.
Let me describe the steps I took on Windows:
I downloaded and installed the latest driver and SDK.
I'm using the classes from the "/SpaceMouse" directory (CNavigation3D.hpp, etc.).
I created a Mouse3dNavigation class that inherits from TDx::SpaceMouse::Navigation3D::CNavigation3D(false, false).
I overrode methods such as:
long GetCameraMatrix(navlib::matrix_t& affine) const override;
long SetCameraMatrix(const navlib::matrix_t& affine) override;
long GetViewExtents(navlib::box_t& affine) const override;
long GetViewFrustum(navlib::frustum_t& frustum) const override;
long SetMotionFlag(bool value) override;
long SetTransaction(long value) override;
// etc.
Everything works correctly — initialization completes, and EnableNavigation(true, ec) executes without errors.
When using the SpaceMouse controller, the methods SetMotionFlag(value), SetTransaction(value), and SetCameraMatrix(affine) are called.
I receive valid data and can correctly render my scene using the navlib::matrix_t affine matrix.

===

However, the same code does not work on macOS Sequoia 15.5.
On macOS, I see that the following frameworks are available:
/Library/Frameworks/3DconnexionClient.framework
/Library/Frameworks/3DconnexionNavlib.framework
I was able to successfully use 3DconnexionClient.framework:
The connection is established correctly.
The device is properly recognized — I can see the correct vendorID and productID.
When using the SpaceMouse, the callback method is triggered:
static void mouse3dMessageHandler(uint32_t, uint32_t messageType, void* messageArgument)
I receive valid data — for example, translation on axes [0–2], rotation on axes [3–5] when
messageType == kConnexionMsgDeviceState, command == kConnexionCmdHandleAxis.

In 3DconnexionNavlib.framework, I added the /SpaceMouse sources from the Windows SDK.
However, Navlib is not working as expected on macOS.

Calling EnableNavigation(true, ec) completes without errors.
During initialization, I can see that the following methods are called (same as on Windows):

GetCoordinateSystem()
GetViewExtents()
GetViewFrustum()
etc.
But when I use the SpaceMouse controller, the following methods are not called:
SetMotionFlag(value)
SetTransaction(value)
SetCameraMatrix(affine)
As a test, I tried manually writing and reading a property — and it worked fine:
m_pImpl->Write(navlib::view_affine_k, matrix);
m_pImpl->Read(navlib::view_affine_k, matrix);

Please, help! I would like to understand how to use Navlib properly on macOS, in the same way as I do on Windows.
ngomes
Moderator
Moderator
Posts: 3458
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: How to properly use the NavLib on macOS

Post by ngomes »

Hi ChuA,

Sorry this request went this long without an answer.

You may want to reach out to 3Dconnexion API Support helpdesk. The contact details are available on the developer web page accessible from from here (registration is required).

The Navigation Library is supported on the MAC. We have a number of products that use it on Apple's operating system. The 3DxWare 10 driver has a framework, 3DconnexionNavlib.framework. The so-called "Windows" driver is actually meant to be cross-platforms but we're missing sample code for the Mac.

From what you described, it appears that you're mixing two different driver API: the Navigation Library and the legacy 3DconnexionClient.framework. The simultaneous use both API will likely lead to conflicts. Since one is redundant, we strongly recommend using a single framework. The latest is 3DconnexionNavlib.framework.
Nuno Gomes
Post Reply