I've updated the code from my previous post: 4x4 transformation matching OpenGL to remove the requirement for a separate linear algebra library by introducing some 4x4 inverse code from Rodolphe Vaillant (originally at http://www.irit.fr/~Rodolphe.Vaillant/?e=7) along with some other minor improvements. You can still use Eigen or GMM to perform matrix inverses, but it is no longer a requirement.
As before, the code re-implements the main OpenGL matrix functions and includes code for testing the output against the system OpenGL. I use the code for a number of my imaging projects where it is desirable (but optional) to have an OpenGL preview.
The code is now also hosted at Github which should simply future updates:
https://github.com/jamesgregson/transformation
syntax-highlighter
Showing posts with label OpenGL. Show all posts
Showing posts with label OpenGL. Show all posts
Sunday, September 8, 2013
Saturday, March 6, 2010
OpenGL Selection Class
There's not much to this post, just a simple class to help out with OpenGL selection. I've used it in my PhD project to implement a basic 3D paint utility. If you have an existing class for rendering scenes, you can extend that to include basic object selection by deriving from the OpenGLSelection class and implementing the DrawSelection method, using the OpenGL name stack. Selection can then be performed using the RenderSelection method, which takes the current mouse coordinates and returns the number of potentially selected objects along with a list of their IDs.
An example of usage is included in the header, use the code for whatever you'd like.
Selection.h
An example of usage is included in the header, use the code for whatever you'd like.
Selection.h
Subscribe to:
Posts (Atom)