2022-09-18 12:57:03 +00:00
|
|
|
#ifndef OPENMW_TEST_SUITE_NIF_NODE_H
|
|
|
|
#define OPENMW_TEST_SUITE_NIF_NODE_H
|
|
|
|
|
|
|
|
#include <components/nif/data.hpp>
|
|
|
|
#include <components/nif/node.hpp>
|
|
|
|
|
|
|
|
namespace Nif::Testing
|
|
|
|
{
|
2023-09-09 22:38:17 +00:00
|
|
|
inline void init(NiTransform& value)
|
2022-09-18 12:57:03 +00:00
|
|
|
{
|
2023-09-09 22:38:17 +00:00
|
|
|
value = NiTransform::getIdentity();
|
2022-09-18 12:57:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void init(Extra& value)
|
|
|
|
{
|
2023-08-31 21:58:23 +00:00
|
|
|
value.mNext = ExtraPtr(nullptr);
|
2022-09-18 12:57:03 +00:00
|
|
|
}
|
|
|
|
|
2023-09-09 18:32:42 +00:00
|
|
|
inline void init(NiObjectNET& value)
|
2022-09-18 12:57:03 +00:00
|
|
|
{
|
2023-09-09 18:32:42 +00:00
|
|
|
value.mExtra = ExtraPtr(nullptr);
|
|
|
|
value.mExtraList = ExtraList();
|
|
|
|
value.mController = ControllerPtr(nullptr);
|
2022-09-18 12:57:03 +00:00
|
|
|
}
|
|
|
|
|
2023-09-10 02:23:25 +00:00
|
|
|
inline void init(NiAVObject& value)
|
2022-09-18 12:57:03 +00:00
|
|
|
{
|
2023-09-09 18:32:42 +00:00
|
|
|
init(static_cast<NiObjectNET&>(value));
|
2023-09-10 02:23:25 +00:00
|
|
|
value.mFlags = 0;
|
|
|
|
init(value.mTransform);
|
2022-09-18 12:57:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void init(NiGeometry& value)
|
|
|
|
{
|
2023-09-10 02:23:25 +00:00
|
|
|
init(static_cast<NiAVObject&>(value));
|
2023-08-03 19:55:06 +00:00
|
|
|
value.data = NiGeometryDataPtr(nullptr);
|
|
|
|
value.skin = NiSkinInstancePtr(nullptr);
|
2022-09-18 12:57:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void init(NiTriShape& value)
|
|
|
|
{
|
|
|
|
init(static_cast<NiGeometry&>(value));
|
|
|
|
value.recType = RC_NiTriShape;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void init(NiTriStrips& value)
|
|
|
|
{
|
|
|
|
init(static_cast<NiGeometry&>(value));
|
|
|
|
value.recType = RC_NiTriStrips;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void init(NiSkinInstance& value)
|
|
|
|
{
|
2023-09-03 12:21:42 +00:00
|
|
|
value.mData = NiSkinDataPtr(nullptr);
|
2023-09-10 02:23:25 +00:00
|
|
|
value.mRoot = NiAVObjectPtr(nullptr);
|
2022-09-18 12:57:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void init(Controller& value)
|
|
|
|
{
|
|
|
|
value.next = ControllerPtr(nullptr);
|
|
|
|
value.flags = 0;
|
|
|
|
value.frequency = 0;
|
|
|
|
value.phase = 0;
|
|
|
|
value.timeStart = 0;
|
|
|
|
value.timeStop = 0;
|
2023-09-09 18:32:42 +00:00
|
|
|
value.target = NiObjectNETPtr(nullptr);
|
2022-09-18 12:57:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|