DGtal  1.3.beta
testDigitalPlanePredicate.cpp
Go to the documentation of this file.
1 
30 #include <iostream>
32 #include "DGtal/base/Common.h"
33 #include "ConfigTest.h"
34 #include "DGtalCatch.h"
35 #include "DGtal/helpers/StdDefs.h"
36 #include "DGtal/geometry/surfaces/DigitalPlanePredicate.h"
38 
39 using namespace std;
40 using namespace DGtal;
41 
43 // Functions for testing class DigitalPlanePredicate.
45 
46 TEST_CASE("Testing DigitalPlanePredicate")
47 {
50  using Point = DigitalPlane::Point;
51 
52  Vector n(2, 6, 15);
53  DigitalPlane standardPlane(n, 0, n.norm1());
54 
55  SECTION("Testing operator() of DigitalPlanePredicate")
56  {
57  REQUIRE(standardPlane(Point(0, 0, 0)));
58  REQUIRE(standardPlane(Point(1, 0, 0)));
59  REQUIRE(standardPlane(Point(0, 1, 0)));
60  REQUIRE(standardPlane(Point(0, 0, 1)));
61  REQUIRE(! standardPlane(Point(1, 1, 1)));
62  }
63 }
64 
TEST_CASE
TEST_CASE("Testing DigitalPlanePredicate")
Definition: testDigitalPlanePredicate.cpp:46
REQUIRE
REQUIRE(domain.isInside(aPoint))
DGtal::DigitalPlanePredicate
Aim: Representing digital planes, which are digitizations of Euclidean planes, as point predicates.
Definition: DigitalPlanePredicate.h:72
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::DigitalPlanePredicate::Point
typename Space::Point Point
Definition: DigitalPlanePredicate.h:81
Vector
FreemanChain< int >::Vector Vector
Definition: testCombinDSS.cpp:60
DGtal::DigitalPlanePredicate::Vector
typename Space::Vector Vector
Definition: DigitalPlanePredicate.h:82
SECTION
SECTION("Testing constant forward iterators")
Definition: testSimpleRandomAccessRangeFromPoint.cpp:66
Point
MyPointD Point
Definition: testClone2.cpp:383