DGtal 1.3.0
Loading...
Searching...
No Matches
testDigitalPlanePredicate.cpp
Go to the documentation of this file.
1
31#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
39using namespace std;
40using namespace DGtal;
41
43// Functions for testing class DigitalPlanePredicate.
45
46TEST_CASE("Testing DigitalPlanePredicate")
47{
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
Aim: Representing digital planes, which are digitizations of Euclidean planes, as point predicates.
DGtal is the top-level namespace which contains all DGtal functions and types.
STL namespace.
MyPointD Point
Definition: testClone2.cpp:383
FreemanChain< int >::Vector Vector
TEST_CASE("Testing DigitalPlanePredicate")
SECTION("Testing constant forward iterators")
REQUIRE(domain.isInside(aPoint))