Files
watrbx-game-engine/App/util/SpanningNode.cpp
T
2025-09-18 17:55:52 -04:00

28 lines
604 B
C++

/* Copyright 2003-2005 ROBLOX Corporation, All Rights Reserved */
#include "stdafx.h"
#include "Util/SpanningNode.h"
#include "Util/SpanningEdge.h"
namespace RBX {
// Having a parent edge == in the spanning tree
void SpanningNode::setEdgeToParent(SpanningEdge* edge)
{
edgeToParent = edge;
}
bool SpanningNode::lessThan(const IndexedTree* other) const
{
RBXASSERT(edgeToParent);
const SpanningNode* otherNode = rbx_static_cast<const SpanningNode*>(other);
RBXASSERT(otherNode->getConstEdgeToParent());
return edgeToParent->isLighterThan(otherNode->getConstEdgeToParent());
}
} // namespace