Struct Polygons

Struct Documentation

struct Polygons

AIAA Polygons.

Public Types

typedef std::vector<int> Point

Type Definition for Point.

typedef std::vector<Point> Polygon

Type Definition for Polygon.

Public Functions

bool empty() const

Checks if polys is empty.

size_t size() const

Count of Polygons.

void push_back(Polygon poly)

Append new Polygon to polys list.

void flipXY()

Flip X,Y points to Y,X.

bool findFirstNonMatching(const Polygons &polygons, int &polyIndex, int &vertexIndex) const

create Model from JSON String


True if non-matching polygon + vertex is found

  • [in] polygons: Polygons to compare against

  • [inout] polyIndex: First Polygon Index where the Polygon is not matching

  • [inout] vertexIndex: Vertex Index where the Point is not matching

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

convert Polygons to JSON String


JSON String

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

Public Members

std::vector<Polygon> polys

Array of 2D/3D/4D Points to represent [[x,y,z,w]+].

Public Static Functions

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

create Model from JSON String


[ [[170, 66],[162, 73],[169, 77],[180, 76],[185, 68],[175, 66]], [[1,2]], [] ]
  • [in] json: JSON String.


Polygons object