Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
geom_algorithms_test_offset.cc File Reference
#include "geom_algorithms_test_common.h"
#include <cmath>
Include dependency graph for geom_algorithms_test_offset.cc:

Go to the source code of this file.

Functions

static Polygon make_square (Geom_Number cx, Geom_Number cy, Geom_Number half)
 
static Polygon make_triangle ()
 
static Polygon make_L_shape ()
 L-shaped polygon (non-convex, one reflex vertex).
 
static Polygon make_star ()
 Star-shaped polygon with 5 reflex vertices.
 
static Polygon make_pentagon ()
 Regular pentagon (convex).
 
static Polygon make_narrow_corridor ()
 Narrow horizontal corridor: width 1, length 10.
 
 TEST_F (GeomAlgorithmsTest, Offset_SquareOutward)
 
 TEST_F (GeomAlgorithmsTest, Offset_SquareInward)
 
 TEST_F (GeomAlgorithmsTest, Offset_TriangleOutward)
 
 TEST_F (GeomAlgorithmsTest, Offset_TriangleInward)
 
 TEST_F (GeomAlgorithmsTest, Offset_ZeroDistance)
 
 TEST_F (GeomAlgorithmsTest, Offset_ExcessiveInward)
 
 TEST_F (GeomAlgorithmsTest, Offset_LShapeOutward)
 
 TEST_F (GeomAlgorithmsTest, Offset_LShapeInward)
 
 TEST_F (GeomAlgorithmsTest, Offset_StarOutward)
 
 TEST_F (GeomAlgorithmsTest, Offset_OutwardIncreasesArea)
 
 TEST_F (GeomAlgorithmsTest, Offset_InwardDecreasesArea)
 
 TEST_F (GeomAlgorithmsTest, Offset_CCWPreserved)
 
 TEST_F (GeomAlgorithmsTest, Offset_MiterVsBevel)
 
 TEST_F (GeomAlgorithmsTest, Offset_BevelJoin)
 
 TEST_F (GeomAlgorithmsTest, Offset_MiterLimit)
 
 TEST_F (GeomAlgorithmsTest, Offset_NestedOffsets)
 
 TEST_F (GeomAlgorithmsTest, Offset_ConvexEquivalence)
 
 TEST_F (GeomAlgorithmsTest, Offset_SmallTriangle)
 
 TEST_F (GeomAlgorithmsTest, Offset_Pentagon)
 
 TEST_F (GeomAlgorithmsTest, Offset_NarrowCorridor)
 

Function Documentation

◆ make_L_shape()

static Polygon make_L_shape ( )
static

L-shaped polygon (non-convex, one reflex vertex).

(0,4)—(2,4) | | | (2,2)–(4,2) | | (0,0)---—(4,0)

Definition at line 65 of file geom_algorithms_test_offset.cc.

References Aleph::Polygon::add_vertex(), and Aleph::Polygon::close().

Referenced by TEST_F(), and TEST_F().

◆ make_narrow_corridor()

static Polygon make_narrow_corridor ( )
static

Narrow horizontal corridor: width 1, length 10.

Definition at line 113 of file geom_algorithms_test_offset.cc.

References Aleph::Polygon::add_vertex(), and Aleph::Polygon::close().

Referenced by TEST_F().

◆ make_pentagon()

static Polygon make_pentagon ( )
static

Regular pentagon (convex).

Definition at line 98 of file geom_algorithms_test_offset.cc.

References Aleph::Polygon::add_vertex(), Aleph::Polygon::close(), and Aleph::divide_and_conquer_partition_dp().

Referenced by TEST_F(), TEST_F(), and TEST_F().

◆ make_square()

◆ make_star()

static Polygon make_star ( )
static

Star-shaped polygon with 5 reflex vertices.

Definition at line 79 of file geom_algorithms_test_offset.cc.

References Aleph::Polygon::add_vertex(), Aleph::Polygon::close(), Aleph::divide_and_conquer_partition_dp(), and r.

Referenced by main(), and TEST_F().

◆ make_triangle()

static Polygon make_triangle ( )
static

◆ TEST_F() [1/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_BevelJoin   
)

◆ TEST_F() [2/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_CCWPreserved   
)

◆ TEST_F() [3/20]

◆ TEST_F() [4/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_ExcessiveInward   
)

◆ TEST_F() [5/20]

◆ TEST_F() [6/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_LShapeInward   
)

◆ TEST_F() [7/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_LShapeOutward   
)

◆ TEST_F() [8/20]

◆ TEST_F() [9/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_MiterVsBevel   
)

◆ TEST_F() [10/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_NarrowCorridor   
)

◆ TEST_F() [11/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_NestedOffsets   
)

◆ TEST_F() [12/20]

◆ TEST_F() [13/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_Pentagon   
)

◆ TEST_F() [14/20]

◆ TEST_F() [15/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_SquareInward   
)

◆ TEST_F() [16/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_SquareOutward   
)

◆ TEST_F() [17/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_StarOutward   
)

◆ TEST_F() [18/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_TriangleInward   
)

◆ TEST_F() [19/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_TriangleOutward   
)

◆ TEST_F() [20/20]

TEST_F ( GeomAlgorithmsTest  ,
Offset_ZeroDistance   
)