Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-31 08:30:49

0001 // Copyright (c) 2017 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _OpenGl_FrameStats_HeaderFile
0015 #define _OpenGl_FrameStats_HeaderFile
0016 
0017 #include <Graphic3d_FrameStats.hxx>
0018 #include <NCollection_IndexedMap.hxx>
0019 
0020 class Graphic3d_CStructure;
0021 
0022 //! Class storing the frame statistics.
0023 class OpenGl_FrameStats : public Graphic3d_FrameStats
0024 {
0025   DEFINE_STANDARD_RTTIEXT(OpenGl_FrameStats, Graphic3d_FrameStats)
0026 public:
0027   //! Default constructor.
0028   Standard_EXPORT OpenGl_FrameStats();
0029 
0030   //! Destructor.
0031   Standard_EXPORT virtual ~OpenGl_FrameStats();
0032 
0033 public:
0034   //! Copy stats values into another instance (create new instance, if not exists).
0035   //! The main use of this method is to track changes in statistics (e.g. in conjunction with
0036   //! IsEqual() method).
0037   //! @return TRUE if frame data has been changed so that the presentation should be updated
0038   Standard_EXPORT virtual bool IsFrameUpdated(Handle(OpenGl_FrameStats)& thePrev) const;
0039 
0040 protected:
0041   //! Method to collect statistics from the View; called by FrameEnd().
0042   Standard_EXPORT virtual void updateStatistics(const Handle(Graphic3d_CView)& theView,
0043                                                 bool theIsImmediateOnly) Standard_OVERRIDE;
0044 
0045   //! Updates counters for structures.
0046   Standard_EXPORT virtual void updateStructures(
0047     Standard_Integer                                           theViewId,
0048     const NCollection_IndexedMap<const Graphic3d_CStructure*>& theStructures,
0049     Standard_Boolean                                           theToCountElems,
0050     Standard_Boolean                                           theToCountTris,
0051     Standard_Boolean                                           theToCountMem);
0052 };
0053 
0054 DEFINE_STANDARD_HANDLE(OpenGl_FrameStats, Graphic3d_FrameStats)
0055 
0056 #endif // _OpenGl_FrameStats_HeaderFile