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

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
35class SbProfilingData;
36class SoSeparator;
37
38class COIN_DLL_API SoProfilerStats : public SoNode {
39 typedef SoNode inherited;
40
42
43public:
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
86protected:
87 virtual ~SoProfilerStats();
88
89 virtual void notify (SoNotList *l);
90
91private:
92 SbPimplPtr<class SoProfilerStatsP> pimpl;
93
95 SoProfilerStats & operator=(const SoProfilerStats & rhs);
96
97}; // SoProfilerStats
98
99#endif // !COIN_SOPROFILERSTATS_H
Data structure for gathering scene graph traversal profiling information.
Definition SbProfilingData.h:43
The SoAudioRenderAction class renders the aural parts of the scene graph.
Definition SoAudioRenderAction.h:33
The SoCallbackAction class invokes callbacks at specific nodes.
Definition SoCallbackAction.h:71
The SoGLRenderAction class renders the scene graph with OpenGL calls.
Definition SoGLRenderAction.h:41
The SoGetBoundingBoxAction class calculates bounding boxes for nodes and subgraphs.
Definition SoGetBoundingBoxAction.h:36
The SoGetMatrixAction class is an action for accumulating the transformation matrix of a subgraph.
Definition SoGetMatrixAction.h:37
The SoGetPrimitiveCountAction class counts the primitives in a scene.
Definition SoGetPrimitiveCountAction.h:34
The SoHandleEventAction class distributes user events to the scene.
Definition SoHandleEventAction.h:37
The SoMFName class is a container for SbName values.
Definition SoMFName.h:31
The SoMFNode class is a container for nodes.
Definition SoMFNode.h:32
The SoMFTime class is a container for SbTime values.
Definition SoMFTime.h:31
The SoMFUInt32 class is a container for 32-bit unsigned integer values.
Definition SoMFUInt32.h:30
The SoNode class is the base class for nodes used in scene graphs.
Definition SoNode.h:47
virtual void notify(SoNotList *l)
Definition SoNode.cpp:439
virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action)
Definition SoNode.cpp:870
virtual void handleEvent(SoHandleEventAction *action)
Definition SoNode.cpp:1059
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
Definition SoNode.cpp:841
virtual void audioRender(SoAudioRenderAction *action)
Definition SoNode.cpp:1283
virtual void callback(SoCallbackAction *action)
Definition SoNode.cpp:1002
virtual void getMatrix(SoGetMatrixAction *action)
Definition SoNode.cpp:1029
virtual void rayPick(SoRayPickAction *action)
Definition SoNode.cpp:1115
virtual void pick(SoPickAction *action)
Definition SoNode.cpp:1085
virtual void search(SoSearchAction *action)
Definition SoNode.cpp:1148
virtual void write(SoWriteAction *action)
Definition SoNode.cpp:1217
virtual void GLRender(SoGLRenderAction *action)
Definition SoNode.cpp:930
The SoNotList class is a list of SoNotRec notification records.
Definition SoNotification.h:34
The SoPickAction class is the base class for picking actions.
Definition SoPickAction.h:34
The SoProfilerStats class is a node for exposing profiling results gathered by SoProfilerElement.
Definition SoProfilerStats.h:38
The SoRayPickAction class does ray intersection with scene graphs.
Definition SoRayPickAction.h:41
The SoSFTrigger class is the "void" class used for detecting field changes.
Definition SoSFTrigger.h:32
The SoSearchAction class provides methods for searching through scene graphs.
Definition SoSearchAction.h:35
The SoSeparator class is a state-preserving group node.
Definition SoSeparator.h:35
The SoType class is the basis for the run-time type system in Coin.
Definition SoType.h:50
The SoWriteAction class writes a scene graph to file.
Definition SoWriteAction.h:33
#define SO_NODE_HEADER(classname)
Definition macros.dox:43

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

Generated on Wed Jul 17 2024 for Coin by Doxygen 1.12.0.