OpenStructure
Public Types | Public Member Functions
Polygon2 Class Reference

#include <composite2.hh>

Inherits vector< Vec2 >.

Public Types

typedef const_circular_iter< Polygon2const_circular_iterator
 
typedef circular_iter< Polygon2circular_iterator
 

Public Member Functions

 Polygon2 ()
 
 Polygon2 (const Polygon2 &p)
 
 Polygon2 (const std::vector< Vec2 > &v)
 
circular_iterator cbegin ()
 
circular_iterator cend ()
 
const_circular_iterator cbegin () const
 
const_circular_iterator cend () const
 
void AddNode (const Vec2 &n)
 
unsigned int GetNodeCount () const
 
Vec2 GetNode (unsigned int i) const
 
void SetNode (unsigned int i, const Vec2 &v)
 
circular_iterator FindSegment (std::vector< Vec2 >::const_iterator start, std::vector< Vec2 >::const_iterator end)
 
circular_iterator FindNode (const Vec2 &v)
 
void Erase (circular_iterator first, circular_iterator last)
 
Polygon2 operator+ (const Vec2 &v) const
 
Polygon2 operator* (Real d) const
 
Real GetArea () const
 
Vec2 GetCentroid () const
 
void Expand (Real val)
 
Rectangle2 GetBoundingBox () const
 

Detailed Description

Polygon2

See also
Create Split Image Example

Definition at line 65 of file composite2.hh.

Member Typedef Documentation

◆ circular_iterator

Definition at line 69 of file composite2.hh.

◆ const_circular_iterator

Definition at line 68 of file composite2.hh.

Constructor & Destructor Documentation

◆ Polygon2() [1/3]

Polygon2 ( )

◆ Polygon2() [2/3]

Polygon2 ( const Polygon2 p)

◆ Polygon2() [3/3]

Polygon2 ( const std::vector< Vec2 > &  v)

Member Function Documentation

◆ AddNode()

void AddNode ( const Vec2 n)
inline

Definition at line 78 of file composite2.hh.

◆ cbegin() [1/2]

circular_iterator cbegin ( )
inline

Definition at line 74 of file composite2.hh.

◆ cbegin() [2/2]

const_circular_iterator cbegin ( ) const
inline

Definition at line 76 of file composite2.hh.

◆ cend() [1/2]

circular_iterator cend ( )
inline

Definition at line 75 of file composite2.hh.

◆ cend() [2/2]

const_circular_iterator cend ( ) const
inline

Definition at line 77 of file composite2.hh.

◆ Erase()

void Erase ( circular_iterator  first,
circular_iterator  last 
)

◆ Expand()

void Expand ( Real  val)

◆ FindNode()

circular_iterator FindNode ( const Vec2 v)
inline

Definition at line 83 of file composite2.hh.

◆ FindSegment()

circular_iterator FindSegment ( std::vector< Vec2 >::const_iterator  start,
std::vector< Vec2 >::const_iterator  end 
)

◆ GetArea()

Real GetArea ( ) const

◆ GetBoundingBox()

Rectangle2 GetBoundingBox ( ) const

◆ GetCentroid()

Vec2 GetCentroid ( ) const

◆ GetNode()

Vec2 GetNode ( unsigned int  i) const
inline

Definition at line 80 of file composite2.hh.

◆ GetNodeCount()

unsigned int GetNodeCount ( ) const
inline

Definition at line 79 of file composite2.hh.

◆ operator*()

Polygon2 operator* ( Real  d) const

◆ operator+()

Polygon2 operator+ ( const Vec2 v) const

◆ SetNode()

void SetNode ( unsigned int  i,
const Vec2 v 
)

The documentation for this class was generated from the following file: