10 #include <utl/CoordinateSystem.h>
11 #include <utl/Point.h>
12 #include <utl/Vector.h>
13 #include <utl/TransformationMatrix.h>
14 #include <utl/AugerUnits.h>
16 #include <tst/Verify.h>
17 #include <utl/Triple.h>
19 #include <cppunit/extensions/HelperMacros.h>
31 CPPUNIT_TEST(testPointTransformation);
32 CPPUNIT_TEST_SUITE_END();
48 p.TransformTo(CTrans);
50 CPPUNIT_ASSERT(Verify<CloseTo>(
51 p.GetCoordinates(CTrans),
Triple(-1,0,0)));
53 CPPUNIT_ASSERT(Verify<CloseTo>(
54 p.GetCoordinates(CS),
Triple(0,0,0)));
57 const Point horizontal(1,0,0, CS);
59 horizontal.TransformTo(CRot);
60 CPPUNIT_ASSERT(horizontal.GetCoordinateSystem() == CRot);
61 CPPUNIT_ASSERT(Verify<CloseTo>(
62 horizontal.GetCoordinates(CRot),
Triple(0,-1,0)));
63 CPPUNIT_ASSERT(horizontal.GetCoordinateSystem() == CRot);
64 CPPUNIT_ASSERT(Verify<CloseTo>(
65 horizontal.GetCoordinates(CS),
Triple(1,0,0)));
66 CPPUNIT_ASSERT(horizontal.GetCoordinateSystem() == CS);
CoordinateSystemPtr GetCoordinateSystem() const
Get the coordinate system of the current internal representation.
void testPointTransformation()
CPPUNIT_TEST_SUITE_REGISTRATION(testAiresShowerFile)
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
boost::tuple< double, double, double > Triple
Coordinate triple for easy getting or setting of coordinates.