DGtal  0.9.3
Typedefs | Functions | Variables
testConvexHull2DReverse.cpp File Reference
#include <iostream>
#include "DGtal/base/Common.h"
#include "ConfigTest.h"
#include "DGtalCatch.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/geometry/tools/Hull2DHelpers.h"
#include "DGtal/geometry/tools/MelkmanConvexHull.h"
#include "DGtal/geometry/tools/determinant/InHalfPlaneBySimple3x3Matrix.h"
Include dependency graph for testConvexHull2DReverse.cpp:

Go to the source code of this file.

Typedefs

typedef InHalfPlaneBySimple3x3Matrix< Point, double > Functor
 

Functions

ch add (Point(102.2, 50.2))
 
ch add (Point(101.0, 50.0))
 
ch add (Point(101.0, 49.1))
 
ch add (Point(101.2, 48.2))
 
ch add (Point(100.0, 48.2))
 
ch add (Point(100.4, 47.4))
 
ch reverse ()
 
ch add (Point(102.2, 51.0))
 
ch add (Point(102.3, 52.3))
 
ch add (Point(103.3, 52.3))
 
ch add (Point(103.2, 53.4))
 
ch add (Point(104.2, 53.2))
 
ch add (Point(104.0, 54.2))
 
 CAPTURE (thicknessHV)
 
 CAPTURE (thicknessE)
 
 SECTION ("Testing antipodal points of ConvexHull2D")
 
 CAPTURE (thicknessEb)
 
 SECTION ("Testing same antipodal points after hull reversing ")
 

Variables

DGtal::MelkmanConvexHull< Point, Functorch
 
Point pHV
 
Point qHV
 
Point sHV
 
Point pE
 
Point qE
 
Point sE
 
const double thicknessHV
 
const double thicknessE
 
const double thicknessEb
 

Detailed Description

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
Bertrand Kerautret (kerau.nosp@m.tre@.nosp@m.loria.nosp@m..fr ) LORIA (CNRS, UMR 7503), University of Nancy, France
Date
2015/11/07

Functions for testing class ConvexHull2D.

This file is part of the DGtal library.

Definition in file testConvexHull2DReverse.cpp.

Typedef Documentation

◆ Functor

Initial value:
{
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:141
MyPointD Point
Definition: testClone2.cpp:383
Examples:
dec/exampleDECSurface.cpp, geometry/tools/determinant/exampleInHalfPlane.cpp, geometry/tools/exampleAlphaShape.cpp, and geometry/tools/exampleConvexHull2D.cpp.

Definition at line 51 of file testConvexHull2DReverse.cpp.

Function Documentation

◆ add() [1/12]

ch add ( Point(102.2, 50.2)  )

◆ add() [2/12]

ch add ( Point(101.0, 50.0)  )

◆ add() [3/12]

ch add ( Point(101.0, 49.1)  )

◆ add() [4/12]

ch add ( Point(101.2, 48.2)  )

◆ add() [5/12]

ch add ( Point(100.0, 48.2)  )

◆ add() [6/12]

ch add ( Point(100.4, 47.4)  )

◆ add() [7/12]

ch add ( Point(102.2, 51.0)  )

◆ add() [8/12]

ch add ( Point(102.3, 52.3)  )

◆ add() [9/12]

ch add ( Point(103.3, 52.3)  )

◆ add() [10/12]

ch add ( Point(103.2, 53.4)  )

◆ add() [11/12]

ch add ( Point(104.2, 53.2)  )

◆ add() [12/12]

ch add ( Point(104.0, 54.2)  )

◆ CAPTURE() [1/3]

CAPTURE ( thicknessHV  )

◆ CAPTURE() [2/3]

CAPTURE ( thicknessE  )

◆ CAPTURE() [3/3]

CAPTURE ( thicknessEb  )

◆ reverse()

ch reverse ( )

◆ SECTION() [1/2]

SECTION ( "Testing antipodal points of ConvexHull2D"  )

Definition at line 86 of file testConvexHull2DReverse.cpp.

References REQUIRE(), and DGtal::MelkmanConvexHull< TPoint, TOrientationFunctor >::reverse().

87  {
88  REQUIRE( pHV == Point(101.2, 48.2) );
89  REQUIRE( qHV == Point(104.2, 53.2) );
90  REQUIRE( sHV == Point(102.3, 52.3) );
91  }
REQUIRE(domain.isInside(aPoint))
MyPointD Point
Definition: testClone2.cpp:383

◆ SECTION() [2/2]

SECTION ( "Testing same antipodal points after hull reversing "  )

Definition at line 106 of file testConvexHull2DReverse.cpp.

References REQUIRE().

107  {
108  REQUIRE( pE == Point(101.2, 48.2) );
109  REQUIRE( qE == Point(104.2, 53.2) );
110  REQUIRE( sE == Point(102.3, 52.3) );
111  }
REQUIRE(domain.isInside(aPoint))
MyPointD Point
Definition: testClone2.cpp:383

Variable Documentation

◆ ch

◆ pE

Point pE

Definition at line 73 of file testConvexHull2DReverse.cpp.

◆ pHV

Point pHV

Definition at line 73 of file testConvexHull2DReverse.cpp.

Referenced by testThicknessDefinitions().

◆ qE

Point qE

Definition at line 73 of file testConvexHull2DReverse.cpp.

◆ qHV

Point qHV

Definition at line 73 of file testConvexHull2DReverse.cpp.

Referenced by testThicknessDefinitions().

◆ sE

Point sE

Definition at line 73 of file testConvexHull2DReverse.cpp.

◆ sHV

Point sHV

Definition at line 73 of file testConvexHull2DReverse.cpp.

Referenced by testThicknessDefinitions().

◆ thicknessE

const double thicknessE
Initial value:
pE, qE, sE)
double computeHullThickness(const ForwardIterator &itb, const ForwardIterator &ite, const ThicknessDefinition &def)
Procedure to compute the convex hull thickness given from different definitions (Horizontal/vertical ...
DGtal::MelkmanConvexHull< Point, Functor > ch

Definition at line 79 of file testConvexHull2DReverse.cpp.

Referenced by testConvexHullCompThickness().

◆ thicknessEb

const double thicknessEb
Initial value:
pE, qE, sE)
double computeHullThickness(const ForwardIterator &itb, const ForwardIterator &ite, const ThicknessDefinition &def)
Procedure to compute the convex hull thickness given from different definitions (Horizontal/vertical ...
DGtal::MelkmanConvexHull< Point, Functor > ch

Definition at line 100 of file testConvexHull2DReverse.cpp.

◆ thicknessHV

const double thicknessHV
Initial value:
pHV, qHV, sHV)
double computeHullThickness(const ForwardIterator &itb, const ForwardIterator &ite, const ThicknessDefinition &def)
Procedure to compute the convex hull thickness given from different definitions (Horizontal/vertical ...
DGtal::MelkmanConvexHull< Point, Functor > ch

Definition at line 75 of file testConvexHull2DReverse.cpp.

Referenced by testConvexHullCompThickness().