Menu

DsePolygon

struct DsePolygon

Public Functions

DsePolygon *dse_polygon_new()

Creates a new polygon iterator.

Return

Returns an polygon that must be freed.

See

dse_polygon_iterator_free()

void dse_polygon_free(DsePolygon *polygon)

Frees a polygon instance.

Parameters
  • polygon:

void dse_polygon_reset(DsePolygon *polygon)

Resets a polygon so that it can be reused.

Parameters
  • polygon:

void dse_polygon_reserve(DsePolygon *polygon, cass_uint32_t num_rings, cass_uint32_t total_num_points)

Reserves enough memory to contain the provided number rings and points. This can be use to reduce memory allocations, but it is not required.

Parameters
  • polygon:

  • num_rings:

  • total_num_points:

CassError dse_polygon_start_ring(DsePolygon *polygon)

Starts a new ring.

Note: This will finish the previous ring.

Return

CASS_OK if successful, otherwise an error occurred.

Parameters
  • polygon:

CassError dse_polygon_add_point(DsePolygon *polygon, cass_double_t x, cass_double_t y)

Adds a point to the current ring.

Return

CASS_OK if successful, otherwise an error occurred.

Parameters
  • polygon:

  • x:

  • y:

CassError dse_polygon_finish(DsePolygon *polygon)

Finishes the contruction of a polygon.

Return

CASS_OK if successful, otherwise an error occurred.

Parameters
  • polygon: