unproject.h 635 B

1234567891011121314151617181920212223242526
  1. #ifndef IGL_UNPROJECT_H
  2. #define IGL_UNPROJECT_H
  3. #include "igl_inline.h"
  4. namespace igl
  5. {
  6. // Wrapper for gluUnproject that uses the current GL_MODELVIEW_MATRIX,
  7. // GL_PROJECTION_MATRIX, and GL_VIEWPORT
  8. // Inputs:
  9. // win* screen space x, y, and z coordinates respectively
  10. // Outputs:
  11. // obj* pointers to 3D objects' x, y, and z coordinates respectively
  12. // Returns return value of gluUnProject call
  13. IGL_INLINE int unproject(
  14. const double winX,
  15. const double winY,
  16. const double winZ,
  17. double* objX,
  18. double* objY,
  19. double* objZ);
  20. }
  21. #ifdef IGL_HEADER_ONLY
  22. # include "unproject.cpp"
  23. #endif
  24. #endif