SAGA API
v9.6
|
#include <shapes.h>
Public Member Functions | |
bool | is_Clockwise (void) |
double | Get_Perimeter (void) |
double | Get_Area (void) |
const TSG_Point & | Get_Centroid (void) |
TSG_Polygon_Point_Relation | Get_Point_Relation (const CSG_Point &p) |
TSG_Polygon_Point_Relation | Get_Point_Relation (double x, double y) |
bool | is_OnEdge (const CSG_Point &p) |
bool | is_OnEdge (double x, double y) |
bool | Contains (const CSG_Point &p) |
bool | Contains (double x, double y) |
bool | is_Neighbour (CSG_Shape_Polygon_Part *pPart, bool bSimpleCheck=true) |
CSG_Lines | Get_Shared_Edges (CSG_Shape_Polygon_Part *pPart, bool bVertexCheck, double Epsilon=0.) |
double | Get_Shared_Length (CSG_Shape_Polygon_Part *pPart, bool bVertexCheck, double Epsilon=0.) |
double | Get_Distance (TSG_Point Point, TSG_Point &Next) |
Public Member Functions inherited from CSG_Shape_Part | |
class CSG_Shape_Points * | Get_Owner (void) |
virtual bool | Destroy (void) |
virtual bool | Assign (CSG_Shape_Part *pPart) |
const CSG_Rect & | Get_Extent (void) |
int | Get_Count (void) const |
TSG_Point | Get_Point (int iPoint, bool bAscending=true) const |
int | Add_Point (double x, double y) |
int | Add_Point (const CSG_Point &p) |
int | Add_Point (const CSG_Point_3D &p) |
int | Add_Point (const CSG_Point_4D &p) |
int | Ins_Point (double x, double y, int iPoint) |
int | Ins_Point (const CSG_Point &p, int iPoint) |
int | Ins_Point (const CSG_Point_3D &p, int iPoint) |
int | Ins_Point (const CSG_Point_4D &p, int iPoint) |
int | Set_Point (double x, double y, int iPoint) |
int | Set_Point (const CSG_Point &p, int iPoint) |
int | Set_Point (const CSG_Point_3D &p, int iPoint) |
int | Set_Point (const CSG_Point_4D &p, int iPoint) |
int | Del_Point (int iPoint) |
void | Set_Z (double z, int iPoint) |
double | Get_Z (int iPoint, bool bAscending=true) const |
double | Get_ZMin (void) |
double | Get_ZMax (void) |
TSG_Point_3D | Get_Point_Z (int iPoint, bool bAscending=true) const |
void | Set_M (double m, int iPoint) |
double | Get_M (int iPoint, bool bAscending=true) const |
double | Get_MMin (void) |
double | Get_MMax (void) |
TSG_Point_4D | Get_Point_ZM (int iPoint, bool bAscending=true) const |
bool | Add_Points (CSG_Shape_Part *pPoints, bool bAscending=true) |
bool | Revert_Points (void) |
Protected Member Functions | |
CSG_Shape_Polygon_Part (class CSG_Shape_Points *pOwner) | |
virtual | ~CSG_Shape_Polygon_Part (void) |
virtual void | _Invalidate (void) |
void | _Update_Area (void) |
void | _Add_Edge_Points (CSG_Shape_Polygon_Part *pPart, const CSG_Point &P0, const CSG_Point &P1, CSG_Points &Part, double Epsilon) |
bool | _is_OnEdge (CSG_Shape_Polygon_Part *pPart, const CSG_Point &P, bool bVertex, double Epsilon) |
Protected Member Functions inherited from CSG_Shape_Part | |
CSG_Shape_Part (class CSG_Shape_Points *pOwner) | |
virtual | ~CSG_Shape_Part (void) |
virtual bool | _Alloc_Memory (int nPoints) |
virtual void | _Update_Extent (void) |
Protected Attributes | |
int | m_bClockwise |
int | m_bLake |
double | m_Area |
double | m_Perimeter |
TSG_Point | m_Centroid |
Protected Attributes inherited from CSG_Shape_Part | |
bool | m_bUpdate |
int | m_nPoints |
int | m_nBuffer |
double * | m_Z |
double | m_ZMin |
double | m_ZMax |
double * | m_M |
double | m_MMin |
double | m_MMax |
TSG_Point * | m_Points |
CSG_Rect | m_Extent |
class CSG_Shape_Points * | m_pOwner |
Friends | |
class | CSG_Shape_Polygon |
|
protected |
Definition at line 75 of file shape_polygon.cpp.
References BOOL3_NOTSET, m_bClockwise, and m_bLake.
|
protectedvirtual |
Definition at line 83 of file shape_polygon.cpp.
|
protected |
Definition at line 403 of file shape_polygon.cpp.
References CSG_Points::Add(), CSG_Points::Get_Count(), CSG_Shape_Part::Get_Count(), CSG_Shape_Part::Get_Point(), SG_Get_Distance(), and SG_Is_Point_On_Line().
Referenced by Get_Shared_Edges().
|
protectedvirtual |
Reimplemented from CSG_Shape_Part.
Definition at line 92 of file shape_polygon.cpp.
References CSG_Shape_Part::_Invalidate(), BOOL3_NOTSET, m_bClockwise, and m_bLake.
|
protected |
Definition at line 440 of file shape_polygon.cpp.
References CSG_Shape_Part::Get_Count(), CSG_Shape_Part::Get_Point(), and SG_Is_Point_On_Line().
Referenced by Get_Shared_Edges().
|
protected |
Definition at line 101 of file shape_polygon.cpp.
References A, B, BOOL3_FALSE, BOOL3_NOTSET, BOOL3_TRUE, CSG_Shape_Part::Get_Extent(), CSG_Rect::Get_XCenter(), CSG_Rect::Get_YCenter(), m_Area, m_bClockwise, m_Centroid, CSG_Shape_Part::m_nPoints, m_Perimeter, CSG_Shape_Part::m_Points, SG_Get_Distance(), SSG_Point::x, and SSG_Point::y.
bool CSG_Shape_Polygon_Part::Contains | ( | const CSG_Point & | p | ) |
Definition at line 289 of file shape_polygon.cpp.
References SSG_Point::x, and SSG_Point::y.
Referenced by Contains(), CSG_Shape_Polygon::Contains(), Get_Distance(), and Get_Point_Relation().
bool CSG_Shape_Polygon_Part::Contains | ( | double | x, |
double | y | ||
) |
Definition at line 295 of file shape_polygon.cpp.
References Contains(), CSG_Shape_Part::Get_Extent(), Get_Point_Relation(), CSG_Shape_Part::m_nPoints, CSG_Shape_Part::m_Points, SG_POLYGON_POINT_Edge, SG_POLYGON_POINT_Interior, SG_POLYGON_POINT_Vertex, SSG_Point::x, and SSG_Point::y.
|
inline |
Definition at line 656 of file shapes.h.
Referenced by CSG_Shape_Polygon::Get_Area().
|
inline |
Definition at line 658 of file shapes.h.
Referenced by CSG_Shape_Polygon::Get_Centroid().
Definition at line 599 of file shape_polygon.cpp.
References C, Contains(), CSG_Shape_Part::m_nPoints, CSG_Shape_Part::m_Points, and SG_Get_Nearest_Point_On_Line().
Referenced by CSG_Shape_Polygon::Get_Distance().
|
inline |
Definition at line 654 of file shapes.h.
Referenced by CSG_Shape_Polygon::Get_Perimeter().
TSG_Polygon_Point_Relation CSG_Shape_Polygon_Part::Get_Point_Relation | ( | const CSG_Point & | p | ) |
Definition at line 151 of file shape_polygon.cpp.
References SSG_Point::x, and SSG_Point::y.
Referenced by Contains(), CSG_Shape_Polygon::Get_Point_Relation(), is_Neighbour(), and is_OnEdge().
TSG_Polygon_Point_Relation CSG_Shape_Polygon_Part::Get_Point_Relation | ( | double | x, |
double | y | ||
) |
Definition at line 157 of file shape_polygon.cpp.
References Contains(), CSG_Shape_Part::Get_Extent(), CSG_Shape_Part::m_nPoints, CSG_Shape_Part::m_Points, SG_POLYGON_POINT_Edge, SG_POLYGON_POINT_Interior, SG_POLYGON_POINT_Outside, SG_POLYGON_POINT_Vertex, SSG_Point::x, and SSG_Point::y.
CSG_Lines CSG_Shape_Polygon_Part::Get_Shared_Edges | ( | CSG_Shape_Polygon_Part * | pPart, |
bool | bVertexCheck, | ||
double | Epsilon = 0. |
||
) |
Returns all edge segments shared by this polygon part and the one provide by pPart argument as CSG_Lines object. If bVertexCheck is true vertices lying on edged segments of the other polygon part will be recognized. If not only vertices are taken into respect that are shared by both polygon parts. Due to precision issues the tolerance factor specified with Epsilon should be slightly greater than zero when using the bVertexCheck option.
Definition at line 479 of file shape_polygon.cpp.
References _Add_Edge_Points(), _is_OnEdge(), CSG_Points::Add(), CSG_Lines::Add(), CSG_Points::Get_Count(), CSG_Lines::Get_Count(), CSG_Shape_Part::Get_Count(), CSG_Shape_Part::Get_Extent(), CSG_Shape_Part::Get_Point(), is_OnEdge(), SSG_Point::x, and SSG_Point::y.
Referenced by CSG_Shape_Polygon::Get_Shared_Edges(), and Get_Shared_Length().
double CSG_Shape_Polygon_Part::Get_Shared_Length | ( | CSG_Shape_Polygon_Part * | pPart, |
bool | bVertexCheck, | ||
double | Epsilon = 0. |
||
) |
This function requests the edges shared by this polygon part and the one provided by the pPart argument and returns the total length. See Get_Shared_Edges() for more details.
Definition at line 586 of file shape_polygon.cpp.
References CSG_Lines::Get_Length(), and Get_Shared_Edges().
|
inline |
Definition at line 652 of file shapes.h.
Referenced by CSG_Shape_Polygon::is_Clockwise().
bool CSG_Shape_Polygon_Part::is_Neighbour | ( | CSG_Shape_Polygon_Part * | pPart, |
bool | bSimpleCheck = true |
||
) |
Returns true if this polygon part touches that defined by pPart, i.e. the polygons share vertices or have vertices placed on the edge of the other. If bSimpleCheck is true the check is only performed until one shared vertex is found, which is sufficient if it can be expected that the polygons do not overlap.
Definition at line 357 of file shape_polygon.cpp.
References CSG_Shape_Part::Get_Count(), CSG_Shape_Part::Get_Extent(), CSG_Shape_Part::Get_Point(), Get_Point_Relation(), SG_POLYGON_POINT_Edge, SG_POLYGON_POINT_Interior, SG_POLYGON_POINT_Outside, and SG_POLYGON_POINT_Vertex.
bool CSG_Shape_Polygon_Part::is_OnEdge | ( | const CSG_Point & | p | ) |
Definition at line 268 of file shape_polygon.cpp.
References SSG_Point::x, and SSG_Point::y.
Referenced by Get_Shared_Edges(), and CSG_Shape_Polygon::is_OnEdge().
bool CSG_Shape_Polygon_Part::is_OnEdge | ( | double | x, |
double | y | ||
) |
Definition at line 274 of file shape_polygon.cpp.
References Get_Point_Relation(), SG_POLYGON_POINT_Edge, and SG_POLYGON_POINT_Vertex.
|
friend |
|
protected |
Definition at line 685 of file shapes.h.
Referenced by _Update_Area().
|
protected |
Definition at line 683 of file shapes.h.
Referenced by _Invalidate(), _Update_Area(), and CSG_Shape_Polygon_Part().
|
protected |
Definition at line 683 of file shapes.h.
Referenced by _Invalidate(), CSG_Shape_Polygon::_Invalidate(), CSG_Shape_Polygon_Part(), and CSG_Shape_Polygon::is_Lake().
|
protected |
Definition at line 687 of file shapes.h.
Referenced by _Update_Area().
|
protected |
Definition at line 685 of file shapes.h.
Referenced by _Update_Area().