OpenStructure
Public Member Functions | Protected Member Functions | Protected Attributes
PolygonMask Class Reference

#include <polygon_mask.hh>

Inherits MaskBase, and Polygon2.

Public Member Functions

 PolygonMask ()
 
 PolygonMask (const Polygon2 &p)
 
virtual MaskPtr Clone ()
 
virtual bool IsInside (const Vec2 &v)
 
virtual void Shift (const Vec2 &v)
 
virtual void Expand (Real d)
 
virtual void Scale (Real d)
 
virtual void Apply (MaskVisitor &v)
 
void AddNode (const Vec2 &n)
 
void SetNode (unsigned int i, const Vec2 &v)
 
void Erase (circular_iterator first, circular_iterator last)
 
- Public Member Functions inherited from MaskBase
 MaskBase ()
 
virtual ~MaskBase ()
 
bool IsOutside (const Vec2 &v)
 
virtual void Shrink (Real d)
 

Protected Member Functions

std::vector< Realget_intercept_x_values_ (Real y)
 

Protected Attributes

bool intercepts_valid_
 
Real intercept_y_
 
std::vector< Realintercepts_
 
Rectangle2 bounding_box_
 

Detailed Description

See also
Create Split Image Example

Definition at line 37 of file polygon_mask.hh.

Constructor & Destructor Documentation

◆ PolygonMask() [1/2]

◆ PolygonMask() [2/2]

PolygonMask ( const Polygon2 &  p)

Member Function Documentation

◆ AddNode()

void AddNode ( const Vec2 &  n)

◆ Apply()

virtual void Apply ( MaskVisitor v)
virtual

Implements MaskBase.

◆ Clone()

virtual MaskPtr Clone ( )
virtual

Implements MaskBase.

◆ Erase()

void Erase ( circular_iterator  first,
circular_iterator  last 
)

◆ Expand()

virtual void Expand ( Real  d)
virtual

Implements MaskBase.

◆ get_intercept_x_values_()

std::vector<Real> get_intercept_x_values_ ( Real  y)
protected

◆ IsInside()

virtual bool IsInside ( const Vec2 &  v)
virtual

Implements MaskBase.

◆ Scale()

virtual void Scale ( Real  d)
virtual

Implements MaskBase.

◆ SetNode()

void SetNode ( unsigned int  i,
const Vec2 &  v 
)

◆ Shift()

virtual void Shift ( const Vec2 &  v)
virtual

Implements MaskBase.

Field Documentation

◆ bounding_box_

Rectangle2 bounding_box_
protected

Definition at line 61 of file polygon_mask.hh.

◆ intercept_y_

Real intercept_y_
protected

Definition at line 59 of file polygon_mask.hh.

◆ intercepts_

std::vector<Real> intercepts_
protected

Definition at line 60 of file polygon_mask.hh.

◆ intercepts_valid_

bool intercepts_valid_
protected

Definition at line 58 of file polygon_mask.hh.


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