34 TS_ASSERT_DELTA(pt.
x, 0, DBL_EPSILON);
35 TS_ASSERT_DELTA(pt.
y, 0, DBL_EPSILON);
36 TS_ASSERT_DELTA(pt.
z, 0, DBL_EPSILON);
40 TS_ASSERT_DELTA(pt.
x, 1, DBL_EPSILON);
41 TS_ASSERT_DELTA(pt.
y, 2, DBL_EPSILON);
42 TS_ASSERT_DELTA(pt.
z, 3, DBL_EPSILON);
46 TS_ASSERT_DELTA(pt.
x, 4, DBL_EPSILON);
47 TS_ASSERT_DELTA(pt.
y, 4, DBL_EPSILON);
48 TS_ASSERT_DELTA(pt.
z, 4, DBL_EPSILON);
53 TS_ASSERT_DELTA(pt.
x, 1, DBL_EPSILON);
54 TS_ASSERT_DELTA(pt.
y, 2, DBL_EPSILON);
55 TS_ASSERT_DELTA(pt.
z, 0, DBL_EPSILON);
60 TS_ASSERT_DELTA(pt.
x, 1, DBL_EPSILON);
61 TS_ASSERT_DELTA(pt.
y, 2, DBL_EPSILON);
62 TS_ASSERT_DELTA(pt.
z, 3, DBL_EPSILON);
67 TS_ASSERT_DELTA(pt.
x, 1, DBL_EPSILON);
68 TS_ASSERT_DELTA(pt.
y, 2, DBL_EPSILON);
69 TS_ASSERT_DELTA(pt.
z, 3, DBL_EPSILON);
88 TS_ASSERT_DELTA(pt2.
x, 1, DBL_EPSILON);
89 TS_ASSERT_DELTA(pt2.
y, 2, DBL_EPSILON);
112 TS_ASSERT(pt1 == pt2);
117 TS_ASSERT(pt1 == pt2);
122 TS_ASSERT(pt1 == pt2);
133 TS_ASSERT(pt1 != pt2);
138 TS_ASSERT(pt1 != pt2);
143 TS_ASSERT(pt1 != pt2);
157 TS_ASSERT_EQUALS(pt <
xms::Pt3d(1, 2, 3),
false);
161 TS_ASSERT_EQUALS(pt <
xms::Pt4d(1, 2, 3, 4),
true);
223 TS_ASSERT_EQUALS(pt2,
xms::Pt4f(-1, 2, -3, 4));
272 TS_ASSERT_DELTA(pt.
x, 0, DBL_EPSILON);
273 TS_ASSERT_DELTA(pt.
y, 1, DBL_EPSILON);
274 TS_ASSERT_DELTA(pt.
z, 2, DBL_EPSILON);
280 TS_ASSERT_DELTA(pt[0], 1, DBL_EPSILON);
281 TS_ASSERT_DELTA(pt[1], 2, DBL_EPSILON);
282 TS_ASSERT_DELTA(pt[2], 3, DBL_EPSILON);
291 TS_ASSERT_DELTA(pt[0], 3, DBL_EPSILON);
292 TS_ASSERT_DELTA(pt[1], 2, DBL_EPSILON);
293 TS_ASSERT_DELTA(pt[2], 1, DBL_EPSILON);
299 TS_ASSERT_DELTA(pt.
at(0), 1, DBL_EPSILON);
300 TS_ASSERT_DELTA(pt.
at(1), 2, DBL_EPSILON);
301 TS_ASSERT_DELTA(pt.
at(2), 3, DBL_EPSILON);
335 std::stringstream sstrm;
338 TS_ASSERT_EQUALS(sstrm.str(),
"1,2");
341 std::stringstream sstrm;
344 TS_ASSERT_EQUALS(sstrm.str(),
"1.5,2.5");
347 std::stringstream sstrm;
350 TS_ASSERT_EQUALS(sstrm.str(),
"1.5,2.5");
353 std::stringstream sstrm;
356 TS_ASSERT_EQUALS(sstrm.str(),
"1,2");
361 std::stringstream sstrm;
364 TS_ASSERT_EQUALS(sstrm.str(),
"1,2,3");
367 std::stringstream sstrm;
368 Pt3f pt(1.5, 2.5, 3.5);
370 TS_ASSERT_EQUALS(sstrm.str(),
"1.5,2.5,3.5");
373 std::stringstream sstrm;
374 Pt3d pt(1.5, 2.5, 3.5);
376 TS_ASSERT_EQUALS(sstrm.str(),
"1.5,2.5,3.5");
379 std::stringstream sstrm;
382 TS_ASSERT_EQUALS(sstrm.str(),
"1,2,3");
387 std::stringstream sstrm;
390 TS_ASSERT_EQUALS(sstrm.str(),
"1,2,3,4");
393 std::stringstream sstrm;
394 Pt4f pt(1.5, 2.5, 3.5, 4.5);
396 TS_ASSERT_EQUALS(sstrm.str(),
"1.5,2.5,3.5,4.5");
399 std::stringstream sstrm;
400 Pt4d pt(1.5, 2.5, 3.5, 4.5);
402 TS_ASSERT_EQUALS(sstrm.str(),
"1.5,2.5,3.5,4.5");
405 std::stringstream sstrm;
408 TS_ASSERT_EQUALS(sstrm.str(),
"1,2,3,4");
415 std::stringstream sstrm;
419 TS_ASSERT_EQUALS(pt,
Pt2i(1, 2));
422 std::stringstream sstrm;
426 TS_ASSERT_EQUALS(pt,
Pt2f(1.5, 2.5));
429 std::stringstream sstrm;
433 TS_ASSERT_EQUALS(pt,
Pt2d(1.5, 2.5));
436 std::stringstream sstrm;
440 TS_ASSERT_EQUALS(pt,
Pt2<char>(
'1',
'2'));
445 std::stringstream sstrm;
449 TS_ASSERT_EQUALS(pt,
Pt3i(1, 2, 3));
452 std::stringstream sstrm;
453 sstrm <<
"1.5,2.5,3.5";
456 TS_ASSERT_EQUALS(pt,
Pt3f(1.5, 2.5, 3.5));
459 std::stringstream sstrm;
460 sstrm <<
"1.5,2.5,3.5";
463 TS_ASSERT_EQUALS(pt,
Pt3d(1.5, 2.5, 3.5));
466 std::stringstream sstrm;
470 TS_ASSERT_EQUALS(pt,
Pt3<char>(
'1',
'2',
'3'));
475 std::stringstream sstrm;
479 TS_ASSERT_EQUALS(pt,
Pt4i(1, 2, 3, 4));
482 std::stringstream sstrm;
483 sstrm <<
"1.5,2.5,3.5,4.5";
486 TS_ASSERT_EQUALS(pt,
Pt4f(1.5, 2.5, 3.5, 4.5));
489 std::stringstream sstrm;
490 sstrm <<
"1.5,2.5,3.5,4.5";
493 TS_ASSERT_EQUALS(pt,
Pt4d(1.5, 2.5, 3.5, 4.5));
496 std::stringstream sstrm;
500 TS_ASSERT_EQUALS(pt,
Pt4<char>(
'1',
'2',
'3',
'4'));
const T & at(unsigned int a) const
void testStreams()
tests for point streams
void Set(T a_x, T a_y, T a_z)
std::vector< Pt3f > VecPt3f
short rename
Vector types for convenience.
void testIt()
tests for points
std::vector< Pt2f > VecPt2f
short rename
std::vector< Pt4d > VecPt4d
short rename
std::vector< Pt3d > VecPt3d
short rename