0030644: Coding - inline trivial methods of V3d_View class
[occt.git] / src / V3d / V3d_View.hxx
index d0ec47a..9249d97 100644 (file)
@@ -179,10 +179,10 @@ public:
   Standard_EXPORT void SetAutoZFitMode (const Standard_Boolean theIsOn, const Standard_Real theScaleFactor = 1.0);
 
   //! returns TRUE if automatic z-fit mode is turned on.
-  Standard_EXPORT Standard_Boolean AutoZFitMode() const;
+  Standard_Boolean AutoZFitMode() const { return myAutoZFitIsOn; }
 
   //! returns scale factor parameter of automatic z-fit mode.
-  Standard_EXPORT Standard_Real AutoZFitScaleFactor() const;
+  Standard_Real AutoZFitScaleFactor() const { return myAutoZFitScaleFactor; }
 
   //! If automatic z-range fitting is turned on, adjusts Z-min and Z-max
   //! projection volume planes with call to ZFitAll.
@@ -645,9 +645,8 @@ public:
   //! Returns the position of the eye.
   Standard_EXPORT void Eye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const;
 
-  //! Returns the position of point which emanating the
-  //! projections.
-  Standard_EXPORT void FocalReferencePoint (Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const;
+  //! Returns the position of point which emanating the projections.
+  void FocalReferencePoint (Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const { Eye (X,Y,Z); }
 
   //! Returns the coordinate of the point (Xpix,Ypix)
   //! in the view (XP,YP,ZP), and the projection vector of the
@@ -702,13 +701,13 @@ public:
   Standard_EXPORT Standard_Integer LightLimit() const;
 
   //! Returns the viewer in which the view has been created.
-  Standard_EXPORT Handle(V3d_Viewer) Viewer() const;
+  Handle(V3d_Viewer) Viewer() const { return MyViewer; }
 
   //! Returns True if MyView is associated with a window .
   Standard_EXPORT Standard_Boolean IfWindow() const;
 
   //! Returns the Aspect Window associated with the view.
-  Standard_EXPORT Handle(Aspect_Window) Window() const;
+  const Handle(Aspect_Window)& Window() const { return MyWindow; }
 
   //! Returns the Type of the View
   Standard_EXPORT V3d_TypeOfView Type() const;
@@ -771,7 +770,7 @@ public:
   Standard_EXPORT Standard_Real Focale() const;
 
   //! Returns the associated Graphic3d view.
-  Standard_EXPORT Handle(Graphic3d_CView) View() const;
+  const Handle(Graphic3d_CView)& View() const { return myView; }
 
   //! Switches computed HLR mode in the view.
   Standard_EXPORT void SetComputedMode (const Standard_Boolean theMode);
@@ -780,7 +779,10 @@ public:
   Standard_EXPORT Standard_Boolean ComputedMode() const;
 
   //! idem than WindowFit
-  Standard_EXPORT void WindowFitAll (const Standard_Integer Xmin, const Standard_Integer Ymin, const Standard_Integer Xmax, const Standard_Integer Ymax);
+  void WindowFitAll (const Standard_Integer Xmin, const Standard_Integer Ymin, const Standard_Integer Xmax, const Standard_Integer Ymax)
+  {
+    WindowFit (Xmin, Ymin, Xmax, Ymax);
+  }
 
   //! Transform camera eye, center and scale to fit in the passed bounding box specified in WCS.
   //! @param theCamera [in] the camera
@@ -911,10 +913,10 @@ public:
   Standard_EXPORT Graphic3d_RenderingParams& ChangeRenderingParams();
 
   //! @return flag value of objects culling mechanism
-  Standard_EXPORT Standard_Boolean IsCullingEnabled() const;
+  Standard_Boolean IsCullingEnabled() const { return RenderingParams().FrustumCullingState == Graphic3d_RenderingParams::FrustumCulling_On; }
 
-  //! Turn on/off automatic culling of objects outside frustrum (ON by default)
-  Standard_EXPORT void SetFrustumCulling (const Standard_Boolean theMode);
+  //! Turn on/off automatic culling of objects outside frustum (ON by default)
+  void SetFrustumCulling (Standard_Boolean theMode) { ChangeRenderingParams().FrustumCullingState = theMode ? Graphic3d_RenderingParams::FrustumCulling_On : Graphic3d_RenderingParams::FrustumCulling_Off; }
 
   //! Fill in the dictionary with diagnostic info.
   //! Should be called within rendering thread.
@@ -928,6 +930,12 @@ public:
   Standard_EXPORT void DiagnosticInformation (TColStd_IndexedDataMapOfStringString& theDict,
                                               Graphic3d_DiagnosticInfo theFlags) const;
 
+  //! Returns string with statistic performance info.
+  Standard_EXPORT TCollection_AsciiString StatisticInformation() const;
+
+  //! Fills in the dictionary with statistic performance info.
+  Standard_EXPORT void StatisticInformation (TColStd_IndexedDataMapOfStringString& theDict) const;
+
   DEFINE_STANDARD_RTTIEXT(V3d_View,Standard_Transient)
 
 protected: