Trackball emulation using the mouse.




I'm struggling to debug the code in the link below, developed in pure C, using Eclipse CDT in a Windows 11 PC (win32). It is a basic program that rotates a 3d model using the mouse. It uses quaternions for the trackball mechanism. The 3d pipeline is bare minimum. All is ok, except in the trackball mapping to the engine. Something is wrong in files mouse.c or plot3d.c.

Please, help me. The code seems lengthy, but the trouble is in the two mentioned files.

If this code could be repaired, it can serve as a fast and direct implementation of a 3d model management (no OpenGl, no shaders, no textures, just dots and simple lines), mainly in sciences.

Thanks for any help.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question