mirror of
https://github.com/overte-org/overte.git
synced 2025-06-25 09:10:04 +02:00
optimize isLeaf() to just check the child mask instead of counting children
This commit is contained in:
parent
f3bd8925d9
commit
adaa01c13e
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ public:
|
||||||
float distanceSquareToPoint(const glm::vec3& point) const; // when you don't need the actual distance, use this.
|
float distanceSquareToPoint(const glm::vec3& point) const; // when you don't need the actual distance, use this.
|
||||||
float distanceToPoint(const glm::vec3& point) const;
|
float distanceToPoint(const glm::vec3& point) const;
|
||||||
|
|
||||||
bool isLeaf() const { return getChildCount() == 0; }
|
bool isLeaf() const { return _childBitmask == 0; }
|
||||||
int getChildCount() const { return numberOfOnes(_childBitmask); }
|
int getChildCount() const { return numberOfOnes(_childBitmask); }
|
||||||
void printDebugDetails(const char* label) const;
|
void printDebugDetails(const char* label) const;
|
||||||
bool isDirty() const { return _isDirty; }
|
bool isDirty() const { return _isDirty; }
|
||||||
|
|
Loading…
Reference in a new issue