mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-05 05:07:48 +00:00
28 lines
604 B
C++
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
|