| http://www.sim.no/ http://www.coin3d.org/

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

SoProfilerStats.h
1 #ifndef COIN_SOPROFILERSTATS_H
2 #define COIN_SOPROFILERSTATS_H
3
4 /**************************************************************************\
5 *
6 * This file is part of the Coin 3D visualization library.
7 * Copyright (C) by Kongsberg Oil & Gas Technologies.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * ("GPL") version 2 as published by the Free Software Foundation.
12 * See the file LICENSE.GPL at the root directory of this source
13 * distribution for additional information about the GNU GPL.
14 *
15 * For using Coin with software that can not be combined with the GNU
16 * GPL, and for taking advantage of the additional benefits of our
17 * support services, please contact Kongsberg Oil & Gas Technologies
18 * about acquiring a Coin Professional Edition License.
19 *
20 * See http://www.coin3d.org/ for more information.
21 *
22 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24 *
25 \**************************************************************************/
26
27 #include <Inventor/fields/SoMFName.h>
28 #include <Inventor/fields/SoMFNode.h>
29 #include <Inventor/fields/SoMFTime.h>
30 #include <Inventor/fields/SoMFUInt32.h>
31 #include <Inventor/fields/SoSFTrigger.h>
32 #include <Inventor/nodes/SoSubNode.h>
33 #include <Inventor/tools/SbPimplPtr.h>
34
35 class SbProfilingData;
36 class SoSeparator;
37
38 class COIN_DLL_API SoProfilerStats : public SoNode {
39 typedef SoNode inherited;
40
41 SO_NODE_HEADER(SoProfilerStats);
42
43 public:
44 static void initClass(void);
45 SoProfilerStats(void);
46
47 //fields for storing information on rendering time spent per node type
48 SoMFName renderedNodeType;
49 SoMFTime renderingTimePerNodeType;
50 SoMFTime renderingTimeMaxPerNodeType;
51 SoMFUInt32 renderedNodeTypeCount;
52
53 SoMFName profiledAction;
54 SoMFTime profiledActionTime;
55 SoMFNode separatorsCullRoots;
56
57 SoSFTrigger profilingUpdate;
58
59 // FIXME: below are suggestions for fields exposing future profiling
60 // functionality. -mortene.
61
62 //fields for storing time spent rendering in each node in the scene graph
63 // SoMFNode renderedNode;
64 // SoMFTime renderingTimePerNode;
65
66 //fields for storing time spent handling events in each node in the scene
67 //graph
68 // SoMFNode handlingNode;
69 // SoMFTime handlingTimePerNode;
70
71 virtual void GLRender(SoGLRenderAction * action);
72 virtual void handleEvent(SoHandleEventAction * action);
73 virtual void rayPick(SoRayPickAction * action);
74 virtual void getBoundingBox(SoGetBoundingBoxAction * action);
75 virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action);
76 virtual void audioRender(SoAudioRenderAction * action);
77
78 virtual void callback(SoCallbackAction * action);
79 virtual void getMatrix(SoGetMatrixAction * action);
80 virtual void pick(SoPickAction * action);
81 virtual void search(SoSearchAction * action);
82 virtual void write(SoWriteAction * action);
83
84 const SbProfilingData & getProfilingData(SoType actiontype) const;
85
86 protected:
87 virtual ~SoProfilerStats();
88
89 virtual void notify (SoNotList *l);
90
91 private:
92 SbPimplPtr<class SoProfilerStatsP> pimpl;
93
94 SoProfilerStats(const SoProfilerStats & rhs);
95 SoProfilerStats & operator=(const SoProfilerStats & rhs);
96
97 }; // SoProfilerStats
98
99 #endif // !COIN_SOPROFILERSTATS_H

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