Acoustic FDTD Solver
Public Member Functions | Public Attributes | Private Attributes | List of all members
Polygon Class Reference

#include <Polygon.hpp>

Inheritance diagram for Polygon:
Shape

Public Member Functions

 Polygon ()
 Polygon (double coord[][2], unsigned int m)
 Assume that the first point is connected with the last point to complete the polygon.
 Polygon (const Polygon &poly)
 Copy constructor.
Polygonoperator= (const Polygon &poly)
 Overload the assignment operator.
virtual CartPosition getUpper () const
 Get the [max(y) max(z)] corner of the rectangle.
virtual CartPosition getLower () const
 Get the [min(y) min(z)] corner of the rectangle.
virtual double getXLength () const
virtual double getYLength () const
virtual double getZLength () const
virtual double getLargestLength () const
virtual unsigned getType () const
virtual Shapeclone () const
std::vector< std::vector
< unsigned > > 
getCoordinateIndex (const Grid &grid) const
bool insert (double a[2])
 ~Polygon ()
- Public Member Functions inherited from Shape
virtual ~Shape ()
 The destructor cannot be pure virtual.

Public Attributes

CartPosition lower
 bounding box
CartPosition upper
 bounding box

Private Attributes

double ** vertex
unsigned int nPoints
 number of unique points

Constructor & Destructor Documentation

Polygon::Polygon ( )
Polygon::Polygon ( double  coord[][2],
unsigned int  m 
)

Assume that the first point is connected with the last point to complete the polygon.

Polygon::Polygon ( const Polygon poly)

Copy constructor.

Polygon::~Polygon ( )

Member Function Documentation

Shape * Polygon::clone ( ) const
virtual

Implements Shape.

std::vector< std::vector< unsigned > > Polygon::getCoordinateIndex ( const Grid grid) const
virtual

Implements Shape.

double Polygon::getLargestLength ( ) const
virtual

Implements Shape.

CartPosition Polygon::getLower ( ) const
virtual

Get the [min(y) min(z)] corner of the rectangle.

Returns
the cartesian coordinate the conner.

Implements Shape.

unsigned Polygon::getType ( ) const
virtual

Implements Shape.

CartPosition Polygon::getUpper ( ) const
virtual

Get the [max(y) max(z)] corner of the rectangle.

Returns
the cartesian coordinate the conner.

Implements Shape.

double Polygon::getXLength ( ) const
virtual

Implements Shape.

double Polygon::getYLength ( ) const
virtual

Implements Shape.

double Polygon::getZLength ( ) const
virtual

Implements Shape.

bool Polygon::insert ( double  a[2])
Polygon & Polygon::operator= ( const Polygon poly)

Overload the assignment operator.

Member Data Documentation

CartPosition Polygon::lower

bounding box

unsigned int Polygon::nPoints
private

number of unique points

CartPosition Polygon::upper

bounding box

double** Polygon::vertex
private

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