Fix animation axis text for new calling conventions.

NOTE: the transient model data as initialized contains nullptrs for mostly everything - except the required data for this test.
This commit is contained in:
Richard Harrison
2017-05-11 13:02:40 +02:00
parent ee4b6621e7
commit 4acd047982
+9 -4
View File
@@ -5,6 +5,8 @@
#include <iostream> #include <iostream>
#include <simgear/misc/test_macros.hxx> #include <simgear/misc/test_macros.hxx>
#include <simgear/scene/util/SGTransientModelData.hxx>
#include <simgear/scene/util/SGReaderWriterOptions.hxx>
#define VERIFY_CLOSE(a, b) SG_VERIFY( norm((a) - (b)) <= 1e-5 ) #define VERIFY_CLOSE(a, b) SG_VERIFY( norm((a) - (b)) <= 1e-5 )
@@ -12,15 +14,16 @@
struct AnimationTest: struct AnimationTest:
public SGAnimation public SGAnimation
{ {
AnimationTest(const SGPropertyNode* n): AnimationTest(simgear::SGTransientModelData transientModelData):
SGAnimation(n, 0) SGAnimation(transientModelData), modelData(transientModelData)
{} {}
void readConfig() void readConfig()
{ {
readRotationCenterAndAxis(center, axis); readRotationCenterAndAxis(0, center, axis, modelData);
} }
simgear::SGTransientModelData &modelData;
SGVec3d center, SGVec3d center,
axis; axis;
}; };
@@ -28,7 +31,9 @@ struct AnimationTest:
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
SGPropertyNode_ptr config = new SGPropertyNode; SGPropertyNode_ptr config = new SGPropertyNode;
AnimationTest anim(config);
simgear::SGTransientModelData transientModelData(nullptr, config, config, nullptr, "", 0);
AnimationTest anim(transientModelData);
SGVec3d v1(1, 2, 3), SGVec3d v1(1, 2, 3),
v2(-1, 4, 0); v2(-1, 4, 0);