A simple camera for openFrameworks I threw together in transit. Name suggestions welcome!
ofxGrabCam is a camera for browsing your 3D scene. It ‘picks’ the xyz position under the cursor (using the depth buffer to get Z).
Rotations and zoom (left and right mouse drag) are then performed with respect to that xyz position
Inspired by Google SketchUp
Update: now if it doesn’t find anything under the cursor, it automatically spirals outwards until it does find something, so sparse objects / inaccurate clicks are now more workable.
P.s. this is probably not much use for point clouds / other sparse datasets where there’s nothing to ‘grab’ onto.
Available on github at http://github.com/elliotwoods/ofxGrabCam
You should also check out https://github.com/Flightphase/ofxGameCamera by the ever obvious jim.