Virtual Testbed
Ship dynamics simulator for extreme conditions
Public Types | Public Member Functions | Static Public Attributes | List of all members
vtb::geometry::Polyline< T, N > Class Template Reference

A polygon composed of line segments. More...

#include <polyline.hh>

Inheritance diagram for vtb::geometry::Polyline< T, N >:
[legend]
Collaboration diagram for vtb::geometry::Polyline< T, N >:
[legend]

Public Types

using scalar_type = T
 
using value_type = typename base_type::value_type
 
using pointer = typename base_type::pointer
 
using const_pointer = typename base_type::const_pointer
 
using reference = typename base_type::reference
 
using const_reference = typename base_type::const_reference
 
using iterator = typename base_type::iterator
 
using const_iterator = typename base_type::const_iterator
 
using size_type = typename base_type::size_type
 
using difference_type = typename base_type::difference_type
 
using reverse_iterator = typename base_type::reverse_iterator
 
using const_reverse_iterator = typename base_type::const_reverse_iterator
 

Public Member Functions

void gift_wrap ()
 Convex hull. More...
 
void remove_interior ()
 
void reorder ()
 
void stitch ()
 
void simplify ()
 
void gnuplot (std::ostream &out) const
 
Polygon< T, N > polygon () const
 
template<>
void reorder ()
 

Static Public Attributes

static constexpr const int dimensions = N
 

Detailed Description

template<class T, int N>
class vtb::geometry::Polyline< T, N >

A polygon composed of line segments.

Date
2019-04-08
Author
Ivan Gankevich

Definition at line 20 of file polyline.hh.

Member Function Documentation

◆ gift_wrap()

template<class T , int N>
void vtb::geometry::Polyline< T, N >::gift_wrap ( )

Convex hull.

Date
2019-04-15
Author
Ivan Gankevich
  • Uses gift wrapping algorithm [jarvis1973].
  • Convex hull contains only segments from a polyline.

Definition at line 76 of file polyline.cc.