9 #include <utl/CoordinateSystem.h>
10 #include <utl/Vector.h>
11 #include <utl/TransformationMatrix.h>
12 #include <utl/GeometryException.h>
13 #include <utl/AugerUnits.h>
14 #include <tst/Verify.h>
16 #include <cppunit/extensions/HelperMacros.h>
32 CPPUNIT_TEST(TestCoordinateSystemConstructor);
33 CPPUNIT_TEST(TestNewCoordinateSystemBase);
34 CPPUNIT_TEST(TestTransformationChaining);
35 CPPUNIT_TEST_SUITE_END();
48 CoordinateSystem::RotationX(0, cDefault);
59 CPPUNIT_ASSERT(cDefault == CoordinateSystem::GetRootCoordinateSystem());
62 CPPUNIT_ASSERT(c1->GetReferenceSystem() == CoordinateSystem::GetRootCoordinateSystem());
65 CPPUNIT_ASSERT(c2->GetReferenceSystem() == CoordinateSystem::GetRootCoordinateSystem());
68 CPPUNIT_ASSERT(c3->GetReferenceSystem() == c2);
72 CPPUNIT_ASSERT(c4->GetReferenceSystem() == c2);
99 CPPUNIT_ASSERT(Verify<CloseTo>(mra.Distance(r->GetTransformationTo(
a)), 0.));
100 CPPUNIT_ASSERT(Verify<CloseTo>(mra.Inverse().Distance(
a->GetTransformationTo(r)), 0.));
101 CPPUNIT_ASSERT(Verify<CloseTo>(maa1.Distance(
a->GetTransformationTo(a1)), 0.));
102 CPPUNIT_ASSERT(Verify<CloseTo>(r->GetTransformationTo(a1).Distance(maa1*mra), 0.));
103 CPPUNIT_ASSERT(Verify<CloseTo>(a1->GetTransformationTo(r).Distance(mra.Inverse()*maa1.Inverse()), 0.));
104 CPPUNIT_ASSERT(Verify<CloseTo>(r->GetTransformationTo(a2a).Distance(ma2a2a*maa2*mra), 0.));
105 CPPUNIT_ASSERT(Verify<CloseTo>(a2a->GetTransformationTo(r).Distance(mra.Inverse()*maa2.Inverse()*ma2a2a.Inverse()), 0.));
106 CPPUNIT_ASSERT(Verify<CloseTo>(a2a->GetTransformationTo(a1).Distance(maa1*maa2.Inverse()*ma2a2a.Inverse()), 0.));
107 CPPUNIT_ASSERT(Verify<CloseTo>(a1->GetInverseTransformationTo(a2a).Distance(maa1*maa2.Inverse()*ma2a2a.Inverse()), 0.));
108 CPPUNIT_ASSERT(Verify<CloseTo>(a1->GetTransformationTo(a2a).Distance(ma2a2a*maa2*maa1.Inverse()), 0.));
110 CPPUNIT_ASSERT(Verify<CloseTo>(r->GetTransformationTo(
b).Distance(mrb), 0.));
111 CPPUNIT_ASSERT(Verify<CloseTo>(
b->GetTransformationTo(b1).Distance(mbb1), 0.));
112 CPPUNIT_ASSERT(Verify<CloseTo>(
b->GetTransformationTo(b2).Distance(mbb2), 0.));
114 CPPUNIT_ASSERT(Verify<CloseTo>(a1->GetTransformationTo(b2).Distance(mbb2*mrb*mra.Inverse()*maa1.Inverse()), 0.));
void TestCoordinateSystemConstructor()
TransformerConstructor< BaseCSPolicy > BaseCoordinateSystem
For base coordinate systems.
TransformerConstructor< DerivedCSPolicy > CoordinateSystem
The normal coordinate system type.
CPPUNIT_TEST_SUITE_REGISTRATION(testAiresShowerFile)
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
void TestTransformationChaining()
void TestNewCoordinateSystemBase()