SL-16607: Add Tracy capture colors for insert, remove, and balance
parent
48582ba647
commit
259c38600d
|
|
@ -34,6 +34,9 @@
|
|||
|
||||
#define OCT_ERRS LL_WARNS("OctreeErrors")
|
||||
|
||||
#define OCTREE_DEBUG_COLOR_REMOVE 0x0000FF // r
|
||||
#define OCTREE_DEBUG_COLOR_INSERT 0x00FF00 // g
|
||||
#define OCTREE_DEBUG_COLOR_BALANCE 0xFF0000 // b
|
||||
|
||||
extern U32 gOctreeMaxCapacity;
|
||||
extern float gOctreeMinSize;
|
||||
|
|
@ -308,6 +311,8 @@ public:
|
|||
|
||||
virtual bool insert(T* data)
|
||||
{
|
||||
//LL_PROFILE_ZONE_NAMED_COLOR("Octree::insert()",OCTREE_DEBUG_COLOR_INSERT);
|
||||
|
||||
if (data == NULL || data->getBinIndex() != -1)
|
||||
{
|
||||
OCT_ERRS << "!!! INVALID ELEMENT ADDED TO OCTREE BRANCH !!!" << LL_ENDL;
|
||||
|
|
@ -454,6 +459,8 @@ public:
|
|||
|
||||
bool remove(T* data)
|
||||
{
|
||||
//LL_PROFILE_ZONE_NAMED_COLOR("Octree::remove()", OCTREE_DEBUG_COLOR_REMOVE);
|
||||
|
||||
S32 i = data->getBinIndex();
|
||||
|
||||
if (i >= 0 && i < mElementCount)
|
||||
|
|
@ -692,6 +699,8 @@ public:
|
|||
|
||||
bool balance()
|
||||
{
|
||||
//LL_PROFILE_ZONE_NAMED_COLOR("Octree::balance()",OCTREE_DEBUG_COLOR_BALANCE);
|
||||
|
||||
if (this->getChildCount() == 1 &&
|
||||
!(this->mChild[0]->isLeaf()) &&
|
||||
this->mChild[0]->getElementCount() == 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue