Skip to content

zhangbo-tj/trackball

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alt text

Overview

Trackball is a standalone C++ interactor for lightweight 3D programs.
A TrackBall (aka ArcBall) orbits about an arbitrary world coordinate, although this implementation also allows first-person pitch and yaw if desired. A right-hand ZYX system is used, but can be easily ported to a left-hand system.

Features

  • Intuitive "lookAt" camera model with focal center point, eye and up vectors.
  • Map three mouse buttons to either orbit, dolly (zoom), pan, first-person or roll.
  • Map scroll to dolly (zoom) or roll.
  • Adjust speed of all motions, such as with meta keys shift/ctrl/alt.
  • Depends only on the GLM library.
  • Cross-platform example with OpenGL and GLFW.

Example

Build

$ mkdir -p build &&                                                  \
  cd build &&                                                        \
  cmake -DGLFW_INCLUDE_DIR:PATH=/usr/local/glfw-3.1.2/include        \
        -DGLFW_LIBRARY:FILEPATH=/usr/local/glfw-3.1.2/lib/libglfw.so \
        -DGLM_INCLUDE_DIR:PATH=/usr/local/glm-0.9.7.4/include        \
        -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON                             \
        .. &&                                                        \
  make

Run

$ ./examples/glfw/example

References

License

trackball Copyright (C) 2016 Remik Ziemlinski

This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the conditions of the GPLv3 license.

About

3D view interactor (C++, OpenGL).

Resources

License

Stars

Watchers

Forks

Packages

No packages published