Digital Image Correlation Engine  Version 1.0
A modular, high-performance, image correlation tool used to compute full-field displacements and strains from digital images
Public Member Functions | Private Attributes | List of all members
DICe::Polygon Class Reference

A straight sided DICe::Shape made of an arbitrary number of sides. More...

#include <DICe_Shape.h>

Inheritance diagram for DICe::Polygon:
DICe::Shape

Public Member Functions

 Polygon (std::vector< int_t > &coords_x, std::vector< int_t > &coords_y)
 Constructor that takes the vertices as arguements. More...
 
virtual std::set< std::pair< int_t, int_t > > get_owned_pixels (Teuchos::RCP< Local_Shape_Function > shape_function=Teuchos::null, const int_t cx=0, const int_t cy=0, const scalar_t skin_factor=1.0) const
 See base class documentation.
 
virtual void deactivate_pixels (const int_t size, bool *pixel_flags, int_t *x_coords, int_t *y_coords) const
 See base class documentation.
 
std::vector< int_t > * vertex_coordinates_x ()
 return a pointer to the polygon x vertices
 
std::vector< int_t > * vertex_coordinates_y ()
 return a pointer to the polygon x vertices
 
int_t num_vertices () const
 return the number of vertices
 
int_t min_x () const
 return the min x vertex
 
int_t max_x () const
 return the max x vertex
 
int_t min_y () const
 return the min y vertex
 
int_t max_y () const
 return the max y vertex
 

Private Attributes

std::vector< int_tvertex_coordinates_x_
 vector storing the integer vertex global x-coordinates
 
std::vector< int_tvertex_coordinates_y_
 vector storing the integer vertex global y-coordinates
 
int_t num_vertices_
 Number of vertices.
 
int_t min_x_
 Minimum x global coordinate of all the vertices.
 
int_t max_x_
 Maximum x global coordinate of all the vertices.
 
int_t min_y_
 Minimum y global coordinate of all the vertices.
 
int_t max_y_
 Maximum y global coordinate of all the vertices.
 

Detailed Description

A straight sided DICe::Shape made of an arbitrary number of sides.

NOTE: Coordinates are always in image coordinates, i.e. (0,0) is the upper left corner, x+ points to the right, y+ points down

NOTE: Vertices must be listed in order as the boundary of the polygon is traversed (clockwise or couterclockwise), otherwise the polygon will have folds.

Constructor & Destructor Documentation

◆ Polygon()

DICe::Polygon::Polygon ( std::vector< int_t > &  coords_x,
std::vector< int_t > &  coords_y 
)

Constructor that takes the vertices as arguements.

Parameters
coords_xA vector of integer valued global x-coordinates for the polygon vertices
coords_yA vector of integer valued global y-coordinates for the polygon vertices