core/vgui/internals/vgui_back_project.h
Go to the documentation of this file.
00001 // This is core/vgui/internals/vgui_back_project.h
00002 #ifndef vgui_back_project_h_
00003 #define vgui_back_project_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \author fsm@robots.ox.ac.uk
00010 // \brief  Given a 3x4 camera, project a point x back onto a plane pi.
00011 
00012 //: Given a 3x4 camera, project a point x back onto a plane pi.
00013 // The given point x is in normalize device coordinates.
00014 // The computed point X is in object coordinates.
00015 bool vgui_back_project_d3d4d4d4d4_d4(double const x[3],
00016                                      double const P0[4],
00017                                      double const P1[4],
00018                                      double const P2[4],
00019                                      double const pi[4],
00020                                      double X[4]);
00021 
00022 //: Easy version - gets the projection matrices for you.
00023 bool vgui_back_project_d4d4_d4(double const x[3], double const pi[4], double X[4]);
00024 
00025 //: Easy version - backproject from viewport coordinates.
00026 bool vgui_back_project_iid4_d4(int vx, int vy, double const pi[4], double X[4]);
00027 
00028 //: Easy version - backproject from viewport coordinates to (x,y,0,1)
00029 bool vgui_back_project_ii_dd(int vx, int vy, double *x, double *y);
00030 
00031 #endif // vgui_back_project_h_