#include <OSGDrawTreeNodeFactory.h>
Public Member Functions | |
Constructors | |
| * | DrawTreeNodeFactory (void) |
Destructor | |
| *virtual | ~DrawTreeNodeFactory (void) |
create | |
| *DrawTreeNode * | create (void) |
free | |
| *void | freeAll (void) |
stat | |
| *void | printStat (void) |
Protected Types | |
| typedef std::vector< DrawTreeNode * > | DrawTreeNodeStore |
| typedef std::vector< DrawTreeNode * >::iterator | DrawTreeNodeStoreIt |
Protected Attributes | |
Member | |
| *DrawTreeNodeStore | _nodeStore |
| DrawTreeNodeStoreIt | _currentFreeNode |
| UInt32 | _uiAllocated |
| UInt32 | _uiReused |
Private Member Functions | |
| DrawTreeNodeFactory (const DrawTreeNodeFactory &source) | |
| prohibit default function (move to 'public' if needed) | |
| void | operator= (const DrawTreeNodeFactory &source) |
| prohibit default function (move to 'public' if needed) | |
Definition at line 55 of file OSGDrawTreeNodeFactory.h.
|
|
Definition at line 100 of file OSGDrawTreeNodeFactory.h. |
|
|
Definition at line 102 of file OSGDrawTreeNodeFactory.h. |
|
|
Definition at line 55 of file OSGDrawTreeNodeFactory.cpp. References _currentFreeNode, and _nodeStore. 00055 : 00056 _nodeStore ( ), 00057 _currentFreeNode( ), 00058 _uiAllocated (0), 00059 _uiReused (0) 00060 { 00061 _currentFreeNode = _nodeStore.end(); 00062 }
|
|
|
Definition at line 67 of file OSGDrawTreeNodeFactory.cpp. References _nodeStore. 00068 { 00069 for(UInt32 i = 0; i < _nodeStore.size(); ++i) 00070 { 00071 delete _nodeStore[i]; 00072 } 00073 }
|
|
|
|
|
|
Definition at line 42 of file OSGDrawTreeNodeFactory.inl. References _currentFreeNode, _nodeStore, _uiAllocated, _uiReused, and osg::DrawTreeNode::reset(). Referenced by osg::RenderAction::dropFunctor(), and osg::RenderAction::dropGeometry(). 00043 { 00044 DrawTreeNode *returnValue = NULL; 00045 00046 if(_currentFreeNode != _nodeStore.end()) 00047 { 00048 returnValue = *_currentFreeNode; 00049 00050 ++_currentFreeNode; 00051 00052 returnValue->reset(); 00053 00054 ++_uiReused; 00055 } 00056 else 00057 { 00058 returnValue = new DrawTreeNode(); 00059 00060 _nodeStore.push_back(returnValue); 00061 00062 _currentFreeNode = _nodeStore.end(); 00063 00064 ++_uiAllocated; 00065 } 00066 00067 return returnValue; 00068 }
|
|
|
Definition at line 71 of file OSGDrawTreeNodeFactory.inl. References _currentFreeNode, _nodeStore, _uiAllocated, and _uiReused. Referenced by osg::RenderAction::start(). 00072 { 00073 _currentFreeNode = _nodeStore.begin(); 00074 00075 _uiAllocated = 0; 00076 _uiReused = 0; 00077 }
|
|
|
Definition at line 75 of file OSGDrawTreeNodeFactory.cpp. References _nodeStore, _uiAllocated, and _uiReused. 00076 { 00077 fprintf(stderr, "\n%d | %d | %d\n", 00078 _uiAllocated, 00079 _uiReused, 00080 _nodeStore.size()); 00081 }
|
|
|
|
|
|
Definition at line 109 of file OSGDrawTreeNodeFactory.h. Referenced by create(), DrawTreeNodeFactory(), freeAll(), printStat(), and ~DrawTreeNodeFactory(). |
|
|
Definition at line 110 of file OSGDrawTreeNodeFactory.h. Referenced by create(), DrawTreeNodeFactory(), and freeAll(). |
|
|
Definition at line 112 of file OSGDrawTreeNodeFactory.h. Referenced by create(), freeAll(), and printStat(). |
|
|
Definition at line 113 of file OSGDrawTreeNodeFactory.h. Referenced by create(), freeAll(), and printStat(). |
1.4.3