Coin Logo http://www.sim.no/
http://www.coin3d.org/

SoProfilerStats.h
00001 #ifndef COIN_SOPROFILERSTATS_H
00002 #define COIN_SOPROFILERSTATS_H
00003 
00004 /**************************************************************************\
00005  *
00006  *  This file is part of the Coin 3D visualization library.
00007  *  Copyright (C) by Kongsberg Oil & Gas Technologies.
00008  *
00009  *  This library is free software; you can redistribute it and/or
00010  *  modify it under the terms of the GNU General Public License
00011  *  ("GPL") version 2 as published by the Free Software Foundation.
00012  *  See the file LICENSE.GPL at the root directory of this source
00013  *  distribution for additional information about the GNU GPL.
00014  *
00015  *  For using Coin with software that can not be combined with the GNU
00016  *  GPL, and for taking advantage of the additional benefits of our
00017  *  support services, please contact Kongsberg Oil & Gas Technologies
00018  *  about acquiring a Coin Professional Edition License.
00019  *
00020  *  See http://www.coin3d.org/ for more information.
00021  *
00022  *  Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
00023  *  http://www.sim.no/  sales@sim.no  coin-support@coin3d.org
00024  *
00025 \**************************************************************************/
00026 
00027 #include <Inventor/fields/SoMFName.h>
00028 #include <Inventor/fields/SoMFNode.h>
00029 #include <Inventor/fields/SoMFTime.h>
00030 #include <Inventor/fields/SoMFUInt32.h>
00031 #include <Inventor/fields/SoSFTrigger.h>
00032 #include <Inventor/nodes/SoSubNode.h>
00033 #include <Inventor/tools/SbPimplPtr.h>
00034 
00035 class SbProfilingData;
00036 class SoSeparator;
00037 
00038 class COIN_DLL_API SoProfilerStats : public SoNode {
00039   typedef SoNode inherited;
00040 
00041   SO_NODE_HEADER(SoProfilerStats);
00042 
00043 public:
00044   static void initClass(void);
00045   SoProfilerStats(void);
00046 
00047   //fields for storing information on rendering time spent per node type
00048   SoMFName renderedNodeType;
00049   SoMFTime renderingTimePerNodeType;
00050   SoMFTime renderingTimeMaxPerNodeType;
00051   SoMFUInt32 renderedNodeTypeCount;
00052 
00053   SoMFName profiledAction;
00054   SoMFTime profiledActionTime;
00055   SoMFNode separatorsCullRoots;
00056 
00057   SoSFTrigger profilingUpdate;
00058 
00059   // FIXME: below are suggestions for fields exposing future profiling
00060   // functionality.  -mortene.
00061 
00062   //fields for storing time spent rendering in each node in the scene graph
00063   //  SoMFNode renderedNode;
00064   //  SoMFTime renderingTimePerNode;
00065 
00066   //fields for storing time spent handling events in each node in the scene
00067   //graph
00068   //  SoMFNode handlingNode;
00069   //  SoMFTime handlingTimePerNode;
00070 
00071   virtual void GLRender(SoGLRenderAction * action);
00072   virtual void handleEvent(SoHandleEventAction * action);
00073   virtual void rayPick(SoRayPickAction * action);
00074   virtual void getBoundingBox(SoGetBoundingBoxAction * action);
00075   virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action);
00076   virtual void audioRender(SoAudioRenderAction * action);
00077 
00078   virtual void callback(SoCallbackAction * action);
00079   virtual void getMatrix(SoGetMatrixAction * action);
00080   virtual void pick(SoPickAction * action);
00081   virtual void search(SoSearchAction * action);
00082   virtual void write(SoWriteAction * action);
00083 
00084   const SbProfilingData & getProfilingData(SoType actiontype) const;
00085 
00086 protected:
00087   virtual ~SoProfilerStats();
00088 
00089   virtual void notify (SoNotList *l);
00090 
00091 private:
00092   SbPimplPtr<class SoProfilerStatsP> pimpl;
00093 
00094   SoProfilerStats(const SoProfilerStats & rhs);
00095   SoProfilerStats & operator=(const SoProfilerStats & rhs);
00096 
00097 }; // SoProfilerStats
00098 
00099 #endif // !COIN_SOPROFILERSTATS_H

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Thu Apr 28 2011 03:43:06 for Coin by Doxygen 1.7.4.