0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / IVtk / IVtk_IView.hxx
index c974e5f..83a5d2c 100644 (file)
 #include <IVtk_Interface.hxx>
 #include <gp_XY.hxx>
 #include <gp_XYZ.hxx>
+#include <gp_Pnt.hxx>
+#include <Graphic3d_Mat4d.hxx>
 
+class IVtk_IView;
 DEFINE_STANDARD_HANDLE( IVtk_IView, IVtk_Interface )
 
 //! @class IVtk_IView 
@@ -65,13 +68,27 @@ public:
   //! @return Two doubles containing the display coordinates of the view window center 
   virtual void    GetViewCenter (double& theX, double& theY) const = 0;
 
+  //! Gets window size in screen coordinates in pixels
+  virtual void    GetWindowSize (int& theX, int& theY) const = 0;
+
+  //! Gets camera projection and orientation matrices
+  virtual void    GetCamera (Graphic3d_Mat4d& theProj,
+                             Graphic3d_Mat4d& theOrient,
+                             Standard_Boolean& theIsOrtho) const = 0;
+
   //! Converts 3D display coordinates into 3D world coordinates.
   //! @param [in] theDisplayPnt 2d point of display coordinates
   //! @param [out] theWorldPnt 3d point of world coordinates
   //! @return true if conversion was successful, false otherwise
   virtual bool    DisplayToWorld (const gp_XY& theDisplayPnt, gp_XYZ& theWorldPnt) const = 0;
 
-  DEFINE_STANDARD_RTTI( IVtk_IView )
+  //! Gets viewport coordinates
+  virtual void    GetViewport (Standard_Real& theX,
+                               Standard_Real& theY,
+                               Standard_Real& theWidth,
+                               Standard_Real& theHeight) const = 0;
+
+  DEFINE_STANDARD_RTTIEXT(IVtk_IView,IVtk_Interface)
 };
 
 #endif // __IVTK_IVIEW_H__