Coin
4.0.3
Coin3D core library
|
Data structure for gathering scene graph traversal profiling information. More...
#include <Inventor/annex/SbProfilingData.h>
Public Types | |
enum | FootprintType { MEMORY_SIZE , VIDEO_MEMORY_SIZE } |
enum | NodeDataQueryFlags { INCLUDE_CHILDREN = 0x01 } |
enum | NodeFlag { GL_CACHED_FLAG , CULLED_FLAG } |
typedef void | SbProfilingDataCB(void *userdata, const SbProfilingData &data, const SbList< SoNode * > &pointers, SbList< int > &childindices, int idx) |
Public Member Functions | |
SbProfilingData (const SbProfilingData &rhs) | |
SbProfilingData (void) | |
~SbProfilingData (void) | |
SbTime | getActionDuration (void) const |
SbTime | getActionStartTime (void) const |
SbTime | getActionStopTime (void) const |
SoType | getActionType (void) const |
int | getIndex (const SoPath *path, SbBool create=FALSE) |
int | getLongestNameLength (void) const |
int | getLongestTypeNameLength (void) const |
SbBool | getNodeFlag (const SoPath *path, NodeFlag flag) const |
SbBool | getNodeFlag (int idx, NodeFlag flag) const |
size_t | getNodeFootprint (const SoPath *path, FootprintType type, unsigned int queryflags=0) const |
size_t | getNodeFootprint (int idx, FootprintType type, unsigned int queryflags=0) const |
SbName | getNodeName (int idx) const |
SbTime | getNodeTiming (const SoPath *path, unsigned int queryflags=0) const |
SbTime | getNodeTiming (int idx, unsigned int queryflags=0) const |
SoType | getNodeType (int idx) const |
int | getNumNodeEntries (void) const |
int | getParentIndex (int idx) const |
size_t | getProfilingDataSize (void) const |
void | getStatsForName (SbProfilingNodeNameKey name, SbTime &total, SbTime &max, uint32_t &count) const |
void | getStatsForNamesKeyList (SbList< SbProfilingNodeNameKey > &keys_out) const |
void | getStatsForType (SbProfilingNodeTypeKey type, SbTime &total, SbTime &max, uint32_t &count) const |
void | getStatsForTypesKeyList (SbList< SbProfilingNodeTypeKey > &keys_out) const |
int | operator!= (const SbProfilingData &rhs) const |
SbProfilingData & | operator+= (const SbProfilingData &rhs) |
SbProfilingData & | operator= (const SbProfilingData &rhs) |
int | operator== (const SbProfilingData &rhs) const |
void | preOffsetNodeTiming (int idx, SbTime timing) |
void | reportAll (SbProfilingDataCB *callback, void *userdata) const |
void | reset (void) |
void | setActionStartTime (SbTime starttime) |
void | setActionStopTime (SbTime stoptime) |
void | setActionType (SoType actiontype) |
void | setNodeFlag (const SoPath *path, NodeFlag flag, SbBool on) |
void | setNodeFlag (int idx, NodeFlag flag, SbBool on) |
void | setNodeFootprint (const SoPath *path, FootprintType type, size_t footprint) |
void | setNodeFootprint (int idx, FootprintType type, size_t footprint) |
void | setNodeTiming (const SoPath *path, SbTime timing) |
void | setNodeTiming (int idx, SbTime timing) |
Protected Attributes | |
SbTime | actionStartTime |
SbTime | actionStopTime |
SoType | actionType |
Data structure for gathering scene graph traversal profiling information.
SbProfilingData::SbProfilingData | ( | void | ) |
Constructor.
SbProfilingData::SbProfilingData | ( | const SbProfilingData & | rhs | ) |
Copy constructor.
SbProfilingData::~SbProfilingData | ( | void | ) |
Destructor.
Return the time the action has spent on the traversal that was profiled.
Return the action type set for this SbProfilingData.
Return the index of the tail node in the path. If node is not registered, add it and return that index.
Returns the timing for a node.
int SbProfilingData::getParentIndex | ( | int | idx | ) | const |
Return the index of the parent of the node entry at index idx. If entry is a root entry, -1 is returned.
size_t SbProfilingData::getProfilingDataSize | ( | void | ) | const |
Returns the amount of memory allocated for this data structure.
SbProfilingData & SbProfilingData::operator+= | ( | const SbProfilingData & | rhs | ) |
Add profiling data from another data set.
SbProfilingData & SbProfilingData::operator= | ( | const SbProfilingData & | rhs | ) |
Assignment operator.
This function will adjust node timings without touching traversal counters.
Register which type of action we are recording statistics for.
This function calls the index version of setNodeTiming after having fetched the index.
This method sets the timing for a node, as if it was new data to be registered. This means that counters of various types are implicitly incremented and similar things. To avoid those side effects, use offsetNodeTiming, which leaves all the counters alone.