MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / loadBspTree

Method loadBspTree

src/engine/BspTree.cpp:121–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121void BspTree::loadBspTree(const ZenLoad::zCBspTreeData& data)
122{
123 using namespace ZenLoad;
124
125 m_Nodes.reserve(data.nodes.size());
126
127 // Extract the bsp-nodes
128 for (const zCBspNode& s : data.nodes)
129 {
130 m_Nodes.emplace_back();
131
132 BspNode& n = m_Nodes.back();
133 n.front = s.front != zCBspNode::INVALID_NODE ? (int)s.front : -1;
134 n.back = s.back != zCBspNode::INVALID_NODE ? (int)s.back : -1;
135 n.parent = s.parent != zCBspNode::INVALID_NODE ? (int)s.parent : -1;
136
137 n.bbox.min = s.bbox3dMin.v;
138 n.bbox.max = s.bbox3dMax.v;
139
140 n.plane = s.plane.v;
141 }
142}
143
144void BspTree::debugDraw()
145{

Callers 1

initMethod · 0.80

Calls 2

backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected