OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimPolyLine.h>
Public Member Functions | |
ossimPolyLine () | |
ossimPolyLine (const vector< ossimIpt > &polygon) | |
ossimPolyLine (const vector< ossimDpt > &polygon) | |
ossimPolyLine (int numVertices, const ossimDpt *vertex_array) | |
ossimPolyLine (const ossimPolyLine ©_this) | |
ossimPolyLine (const ossimPolygon &polygon) | |
ossimPolyLine (ossimDpt v1, ossimDpt v2, ossimDpt v3, ossimDpt v4) | |
ossimPolyLine (const ossimIrect &rect) | |
ossimPolyLine (const ossimDrect &rect) | |
~ossimPolyLine () | |
ossimDpt & | operator[] (int index) |
const ossimDpt & | operator[] (int index) const |
ossim_uint32 | getNumberOfVertices () const |
void | getIntegerBounds (ossim_int32 &minX, ossim_int32 &minY, ossim_int32 &maxX, ossim_int32 &maxY) const |
void | getBounds (double &minX, double &minY, double &maxX, double &maxY) const |
void | getBoundingRect (ossimDrect &rect) const |
ossimDrect | getBoundingRect () const |
void | roundToIntegerBounds (bool compress=true) |
void | clear () |
void | addPoint (const ossimDpt &pt) |
void | addPoint (double x, double y) |
void | addAttribute (const ossimString &attribute) |
ossimDpt | midPoint () const |
bool | hasNans () const |
ossim_uint32 | size () |
void | resize (ossim_uint32 newSize) |
const vector< ossimDpt > & | getVertexList () const |
vector< ossimDpt > & | getVertexList () |
vector< ossimString > & | getAttributeList () |
bool | clipToRect (vector< ossimPolyLine > &result, const ossimDrect &rect) const |
bool | isWithin (const ossimDrect &rect) const |
bool | pointWithin (const ossimDpt &point) const |
bool | isPointWithin (const ossimDpt &point) const |
bool | vertex (int index, ossimDpt &tbd_vertex) const |
bool | nextVertex (ossimDpt &tbd_vertex) const |
void | reverseOrder () |
const ossimPolyLine & | operator= (const ossimPolyLine ©_this) |
const ossimPolyLine & | operator= (const vector< ossimDpt > &vertexList) |
const ossimPolyLine & | operator= (const vector< ossimIpt > &vertexList) |
const ossimPolyLine & | operator= (const ossimIrect &rect) |
const ossimPolyLine & | operator= (const ossimPolygon &polygon) |
const ossimPolyLine & | operator= (const ossimDrect &rect) |
bool | operator== (const ossimPolyLine &compare_this) const |
bool | operator!= (const ossimPolyLine &compare_this) const |
const ossimPolyLine & | operator*= (const ossimDpt &scale) |
const ossimPolyLine & | operator*= (double scale) |
ossimPolyLine | operator* (const ossimDpt &scale) const |
ossimPolyLine | operator* (double scale) const |
void | print (ostream &os) const |
bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
Protected Attributes | |
vector< ossimDpt > | theVertexList |
vector< ossimString > | theAttributeList |
ossim_int32 | theCurrentVertex |
Friends | |
ostream & | operator<< (ostream &, const ossimPolyLine &) |
|
inline |
Definition at line 37 of file ossimPolyLine.h.
ossimPolyLine::ossimPolyLine | ( | const vector< ossimIpt > & | polygon | ) |
Definition at line 23 of file ossimPolyLine.cpp.
References theVertexList.
ossimPolyLine::ossimPolyLine | ( | const vector< ossimDpt > & | polygon | ) |
ossimPolyLine::ossimPolyLine | ( | int | numVertices, |
const ossimDpt * | vertex_array | ||
) |
ossimPolyLine::ossimPolyLine | ( | const ossimPolyLine & | copy_this | ) |
Definition at line 54 of file ossimPolyLine.cpp.
ossimPolyLine::ossimPolyLine | ( | const ossimPolygon & | polygon | ) |
Definition at line 93 of file ossimPolyLine.cpp.
References ossimPolygon::getNumberOfVertices(), n, and theVertexList.
CONSTRUCTOR: Provided for convenience. Does not imply the polygon is limited to four vertices:
Definition at line 60 of file ossimPolyLine.cpp.
References theVertexList.
ossimPolyLine::ossimPolyLine | ( | const ossimIrect & | rect | ) |
Definition at line 73 of file ossimPolyLine.cpp.
References ossimIrect::ll(), ossimIrect::lr(), theVertexList, ossimIrect::ul(), and ossimIrect::ur().
ossimPolyLine::ossimPolyLine | ( | const ossimDrect & | rect | ) |
Definition at line 83 of file ossimPolyLine.cpp.
References ossimDrect::ll(), ossimDrect::lr(), theVertexList, ossimDrect::ul(), and ossimDrect::ur().
ossimPolyLine::~ossimPolyLine | ( | ) |
Definition at line 118 of file ossimPolyLine.cpp.
|
inline |
Definition at line 115 of file ossimPolyLine.h.
Referenced by ossimVpfAnnotationFeatureInfo::readAttributes().
|
inline |
Definition at line 107 of file ossimPolyLine.h.
Referenced by clipToRect(), ossimGeoAnnotationMultiPolyLineObject::loadState(), and ossimVpfAnnotationFeatureInfo::readEdge().
|
inline |
Definition at line 111 of file ossimPolyLine.h.
|
inline |
Definition at line 103 of file ossimPolyLine.h.
Referenced by clipToRect(), ossimGeoAnnotationMultiPolyLineObject::loadState(), and ossimVpfAnnotationFeatureInfo::readEdge().
bool ossimPolyLine::clipToRect | ( | vector< ossimPolyLine > & | result, |
const ossimDrect & | rect | ||
) | const |
Definition at line 256 of file ossimPolyLine.cpp.
References addPoint(), clear(), ossimDrect::clip(), getNumberOfVertices(), ossimDrect::pointWithin(), and theVertexList.
Referenced by ossimAnnotationMultiPolyObject::getNewClippedObject(), and ossimAnnotationPolyObject::getNewClippedObject().
|
inline |
Definition at line 144 of file ossimPolyLine.h.
|
inline |
Definition at line 83 of file ossimPolyLine.h.
|
inline |
Definition at line 93 of file ossimPolyLine.h.
void ossimPolyLine::getBounds | ( | double & | minX, |
double & | minY, | ||
double & | maxX, | ||
double & | maxY | ||
) | const |
Definition at line 200 of file ossimPolyLine.cpp.
References max, min, ossim::nan(), theVertexList, x, and y.
void ossimPolyLine::getIntegerBounds | ( | ossim_int32 & | minX, |
ossim_int32 & | minY, | ||
ossim_int32 & | maxX, | ||
ossim_int32 & | maxY | ||
) | const |
Definition at line 164 of file ossimPolyLine.cpp.
References max, min, OSSIM_INT_NAN, theVertexList, x, and y.
|
inline |
Definition at line 70 of file ossimPolyLine.h.
Referenced by clipToRect(), ossimAnnotationMultiPolyLineObject::draw(), and ossimGeoAnnotationMultiPolyLineObject::saveState().
|
inline |
Definition at line 135 of file ossimPolyLine.h.
|
inline |
Definition at line 140 of file ossimPolyLine.h.
bool ossimPolyLine::hasNans | ( | ) | const |
will sequence through the polygon and check to see if any values are NAN
Definition at line 148 of file ossimPolyLine.cpp.
References theVertexList.
bool ossimPolyLine::isPointWithin | ( | const ossimDpt & | point | ) | const |
Definition at line 347 of file ossimPolyLine.cpp.
References ossimLine::isPointWithin(), and theVertexList.
bool ossimPolyLine::isWithin | ( | const ossimDrect & | rect | ) | const |
Will clip this poly line list to the past in rect and will return true if any part of this object is visible within the rectangle;
Definition at line 232 of file ossimPolyLine.cpp.
References ossimDrect::clip(), ossimDrect::pointWithin(), and theVertexList.
bool ossimPolyLine::loadState | ( | const ossimKeywordlist & | kwl, |
const char * | prefix = 0 |
||
) |
Definition at line 541 of file ossimPolyLine.cpp.
References ossimKeywordlist::find().
ossimDpt ossimPolyLine::midPoint | ( | ) | const |
bool ossimPolyLine::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 382 of file ossimPolyLine.cpp.
References theCurrentVertex, and theVertexList.
|
inline |
Definition at line 230 of file ossimPolyLine.h.
ossimPolyLine ossimPolyLine::operator* | ( | const ossimDpt & | scale | ) | const |
Definition at line 482 of file ossimPolyLine.cpp.
References theVertexList, ossimDpt::x, and ossimDpt::y.
|
inline |
Definition at line 206 of file ossimPolyLine.h.
const ossimPolyLine & ossimPolyLine::operator*= | ( | const ossimDpt & | scale | ) |
Definition at line 468 of file ossimPolyLine.cpp.
References theVertexList, ossimDpt::x, and ossimDpt::y.
|
inline |
Definition at line 200 of file ossimPolyLine.h.
const ossimPolyLine & ossimPolyLine::operator= | ( | const ossimPolyLine & | copy_this | ) |
OPERATORS: (Some are inlined at bottom)
Definition at line 419 of file ossimPolyLine.cpp.
References theAttributeList, theCurrentVertex, and theVertexList.
const ossimPolyLine & ossimPolyLine::operator= | ( | const vector< ossimDpt > & | vertexList | ) |
const ossimPolyLine & ossimPolyLine::operator= | ( | const vector< ossimIpt > & | vertexList | ) |
const ossimPolyLine& ossimPolyLine::operator= | ( | const ossimIrect & | rect | ) |
const ossimPolyLine & ossimPolyLine::operator= | ( | const ossimPolygon & | polygon | ) |
Definition at line 395 of file ossimPolyLine.cpp.
References ossimPolygon::getNumberOfVertices(), n, theCurrentVertex, and theVertexList.
const ossimPolyLine& ossimPolyLine::operator= | ( | const ossimDrect & | rect | ) |
bool ossimPolyLine::operator== | ( | const ossimPolyLine & | compare_this | ) | const |
|
inline |
Definition at line 61 of file ossimPolyLine.h.
|
inline |
Definition at line 65 of file ossimPolyLine.h.
|
inline |
METHOD: pointWithin(ossimDpt) Returns TRUE if point is inside polygon.
Definition at line 164 of file ossimPolyLine.h.
void ossimPolyLine::print | ( | ostream & | os | ) | const |
METHOD: print()
Definition at line 507 of file ossimPolyLine.cpp.
References theVertexList.
Referenced by operator<<().
|
inline |
Definition at line 131 of file ossimPolyLine.h.
void ossimPolyLine::reverseOrder | ( | ) |
void ossimPolyLine::roundToIntegerBounds | ( | bool | compress = true | ) |
Definition at line 122 of file ossimPolyLine.cpp.
References theCurrentVertex, and theVertexList.
bool ossimPolyLine::saveState | ( | ossimKeywordlist & | kwl, |
const char * | prefix = 0 |
||
) | const |
Definition at line 514 of file ossimPolyLine.cpp.
References ossimKeywordlist::add(), and ossimKeywordNames::TYPE_KW.
|
inline |
Definition at line 127 of file ossimPolyLine.h.
Referenced by ossimGeoAnnotationMultiPolyLineObject::loadState().
bool ossimPolyLine::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 368 of file ossimPolyLine.cpp.
References theCurrentVertex, and theVertexList.
|
friend |
Definition at line 235 of file ossimPolyLine.h.
|
protected |
Definition at line 225 of file ossimPolyLine.h.
Referenced by operator=().
|
mutableprotected |
Definition at line 227 of file ossimPolyLine.h.
Referenced by nextVertex(), operator=(), roundToIntegerBounds(), and vertex().
|
protected |
Definition at line 224 of file ossimPolyLine.h.
Referenced by clipToRect(), getBounds(), getIntegerBounds(), hasNans(), isPointWithin(), isWithin(), nextVertex(), operator*(), operator*=(), operator=(), operator==(), ossimPolyLine(), print(), reverseOrder(), roundToIntegerBounds(), and vertex().