2022-09-18 14:57:03 +02: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-10 01:38:17 +03:00
|
|
|
inline void init(NiTransform& value)
|
2022-09-18 14:57:03 +02:00
|
|
|
{
|
2023-09-10 01:38:17 +03:00
|
|
|
value = NiTransform::getIdentity();
|
2022-09-18 14:57:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void init(Extra& value)
|
|
|
|
{
|
2023-09-01 00:58:23 +03:00
|
|
|
value.mNext = ExtraPtr(nullptr);
|
2022-09-18 14:57:03 +02:00
|
|
|
}
|
|
|
|
|
2023-09-09 21:32:42 +03:00
|
|
|
inline void init(NiObjectNET& value)
|
2022-09-18 14:57:03 +02:00
|
|
|
{
|
2023-09-09 21:32:42 +03:00
|
|
|
value.mExtra = ExtraPtr(nullptr);
|
|
|
|
value.mExtraList = ExtraList();
|
2023-09-14 02:46:20 +03:00
|
|
|
value.mController = NiTimeControllerPtr(nullptr);
|
2022-09-18 14:57:03 +02:00
|
|
|
}
|
|
|
|
|
2023-09-10 05:23:25 +03:00
|
|
|
inline void init(NiAVObject& value)
|
2022-09-18 14:57:03 +02:00
|
|
|
{
|
2023-09-09 21:32:42 +03:00
|
|
|
init(static_cast<NiObjectNET&>(value));
|
2023-09-10 05:23:25 +03:00
|
|
|
value.mFlags = 0;
|
|
|
|
init(value.mTransform);
|
2022-09-18 14:57:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void init(NiGeometry& value)
|
|
|
|
{
|
2023-09-10 05:23:25 +03:00
|
|
|
init(static_cast<NiAVObject&>(value));
|
2023-09-14 13:07:20 +03:00
|
|
|
value.mData = NiGeometryDataPtr(nullptr);
|
|
|
|
value.mSkin = NiSkinInstancePtr(nullptr);
|
2022-09-18 14:57:03 +02: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 15:21:42 +03:00
|
|
|
value.mData = NiSkinDataPtr(nullptr);
|
2023-09-10 05:23:25 +03:00
|
|
|
value.mRoot = NiAVObjectPtr(nullptr);
|
2022-09-18 14:57:03 +02:00
|
|
|
}
|
|
|
|
|
2023-09-14 02:46:20 +03:00
|
|
|
inline void init(NiTimeController& value)
|
2022-09-18 14:57:03 +02:00
|
|
|
{
|
2023-09-14 02:46:20 +03:00
|
|
|
value.mNext = NiTimeControllerPtr(nullptr);
|
|
|
|
value.mFlags = 0;
|
|
|
|
value.mFrequency = 0;
|
|
|
|
value.mPhase = 0;
|
|
|
|
value.mTimeStart = 0;
|
|
|
|
value.mTimeStop = 0;
|
2023-09-14 01:21:21 +03:00
|
|
|
value.mTarget = NiObjectNETPtr(nullptr);
|
2022-09-18 14:57:03 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|