# Coordinate transformation between different Frames. # This example illustrates the camera and world coordinate systems # relationship. The position of the camera in the world coordinate # system is printed from Camera::position(). Symetrically, the # position of the world origin is given in the camera coordinate # system by camera()->cameraCoordinatesOf(0,0,0). # Three sets of lines (red, green, blue) are drawned. They have different starting points, but # common end points, located on a circle in the XY plane. # All the red lines start from the camera position, and will hence always be aligned with the # viewing direction, making them invisible. # The green lines starting points' positions are determined from the camera coordinate system, using # <code>camera()->worldCoordinatesOf()</code>. As a result, these points will seem to be fixed on # the screen, even when the camera is moved # Finally, the blue lines are classically defined in the world coordinate system, and will move with # the camera. # Beautiful Moire pattern can be obtained with a proper rotation. TEMPLATE = app TARGET = frameTransform CONFIG *= qt opengl warn_on release thread HEADERS = frameTransform.h SOURCES = frameTransform.cpp main.cpp ## Windows Qt 2.3 users should uncomment the next 2 lines and remove ## all the remaining lines. ## See doc/download.html page for details on include and lib paths. #DEFINES *= QT_DLL QT_THREAD_SUPPORT #LIBS *= QGLViewer.lib # Unix : same INCLUDE_DIR and LIB_DIR parameters than for the make install unix { isEmpty( PREFIX ) { PREFIX=/usr/local } isEmpty( LIB_DIR ) { LIB_DIR = $$PREFIX/lib } isEmpty( INCLUDE_DIR ) { INCLUDE_DIR = $$PREFIX/include } INCLUDE_PATH = $$INCLUDE_DIR !exists( $$INCLUDE_DIR/QGLViewer/qglviewer.h ) { message( Unable to find QGLViewer/qglviewer.h in $$INCLUDE_PATH ) message( Use qmake INCLUDE_DIR~Path/To/QGLViewer/HeaderFiles ) error( Replace the ~ by the "equals" character in the above line ) } macx { LIB_NAME = libQGLViewer.*.dylib } else { LIB_NAME = libQGLViewer.so.* } !exists( $$LIB_DIR/$$LIB_NAME ) { message( Unable to find $$LIB_NAME in $$LIB_DIR ) message( You should run qmake LIB_DIR~Path/To/QGLViewer/Lib ) error( Replace the ~ by the "equals" character in the above line ) } # Path was correctly detected INCLUDEPATH *= $$INCLUDE_PATH DEPENDPATH *= $$INCLUDE_PATH LIBS *= -L$$LIB_DIR -lQGLViewer macx { LIBS *= -lobjc CONFIG -= thread } } # Windows configuration. # See doc/download.html page for details on include and lib paths. win32 { # Various compilation flags QMAKE_CXXFLAGS = -TP -G6 -W1 -GR -GX -Zi # Optimise for speed, and expand any suitable inlines QMAKE_CXXFLAGS_RELEASE = -O2 -Ob2 # Use the Qt DLL version DEFINES *= QT_DLL QT_THREAD_SUPPORT win32-msvc.net { LIBS *= libQGLViewer135 } else { LIBS *= QGLViewer.lib } }