Struct PolygonsList

Struct Documentation

struct PolygonsList

AIAA List of Polygons.

Public Functions

bool empty() const

Checks if Polygons list is empty.

size_t size() const

Count of Polygons list.

void push_back(Polygons polygons)

Append new Polygons to the list.

void flipXY()

Flip X,Y points to Y,X.

std::string toJson(int space = 0) const

convert PolygonsList to JSON String

Return

JSON String

Parameters
  • [in] space: If space > 0; then JSON string will be formatted accordingly

Public Members

std::vector<Polygons> list

List of Polygons.

Public Static Functions

static PolygonsList fromJson(const std::string &json)

create PolygonsList from JSON String

Example:

[
[],
[[[169,66],[163,74],[173,77],[183,75],[184,68],[174,66]]],
[[[169,66],[163,74],[172,78],[183,76],[184,69],[175,66]]]
]
Parameters
  • [in] json: JSON String.

Return

PolygonsList object