251 Volume_t A2({ 1., 6., 4.}, { 4., 2., 8. });
255 Volume_t A3({ 1., 2., 3.}, { 2., 2., 6. });
256 Volume_t A4({ 2., 3., 3.}, { 2., 2., 3. });
264 BOOST_TEST(A1.DeltaX() == 0.0);
265 BOOST_TEST(A2.DeltaX() == 3.0);
266 BOOST_TEST(A3.DeltaX() == 1.0);
267 BOOST_TEST(A4.DeltaX() == 0.0);
269 BOOST_TEST(!A1.isNullX());
270 BOOST_TEST(!A2.isNullX());
271 BOOST_TEST(!A3.isNullX());
272 BOOST_TEST(!A4.isNullX());
274 BOOST_TEST( A1.isEmptyX());
275 BOOST_TEST(!A2.isEmptyX());
276 BOOST_TEST(!A3.isEmptyX());
277 BOOST_TEST( A4.isEmptyX());
279 BOOST_TEST(A1.nonEmptyDims() == 0U);
280 BOOST_TEST(A2.nonEmptyDims() == 3U);
281 BOOST_TEST(A3.nonEmptyDims() == 2U);
282 BOOST_TEST(A4.nonEmptyDims() == 1U);
284 BOOST_TEST(!A1.isNull());
285 BOOST_TEST(!A2.isNull());
286 BOOST_TEST(!A3.isNull());
287 BOOST_TEST(!A4.isNull());
289 BOOST_TEST( A1.isEmpty());
290 BOOST_TEST(!A2.isEmpty());
291 BOOST_TEST(!A3.isEmpty());
292 BOOST_TEST(!A4.isEmpty());
294 BOOST_TEST(!A1.isLine());
295 BOOST_TEST(!A2.isLine());
296 BOOST_TEST(!A3.isLine());
297 BOOST_TEST( A4.isLine());
299 BOOST_TEST(A1.thinnestSize() == 0.0);
300 BOOST_TEST(A2.thinnestSize() == 3.0);
301 BOOST_TEST(A3.thinnestSize() == 0.0);
302 BOOST_TEST(A4.thinnestSize() == 0.0);
305 (A1.thinnestSide() == 0)
306 || (A1.thinnestSide() == 1)
307 || (A1.thinnestSide() == 2)
309 BOOST_TEST(A2.thinnestSide() == 0U);
310 BOOST_TEST(A3.thinnestSide() == 1U);
311 BOOST_TEST(((A4.thinnestSide() == 0) || (A4.thinnestSide() == 2)));
313 BOOST_TEST(A1.DeltaY() == 0.0);
314 BOOST_TEST(A2.DeltaY() == 4.0);
315 BOOST_TEST(A3.DeltaY() == 0.0);
316 BOOST_TEST(A4.DeltaY() == 1.0);
318 BOOST_TEST(!A1.isNullY());
319 BOOST_TEST(!A2.isNullY());
320 BOOST_TEST(!A3.isNullY());
321 BOOST_TEST(!A4.isNullY());
323 BOOST_TEST( A1.isEmptyY());
324 BOOST_TEST(!A2.isEmptyY());
325 BOOST_TEST( A3.isEmptyY());
326 BOOST_TEST(!A4.isEmptyY());
328 BOOST_TEST(!A1.isPlane());
329 BOOST_TEST(!A2.isPlane());
330 BOOST_TEST( A3.isPlane());
331 BOOST_TEST(!A4.isPlane());
333 BOOST_TEST(A1.DeltaZ() == 0.0);
334 BOOST_TEST(A2.DeltaZ() == 4.0);
335 BOOST_TEST(A3.DeltaZ() == 3.0);
336 BOOST_TEST(A4.DeltaZ() == 0.0);
338 BOOST_TEST(!A1.isNullZ());
339 BOOST_TEST(!A2.isNullZ());
340 BOOST_TEST(!A3.isNullZ());
341 BOOST_TEST(!A4.isNullZ());
343 BOOST_TEST( A1.isEmptyZ());
344 BOOST_TEST(!A2.isEmptyZ());
345 BOOST_TEST(!A3.isEmptyZ());
346 BOOST_TEST( A4.isEmptyZ());
348 BOOST_TEST(!A1.isVolume());
349 BOOST_TEST( A2.isVolume());
350 BOOST_TEST(!A3.isVolume());
351 BOOST_TEST(!A4.isVolume());
356 BOOST_TEST(A3 == Volume_t({ 1.0, 2.0, 3.0 }, { 2.0, 2.0, 6.0 }));
357 BOOST_TEST(A2 == Volume_t({ 1.0, 2.0, 4.0 }, { 4.0, 6.0, 8.0 }));
358 BOOST_TEST(A3 != A2);
360 BOOST_TEST(A3 == Volume_t({ 1.0, 2.0, 4.0 }, { 2.0, 2.0, 6.0 }));
362 A3.IncludePoint({ 1.5, 6.0, 4.0 });
363 BOOST_TEST(A3 == Volume_t({ 1.0, 2.0, 4.0 }, { 2.0, 6.0, 6.0 }));
364 A3.IncludePoint({ 4.0, 5.0, 8.0 });
365 BOOST_TEST(A3 == Volume_t({ 1.0, 2.0, 4.0 }, { 4.0, 6.0, 8.0 }));
366 BOOST_TEST(A3 == A2);
369 BOOST_TEST(A3 == Volume_t({ 1.0, 2.0, 4.0 }, { 4.0, 6.0, 8.0 }));
371 A3.IncludePoint({ 0.0, 4.0, 4.0 });
372 BOOST_TEST(A3 == Volume_t({ 0.0, 2.0, 4.0 }, { 4.0, 6.0, 8.0 }));
374 A3.Include(Volume_t({ 1.0, -1.0, 3.0 }, { 2.0, 7.0, 7.0 }));
375 BOOST_TEST(A3 == Volume_t({ 0.0, -1.0, 3.0 }, { 4.0, 7.0, 8.0 }));
377 A3.Include(Volume_t({ -1.0, 0.0, 2.0 }, { 3.0, 1.0, 6.0 }));
378 BOOST_TEST(A3 == Volume_t({ -1.0, -1.0, 2.0 }, { 4.0, 7.0, 8.0 }));
382 A3.Intersect(Volume_t({ 8.0, 9.0, 2.0 }, { 8.0, 9.0, 3.0 })),
383 Volume_t::NullIntersection
385 BOOST_TEST(A3.isNull());
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >> Point_t
Volume delimited by two points.
3D point (x, y, z) (by default, with double precision)