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();
|
2023-09-13 23:46:20 +00:00
|
|
|
value.mController = NiTimeControllerPtr(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-09-14 10:07:20 +00:00
|
|
|
value.mData = NiGeometryDataPtr(nullptr);
|
|
|
|
value.mSkin = 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);
|
2023-12-03 15:20:05 +00:00
|
|
|
value.mPartitions = NiSkinPartitionPtr(nullptr);
|
2022-09-18 12:57:03 +00:00
|
|
|
}
|
|
|
|
|
2023-09-13 23:46:20 +00:00
|
|
|
inline void init(NiTimeController& value)
|
2022-09-18 12:57:03 +00:00
|
|
|
{
|
2023-09-13 23:46:20 +00:00
|
|
|
value.mNext = NiTimeControllerPtr(nullptr);
|
|
|
|
value.mFlags = 0;
|
|
|
|
value.mFrequency = 0;
|
|
|
|
value.mPhase = 0;
|
|
|
|
value.mTimeStart = 0;
|
|
|
|
value.mTimeStop = 0;
|
2023-09-13 22:21:21 +00:00
|
|
|
value.mTarget = NiObjectNETPtr(nullptr);
|
2022-09-18 12:57:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|