mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 01:07:43 +00:00
Massive template-based DNA refactor
This commit is contained in:
@@ -30,6 +30,33 @@ void DCLN::Collision::NodesendToBlender(hecl::blender::PyOutStream& os) const
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class Op>
|
||||
void DCLN::Collision::Node::Enumerate(typename Op::StreamT& s)
|
||||
{
|
||||
Do<Op>({"xf[0]"}, xf[0], s);
|
||||
Do<Op>({"xf[1]"}, xf[1], s);
|
||||
Do<Op>({"xf[2]"}, xf[2], s);
|
||||
Do<Op>({"halfExtent"}, halfExtent, s);
|
||||
Do<Op>({"isLeaf"}, isLeaf, s);
|
||||
if (isLeaf)
|
||||
{
|
||||
if (!leafData)
|
||||
leafData.reset(new LeafData);
|
||||
Do<Op>({"leafData"}, *leafData, s);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!left)
|
||||
left.reset(new Node);
|
||||
Do<Op>({"left"}, *left, s);
|
||||
if (!right)
|
||||
right.reset(new Node);
|
||||
Do<Op>({"right"}, *right, s);
|
||||
}
|
||||
}
|
||||
|
||||
AT_SPECIALIZE_DNA(DCLN::Collision::Node)
|
||||
|
||||
void DCLN::sendToBlender(hecl::blender::Connection& conn, std::string_view entryName)
|
||||
{
|
||||
/* Open Py Stream and read sections */
|
||||
|
||||
Reference in New Issue
Block a user