Coin  4.0.3
Coin3D core library
Loading...
Searching...
No Matches
SbProfilingData Class Reference

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
 
SbProfilingDataoperator+= (const SbProfilingData &rhs)
 
SbProfilingDataoperator= (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
 

Detailed Description

Data structure for gathering scene graph traversal profiling information.

Constructor & Destructor Documentation

◆ SbProfilingData() [1/2]

SbProfilingData::SbProfilingData ( void )

Constructor.

◆ SbProfilingData() [2/2]

SbProfilingData::SbProfilingData ( const SbProfilingData & rhs)

Copy constructor.

◆ ~SbProfilingData()

SbProfilingData::~SbProfilingData ( void )

Destructor.

Member Function Documentation

◆ getActionDuration()

SbTime SbProfilingData::getActionDuration ( void ) const

Return the time the action has spent on the traversal that was profiled.

◆ getActionStartTime()

SbTime SbProfilingData::getActionStartTime ( void ) const

Return the action start time.

◆ getActionStopTime()

SbTime SbProfilingData::getActionStopTime ( void ) const

Return the action stop time.

◆ getActionType()

SoType SbProfilingData::getActionType ( void ) const

Return the action type set for this SbProfilingData.

◆ getIndex()

int SbProfilingData::getIndex ( const SoPath * path,
SbBool create = FALSE )

Return the index of the tail node in the path. If node is not registered, add it and return that index.

◆ getNodeTiming()

SbTime SbProfilingData::getNodeTiming ( const SoPath * path,
unsigned int flags = 0 ) const

Returns the timing for a node.

◆ getParentIndex()

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.

◆ getProfilingDataSize()

size_t SbProfilingData::getProfilingDataSize ( void ) const

Returns the amount of memory allocated for this data structure.

◆ operator+=()

SbProfilingData & SbProfilingData::operator+= ( const SbProfilingData & rhs)

Add profiling data from another data set.

◆ operator=()

SbProfilingData & SbProfilingData::operator= ( const SbProfilingData & rhs)

Assignment operator.

◆ preOffsetNodeTiming()

void SbProfilingData::preOffsetNodeTiming ( int idx,
SbTime timing )

This function will adjust node timings without touching traversal counters.

◆ reset()

void SbProfilingData::reset ( void )

Remove all stored data.

◆ setActionStartTime()

void SbProfilingData::setActionStartTime ( SbTime starttime)

Set traversal start time.

◆ setActionStopTime()

void SbProfilingData::setActionStopTime ( SbTime stoptime)

Set traversal stop time.

◆ setActionType()

void SbProfilingData::setActionType ( SoType actiontype)

Register which type of action we are recording statistics for.

◆ setNodeTiming() [1/2]

void SbProfilingData::setNodeTiming ( const SoPath * path,
SbTime timing )

This function calls the index version of setNodeTiming after having fetched the index.

◆ setNodeTiming() [2/2]

void SbProfilingData::setNodeTiming ( int idx,
SbTime timing )

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.

See also
offsetNodeTiming

The documentation for this class was generated from the following files: