OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimPolygon.h>
Public Types | |
typedef std::vector< ossimPolygon > | Vector |
Public Member Functions | |
ossimPolygon () | |
ossimPolygon (const vector< ossimIpt > &polygon) | |
ossimPolygon (const vector< ossimDpt > &polygon) | |
ossimPolygon (const vector< ossimGpt > &polygon) | |
ossimPolygon (int numVertices, const ossimDpt *vertex_array) | |
ossimPolygon (const ossimPolygon ©_this) | |
ossimPolygon (ossimDpt v1, ossimDpt v2, ossimDpt v3, ossimDpt v4) | |
CONSTRUCTOR: Provided for convenience. More... | |
ossimPolygon (const ossimIrect &rect) | |
ossimPolygon (const ossimDrect &rect) | |
~ossimPolygon () | |
ossimDpt & | operator[] (int index) |
const ossimDpt & | operator[] (int index) const |
ossim_uint32 | getVertexCount () const |
ossim_uint32 | getNumberOfVertices () const |
double | area () const |
Returns polygon area. Negative indicates CW ordering of vertices (in right-handed coordinates) More... | |
void | getIntegerBounds (ossim_int32 &minX, ossim_int32 &minY, ossim_int32 &maxX, ossim_int32 &maxY) const |
void | getFloatBounds (ossim_float64 &minX, ossim_float64 &minY, ossim_float64 &maxX, ossim_float64 &maxY) const |
void | getBoundingRect (ossimIrect &rect) const |
void | getBoundingRect (ossimDrect &rect) const |
void | getMinimumBoundingRect (ossimPolygon &minRect) const |
Initializes minRect with the minimum area rect (not-necessarily aligned with axes) that bounds this polygon. More... | |
void | roundToIntegerBounds (bool compress=false) |
void | clear () |
void | addPoint (const ossimDpt &pt) |
void | addPoint (double x, double y) |
ossimDpt | midPoint () const |
bool | hasNans () const |
will sequence through the polygon and check to see if any values are NAN More... | |
const vector< ossimDpt > & | getVertexList () const |
bool | clipToRect (vector< ossimPolygon > &result, const ossimDrect &rect) const |
Uses the ossimPolyArea2d class for the intersection. More... | |
bool | clipLineSegment (ossimDpt &p1, ossimDpt &p2) const |
METHOD: clipLineSegment(p1, p2) Implements Cyrus-Beck clipping algorithm as described in: http://www.daimi.au.dk/~mbl/cgcourse/wiki/cyrus-beck_line-clipping_.html Clips the line segment defined by thw two endpoints provided. More... | |
bool | pointWithin (const ossimDpt &point) const |
METHOD: pointWithin(ossimDpt) Returns TRUE if point is inside polygon. More... | |
bool | isPointWithin (const ossimDpt &point) const |
bool | isRectWithin (const ossimIrect &rect) const |
METHOD: isRectWithin() Returns true if all the corner points of the given rect fit within. More... | |
bool | rectIntersects (const ossimIrect &rect) const |
METHOD: rectIntersects() Returns true if at least one corner points of the given rect is within. More... | |
bool | isPolyWithin (const ossimPolygon &poly) const |
METHOD: isPolyWithin() Returns true if all the vertices of the given polygon fit within. More... | |
bool | vertex (int index, ossimDpt &tbd_vertex) const |
METHOD: vertex(index) Returns the ossimDpt vertex given the index. More... | |
bool | nextVertex (ossimDpt &tbd_vertex) const |
METHOD: nextVertex() Assigns the ossimDpt tbd_vertex following the current vertex. More... | |
void | reverseOrder () |
const ossimPolygon & | operator= (const ossimPolygon ©_this) |
OPERATORS: (Some are inlined at bottom) More... | |
const ossimPolygon & | operator= (const vector< ossimDpt > &vertexList) |
const ossimPolygon & | operator= (const vector< ossimGpt > &vertexList) |
const ossimPolygon & | operator= (const vector< ossimIpt > &vertexList) |
const ossimPolygon & | operator= (const ossimIrect &rect) |
const ossimPolygon & | operator= (const ossimDrect &rect) |
bool | operator== (const ossimPolygon &compare_this) const |
bool | operator!= (const ossimPolygon &compare_this) const |
const ossimPolygon & | operator*= (const ossimDpt &scale) |
const ossimPolygon & | operator*= (double scale) |
ossimPolygon | operator* (const ossimDpt &scale) const |
ossimPolygon | operator* (double scale) const |
void | resize (ossim_uint32 newSize) |
void | removeVertex (int vertex) |
METHOD: remove() Removes the vertex from the polygon. More... | |
void | print (ostream &os) const |
METHOD: print() More... | |
bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
ossimVertexOrdering | checkOrdering () const |
ossimVertexOrdering | getOrdering () const |
Protected Member Functions | |
void | getCentroid (ossimDpt ¢roid) const |
METHOD: getCentroid() Assigns the ossimDpt centroid the polygon. More... | |
bool | shrink (ossimPolygon &dest, double inset) const |
METHOD: shrink() Shrinks the current polygon by inset, return true if success. More... | |
void | removeSmallestContributingVertex () |
METHOD: removeSmallestContributingVertex() Removes the vertex that contributes the smallest area to the polygon. More... | |
void | intersectEdge (ossimDpt &result, const ossimLine &segment, const ossimDrect &rect, int edge) |
bool | isInsideEdge (const ossimDpt &pt, const ossimDrect &rect, int edge) const |
void | fitCircleInsideVertex (ossimDpt &destPt, unsigned int vertex, double radius) const |
Assigns destPt the point that fits a circle of given radius inside the polygon vertex. More... | |
Protected Attributes | |
ossimVertexOrdering | theOrderingType |
vector< ossimDpt > | theVertexList |
ossim_int32 | theCurrentVertex |
Friends | |
ostream & | operator<< (ostream &, const ossimPolygon &) |
Definition at line 38 of file ossimPolygon.h.
typedef std::vector<ossimPolygon> ossimPolygon::Vector |
Definition at line 41 of file ossimPolygon.h.
ossimPolygon::ossimPolygon | ( | ) |
Definition at line 35 of file ossimPolygon.cpp.
Referenced by shrink().
ossimPolygon::ossimPolygon | ( | const vector< ossimIpt > & | polygon | ) |
Definition at line 42 of file ossimPolygon.cpp.
References theVertexList.
ossimPolygon::ossimPolygon | ( | const vector< ossimDpt > & | polygon | ) |
Definition at line 69 of file ossimPolygon.cpp.
ossimPolygon::ossimPolygon | ( | const vector< ossimGpt > & | polygon | ) |
Definition at line 55 of file ossimPolygon.cpp.
References theVertexList.
ossimPolygon::ossimPolygon | ( | int | numVertices, |
const ossimDpt * | vertex_array | ||
) |
Definition at line 80 of file ossimPolygon.cpp.
References theVertexList.
ossimPolygon::ossimPolygon | ( | const ossimPolygon & | copy_this | ) |
Definition at line 93 of file ossimPolygon.cpp.
CONSTRUCTOR: Provided for convenience.
Does not imply the polygon is limited to four vertices:
Definition at line 106 of file ossimPolygon.cpp.
References theVertexList.
ossimPolygon::ossimPolygon | ( | const ossimIrect & | rect | ) |
Definition at line 121 of file ossimPolygon.cpp.
References ossimIrect::ll(), ossimIrect::lr(), theVertexList, ossimIrect::ul(), and ossimIrect::ur().
ossimPolygon::ossimPolygon | ( | const ossimDrect & | rect | ) |
Definition at line 132 of file ossimPolygon.cpp.
References ossimDrect::ll(), ossimDrect::lr(), theVertexList, ossimDrect::ul(), and ossimDrect::ur().
ossimPolygon::~ossimPolygon | ( | ) |
Definition at line 148 of file ossimPolygon.cpp.
void ossimPolygon::addPoint | ( | const ossimDpt & | pt | ) |
Definition at line 1134 of file ossimPolygon.cpp.
References OSSIM_VERTEX_ORDER_UNKNOWN, theOrderingType, and theVertexList.
Referenced by ossimAnnotationPolyObject::addPoint(), getMinimumBoundingRect(), ossimPolyArea2d::recurseCompleteGeometries(), removeSmallestContributingVertex(), ossimSensorModel::setGroundRect(), shrink(), and ossimGeoAnnotationMultiPolyObject::transform().
void ossimPolygon::addPoint | ( | double | x, |
double | y | ||
) |
Definition at line 1140 of file ossimPolygon.cpp.
References OSSIM_VERTEX_ORDER_UNKNOWN, theOrderingType, theVertexList, x, and y.
double ossimPolygon::area | ( | ) | const |
Returns polygon area. Negative indicates CW ordering of vertices (in right-handed coordinates)
Returns polygon area. Negative indicates CW ordering of vertices (in right-handed coordinates.
Definition at line 156 of file ossimPolygon.cpp.
References size, and theVertexList.
Referenced by checkOrdering(), getCentroid(), getMinimumBoundingRect(), ATP::AtpGenerator::layoutSearchTileRects(), and removeSmallestContributingVertex().
ossimVertexOrdering ossimPolygon::checkOrdering | ( | ) | const |
Definition at line 701 of file ossimPolygon.cpp.
References area(), OSSIM_CLOCKWISE_ORDER, OSSIM_COUNTERCLOCKWISE_ORDER, OSSIM_VERTEX_ORDER_UNKNOWN, and theOrderingType.
Referenced by clipLineSegment(), fitCircleInsideVertex(), getMinimumBoundingRect(), and ossimImageHandler::writeValidImageVertices().
void ossimPolygon::clear | ( | ) |
Definition at line 1128 of file ossimPolygon.cpp.
References OSSIM_VERTEX_ORDER_UNKNOWN, theOrderingType, and theVertexList.
Referenced by ossimImageGeometry::calculatePolyBounds(), getMinimumBoundingRect(), ossimImageViewProjectionTransform::getViewSegments(), ossimplugins::ossimRadarSat2RPCModel::loadState(), ossimplugins::ossimRadarSat2Model::loadState(), removeSmallestContributingVertex(), ossimSensorModel::setGroundRect(), shrink(), and ossimGeoAnnotationMultiPolyObject::transform().
METHOD: clipLineSegment(p1, p2) Implements Cyrus-Beck clipping algorithm as described in: http://www.daimi.au.dk/~mbl/cgcourse/wiki/cyrus-beck_line-clipping_.html Clips the line segment defined by thw two endpoints provided.
The endpoints are modified as needed to represent the clipped line. Returnes true if intersection present.
Definition at line 344 of file ossimPolygon.cpp.
References checkOrdering(), ossimLine::normal(), OSSIM_COUNTERCLOCKWISE_ORDER, theOrderingType, ossimLine::theP1, theVertexList, ossimDpt::x, and ossimDpt::y.
bool ossimPolygon::clipToRect | ( | vector< ossimPolygon > & | result, |
const ossimDrect & | rect | ||
) | const |
Uses the ossimPolyArea2d class for the intersection.
Definition at line 319 of file ossimPolygon.cpp.
References ossimPolyArea2d::getVisiblePolygons(), ossimDrect::ll(), ossimDrect::lr(), ossimDrect::ul(), and ossimDrect::ur().
Referenced by ossimImageGeometry::calculatePolyBounds(), ossimAnnotationMultiPolyObject::draw(), ossimAnnotationPolyObject::draw(), ossimAnnotationPolyObject::getNewClippedObject(), ossimImageViewProjectionTransform::getViewSegments(), and ossimAnnotationPolyObject::intersects().
|
protected |
Assigns destPt the point that fits a circle of given radius inside the polygon vertex.
METHOD: fitCircleInsideVertex() Assigns destPt the point that fits a circle of given radius inside the polygon vertex.
Warning: destPt is not guaranteed to be inside the polygon! (you may not be able to fit a circle of the given radius inside the polygon)
Definition at line 1222 of file ossimPolygon.cpp.
References checkOrdering(), getOrdering(), ossimDpt::length(), OSSIM_COUNTERCLOCKWISE_ORDER, theVertexList, vertex(), ossimDpt::x, and ossimDpt::y.
Referenced by shrink().
void ossimPolygon::getBoundingRect | ( | ossimIrect & | rect | ) | const |
Definition at line 1108 of file ossimPolygon.cpp.
References getIntegerBounds().
Referenced by ossimActiveEdgeTable::createTable(), and ATP::AtpGenerator::layoutSearchTileRects().
void ossimPolygon::getBoundingRect | ( | ossimDrect & | rect | ) | const |
Definition at line 1118 of file ossimPolygon.cpp.
References getFloatBounds().
|
protected |
METHOD: getCentroid() Assigns the ossimDpt centroid the polygon.
Warning: centroid is not guaranteed to be inside the polygon!
Definition at line 1194 of file ossimPolygon.cpp.
References area(), theVertexList, ossimDpt::x, and ossimDpt::y.
void ossimPolygon::getFloatBounds | ( | ossim_float64 & | minX, |
ossim_float64 & | minY, | ||
ossim_float64 & | maxX, | ||
ossim_float64 & | maxY | ||
) | const |
Definition at line 287 of file ossimPolygon.cpp.
References ossim::nan(), theVertexList, x, and y.
Referenced by getBoundingRect().
void ossimPolygon::getIntegerBounds | ( | ossim_int32 & | minX, |
ossim_int32 & | minY, | ||
ossim_int32 & | maxX, | ||
ossim_int32 & | maxY | ||
) | const |
Definition at line 251 of file ossimPolygon.cpp.
References max, min, OSSIM_INT_NAN, theVertexList, x, and y.
Referenced by ossimImageDataHelper::copyInputToThis(), ossimImageDataHelper::fill(), and getBoundingRect().
void ossimPolygon::getMinimumBoundingRect | ( | ossimPolygon & | minRect | ) | const |
Initializes minRect with the minimum area rect (not-necessarily aligned with axes) that bounds this polygon.
minRect | Polygon to initialize with the minimum rect. |
Definition at line 887 of file ossimPolygon.cpp.
References addPoint(), area(), checkOrdering(), clear(), DBL_EPSILON, getOrdering(), ossimDrect::ll(), ossimDrect::lr(), M_PI, OSSIM_COUNTERCLOCKWISE_ORDER, OSSIM_RIGHT_HANDED, reverseOrder(), theVertexList, ossimDrect::ul(), ossimDrect::ur(), vertex(), ossimDpt::x, x, ossimDpt::y, and y.
ossim_uint32 ossimPolygon::getNumberOfVertices | ( | ) | const |
Definition at line 1103 of file ossimPolygon.cpp.
References theVertexList.
Referenced by ossimAnnotationMultiPolyObject::draw(), ossimAnnotationPolyObject::draw(), getVertexCount(), isPolyWithin(), ATP::AtpGenerator::layoutSearchTileRects(), ossimPolyLine::operator=(), ossimPolyLine::ossimPolyLine(), removeSmallestContributingVertex(), removeVertex(), ossimApplanixUtmModel::worldToLineSample(), ossimSpectraboticsRedEdgeModel::worldToLineSample(), ossimApplanixEcefModel::worldToLineSample(), ossimH5GridModel::worldToLineSample(), and ossimSensorModel::worldToLineSample().
ossimVertexOrdering ossimPolygon::getOrdering | ( | ) | const |
Definition at line 1173 of file ossimPolygon.cpp.
References theOrderingType.
Referenced by fitCircleInsideVertex(), getMinimumBoundingRect(), and ossimImageHandler::writeValidImageVertices().
ossim_uint32 ossimPolygon::getVertexCount | ( | ) | const |
Definition at line 1098 of file ossimPolygon.cpp.
References getNumberOfVertices().
Referenced by ossimActiveEdgeTable::addPolygon(), ossimImageDataHelper::copyInputToThis(), ossimActiveEdgeTable::createTable(), ossimAnnotationPolyObject::draw(), ossimAnnotationMultiPolyObject::draw(), ossimImageDataHelper::fill(), ossimAnnotationPolyObject::intersects(), ossimGeoPolyCutter::invertPolygon(), ossimAnnotationPolyObject::print(), and ossimGeoPolyCutter::transformVertices().
const vector< ossimDpt > & ossimPolygon::getVertexList | ( | ) | const |
Definition at line 1146 of file ossimPolygon.cpp.
References theVertexList.
Referenced by ATP::AtpAnnotatedImage::annotateOverlap(), and OssimPolyArea2dPrivate::setGeometry().
bool ossimPolygon::hasNans | ( | ) | const |
will sequence through the polygon and check to see if any values are NAN
Definition at line 235 of file ossimPolygon.cpp.
References theVertexList.
Referenced by ossimApplanixUtmModel::worldToLineSample(), ossimSpectraboticsRedEdgeModel::worldToLineSample(), ossimApplanixEcefModel::worldToLineSample(), ossimH5GridModel::worldToLineSample(), and ossimSensorModel::worldToLineSample().
|
protected |
Definition at line 719 of file ossimPolygon.cpp.
|
protected |
Definition at line 756 of file ossimPolygon.cpp.
bool ossimPolygon::isPointWithin | ( | const ossimDpt & | point | ) | const |
Definition at line 476 of file ossimPolygon.cpp.
References theVertexList, ossimDpt::x, ossimDpt::y, and y.
Referenced by ossimPixelFlipper::clipTile(), ossimDilationFilter::doDilation(), ossimErosionFilter::doErosion(), isPolyWithin(), isRectWithin(), pointWithin(), and rectIntersects().
bool ossimPolygon::isPolyWithin | ( | const ossimPolygon & | poly | ) | const |
METHOD: isPolyWithin() Returns true if all the vertices of the given polygon fit within.
Definition at line 454 of file ossimPolygon.cpp.
References getNumberOfVertices(), and isPointWithin().
Referenced by shrink().
bool ossimPolygon::isRectWithin | ( | const ossimIrect & | rect | ) | const |
METHOD: isRectWithin() Returns true if all the corner points of the given rect fit within.
Definition at line 427 of file ossimPolygon.cpp.
References isPointWithin(), ossimIrect::ll(), ossimIrect::lr(), ossimIrect::ul(), and ossimIrect::ur().
Referenced by ATP::AtpGenerator::layoutSearchTileRects().
bool ossimPolygon::loadState | ( | const ossimKeywordlist & | kwl, |
const char * | prefix = 0 |
||
) |
Definition at line 852 of file ossimPolygon.cpp.
References ossimKeywordlist::find().
ossimDpt ossimPolygon::midPoint | ( | ) | const |
Definition at line 211 of file ossimPolygon.cpp.
References ossimDpt::makeNan(), theVertexList, ossimDpt::x, and ossimDpt::y.
bool ossimPolygon::nextVertex | ( | ossimDpt & | tbd_vertex | ) | const |
METHOD: nextVertex() Assigns the ossimDpt tbd_vertex following the current vertex.
The current vertex is initialized with a call to vertex(int), or after the last vertex is reached. Returns false if no vertex defined. Intended to be when cycling through all vertices.
Definition at line 537 of file ossimPolygon.cpp.
References theCurrentVertex, and theVertexList.
bool ossimPolygon::operator!= | ( | const ossimPolygon & | compare_this | ) | const |
Definition at line 1178 of file ossimPolygon.cpp.
ossimPolygon ossimPolygon::operator* | ( | const ossimDpt & | scale | ) | const |
Definition at line 658 of file ossimPolygon.cpp.
References theVertexList, ossimDpt::x, and ossimDpt::y.
ossimPolygon ossimPolygon::operator* | ( | double | scale | ) | const |
Definition at line 1161 of file ossimPolygon.cpp.
const ossimPolygon & ossimPolygon::operator*= | ( | const ossimDpt & | scale | ) |
Definition at line 645 of file ossimPolygon.cpp.
References theVertexList, ossimDpt::x, and ossimDpt::y.
const ossimPolygon & ossimPolygon::operator*= | ( | double | scale | ) |
Definition at line 1156 of file ossimPolygon.cpp.
const ossimPolygon & ossimPolygon::operator= | ( | const ossimPolygon & | copy_this | ) |
OPERATORS: (Some are inlined at bottom)
Definition at line 577 of file ossimPolygon.cpp.
References theCurrentVertex, theOrderingType, and theVertexList.
const ossimPolygon & ossimPolygon::operator= | ( | const vector< ossimDpt > & | vertexList | ) |
Definition at line 586 of file ossimPolygon.cpp.
References OSSIM_VERTEX_ORDER_UNKNOWN, theCurrentVertex, theOrderingType, and theVertexList.
const ossimPolygon & ossimPolygon::operator= | ( | const vector< ossimGpt > & | vertexList | ) |
Definition at line 611 of file ossimPolygon.cpp.
References OSSIM_VERTEX_ORDER_UNKNOWN, theCurrentVertex, theOrderingType, and theVertexList.
const ossimPolygon & ossimPolygon::operator= | ( | const vector< ossimIpt > & | vertexList | ) |
Definition at line 595 of file ossimPolygon.cpp.
References OSSIM_VERTEX_ORDER_UNKNOWN, theCurrentVertex, theOrderingType, and theVertexList.
const ossimPolygon & ossimPolygon::operator= | ( | const ossimIrect & | rect | ) |
Definition at line 553 of file ossimPolygon.cpp.
References ossimIrect::ll(), ossimIrect::lr(), theCurrentVertex, theVertexList, ossimIrect::ul(), and ossimIrect::ur().
const ossimPolygon & ossimPolygon::operator= | ( | const ossimDrect & | rect | ) |
Definition at line 565 of file ossimPolygon.cpp.
References ossimDrect::ll(), ossimDrect::lr(), theCurrentVertex, theVertexList, ossimDrect::ul(), and ossimDrect::ur().
bool ossimPolygon::operator== | ( | const ossimPolygon & | compare_this | ) | const |
ossimDpt & ossimPolygon::operator[] | ( | int | index | ) |
const ossimDpt & ossimPolygon::operator[] | ( | int | index | ) | const |
bool ossimPolygon::pointWithin | ( | const ossimDpt & | point | ) | const |
METHOD: pointWithin(ossimDpt) Returns TRUE if point is inside polygon.
Definition at line 1151 of file ossimPolygon.cpp.
References isPointWithin().
Referenced by ossimApplanixUtmModel::worldToLineSample(), ossimSpectraboticsRedEdgeModel::worldToLineSample(), ossimApplanixEcefModel::worldToLineSample(), ossimH5GridModel::worldToLineSample(), and ossimSensorModel::worldToLineSample().
void ossimPolygon::print | ( | ostream & | os | ) | const |
METHOD: print()
Definition at line 693 of file ossimPolygon.cpp.
References theVertexList.
Referenced by operator<<().
bool ossimPolygon::rectIntersects | ( | const ossimIrect & | rect | ) | const |
METHOD: rectIntersects() Returns true if at least one corner points of the given rect is within.
Definition at line 438 of file ossimPolygon.cpp.
References isPointWithin(), ossimIrect::ll(), ossimIrect::lr(), ossimIrect::ul(), and ossimIrect::ur().
|
protected |
METHOD: removeSmallestContributingVertex() Removes the vertex that contributes the smallest area to the polygon.
Definition at line 1052 of file ossimPolygon.cpp.
References addPoint(), area(), clear(), DBL_EPSILON, getNumberOfVertices(), removeVertex(), and theVertexList.
void ossimPolygon::removeVertex | ( | int | vertex | ) |
METHOD: remove() Removes the vertex from the polygon.
Definition at line 1031 of file ossimPolygon.cpp.
References getNumberOfVertices(), theVertexList, and vertex().
Referenced by ATP::AtpGenerator::layoutSearchTileRects(), and removeSmallestContributingVertex().
void ossimPolygon::resize | ( | ossim_uint32 | newSize | ) |
Definition at line 1166 of file ossimPolygon.cpp.
References OSSIM_VERTEX_ORDER_UNKNOWN, theCurrentVertex, theOrderingType, and theVertexList.
Referenced by ossimGeoPolyCutter::transformVertices(), ossimApplanixUtmModel::updateModel(), ossimSpectraboticsRedEdgeModel::updateModel(), ossimApplanixEcefModel::updateModel(), ossimIpodSensor::updateModel(), ossimSkyBoxLearSensor::updateModel(), and ossimSonomaSensor::updateModel().
void ossimPolygon::reverseOrder | ( | ) |
Definition at line 674 of file ossimPolygon.cpp.
References OSSIM_CLOCKWISE_ORDER, OSSIM_COUNTERCLOCKWISE_ORDER, theOrderingType, and theVertexList.
Referenced by getMinimumBoundingRect().
void ossimPolygon::roundToIntegerBounds | ( | bool | compress = false | ) |
Definition at line 175 of file ossimPolygon.cpp.
References theCurrentVertex, and theVertexList.
bool ossimPolygon::saveState | ( | ossimKeywordlist & | kwl, |
const char * | prefix = 0 |
||
) | const |
Definition at line 802 of file ossimPolygon.cpp.
References ossimKeywordlist::add(), and ossimKeywordNames::TYPE_KW.
|
protected |
METHOD: shrink() Shrinks the current polygon by inset, return true if success.
! Shrinks this polygon by radius.
Effectively, circles of given radius are placed inside ! the vertices just tangent to the polygon edges (via fitCircleInsideVertex()). The new ! polygon's vertices will be the center of these circles. Return true if success.
Definition at line 1286 of file ossimPolygon.cpp.
References addPoint(), clear(), fitCircleInsideVertex(), isPolyWithin(), ossimPolygon(), and theVertexList.
bool ossimPolygon::vertex | ( | int | index, |
ossimDpt & | tbd_vertex | ||
) | const |
METHOD: vertex(index) Returns the ossimDpt vertex given the index.
Returns false if no vertex defined.
Definition at line 514 of file ossimPolygon.cpp.
References theCurrentVertex, and theVertexList.
Referenced by fitCircleInsideVertex(), getMinimumBoundingRect(), ossimDrect::ossimDrect(), and removeVertex().
|
friend |
Definition at line 1183 of file ossimPolygon.cpp.
|
mutableprotected |
Definition at line 251 of file ossimPolygon.h.
Referenced by nextVertex(), operator=(), resize(), roundToIntegerBounds(), and vertex().
|
mutableprotected |
Definition at line 249 of file ossimPolygon.h.
Referenced by addPoint(), checkOrdering(), clear(), clipLineSegment(), getOrdering(), operator=(), resize(), and reverseOrder().
|
protected |
Definition at line 250 of file ossimPolygon.h.
Referenced by addPoint(), area(), clear(), clipLineSegment(), fitCircleInsideVertex(), getCentroid(), getFloatBounds(), getIntegerBounds(), getMinimumBoundingRect(), getNumberOfVertices(), getVertexList(), hasNans(), isPointWithin(), midPoint(), nextVertex(), operator*(), operator*=(), operator=(), operator==(), operator[](), ossimPolygon(), print(), removeSmallestContributingVertex(), removeVertex(), resize(), reverseOrder(), roundToIntegerBounds(), shrink(), and vertex().