OOFEM 3.0
Loading...
Searching...
No Matches
oofem::Polygon Class Reference

#include <geotoolbox.h>

Classes

class  PolygonEdgeIterator
class  PolygonVertexIterator

Public Member Functions

 Polygon ()
void addVertex (Vertex v)
double computeVolume () const
int testPoint (double x, double y) const
double pointDistance (double x, double y) const
void clear ()
GraphicObj * draw (oofegGraphicContext &, bool filled, int layer=OOFEG_DEBUG_LAYER)

Private Attributes

std ::list< Vertexvertices

Detailed Description

Class representing 2D polygon. Polygon is represented as a sequence of vertices. THe services for adding vertices, computing volume, testing if point is inside polygon are provided. Also iterators over polygon vertices and edges are provided. This class is a part of geometry toolbox.

Definition at line 91 of file geotoolbox.h.

Constructor & Destructor Documentation

◆ Polygon()

Member Function Documentation

◆ addVertex()

◆ clear()

◆ computeVolume()

◆ draw()

◆ pointDistance()

double Polygon::pointDistance ( double x,
double y ) const

Definition at line 98 of file geotoolbox.C.

References oofem::Vertex::coords, oofem::min(), and testPoint().

◆ testPoint()

int Polygon::testPoint ( double x,
double y ) const

Definition at line 47 of file geotoolbox.C.

References oofem::Vertex::coords.

Referenced by oofem::LEPlic::giveMaterialMixtureAt(), and pointDistance().

Member Data Documentation

◆ vertices


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011