Class: Polyline

og/entity/Polyline~Polyline

Polyline object.

new Polyline(options)

Name Type Description
options Object optional Polyline options:
Name Type Description
thickness number optional Thickness in screen pixels 1.5 is default.
altitude Number optional Relative to ground layers altitude value.
color Vec4 optional RGBA color.
opacity Boolean optional Line opacity.
visibility Boolean optional Polyline visibility. True default.
isClosed Boolean optional Closed geometry type identificator.
pathLonLat Array.<Array.<number>> optional Polyline geodetic coordinates array. [[0,0,0], [1,1,1],...]
path3v Array.<Array.<number>> optional LinesString cartesian coordinates array. [[0,0,0], [1,1,1],...]
pathColors Array.<Array.<number>> optional Coordinates color. [[1,0,0,1], [0,1,0,1],...] for right and green colors.

Members

protected_closedLineBoolean

Polyline geometry ring type identificator.

_defaultColorArray.<number>

Polyline RGBA color.

protected_extentExtent

Polyline geodetic extent.

readonlyidnumber

Object unic identifier.

thicknessnumber

Polyline thickness in screen pixels.

visibilityboolean

Polyline visibility.

Methods

staticmodule:og/entity/Polyline~Polyline.appendLineData3v(path3v, isClosed, outVertices, outOrders, outIndexes, ellipsoid, outTransformedPathLonLat, outPath3v, outTransformedPathMerc, outExtent, outColors)

Appends to the line array new cartesian coordinates line data.
Name Type Description
path3v Array.<Array.<number>> Line coordinates path array. [[0,0,0], [1,1,1],...]
isClosed Boolean Identificator for the closed line data creation.
outVertices Array.<Number> Out vertices data array.
outOrders Array.<Number> Out vertices orders data array.
outIndexes Array.<Number> Out vertices indexes data array.
ellipsoid Ellipsoid optional Ellipsoid to coordinates transformation.
outTransformedPathLonLat Array.<Array.<LonLat>> optional Geodetic coordinates out array.
outPath3v Array.<Array.<LonLat>> optional Cartesian coordinates out array.
outTransformedPathMerc Array.<Array.<LonLat>> optional Mercator coordinates out array.
outExtent Extent optional Geodetic line extent.
outColors Array optional

staticmodule:og/entity/Polyline~Polyline.appendLineDataLonLat(pathLonLat, isClosed, outVertices, outOrders, outIndexes, ellipsoid, outTransformedPathCartesian, outPathLonLat, outTransformedPathMerc, outExtent)

Appends to the line array new geodetic coordinates line data.
Name Type Description
pathLonLat Array.<Array.<number>> Line geodetic coordinates path array. [[0,0,0], [1,1,1],...]
isClosed Boolean Identificator for the closed line data creation.
outVertices Array.<Number> Out vertices data array.
outOrders Array.<Number> Out vertices orders data array.
outIndexes Array.<Number> Out indexes data array.
ellipsoid Ellipsoid Ellipsoid to coordinates transformation.
outTransformedPathCartesian Array.<Array.<number>> Cartesian coordinates out array. [[0,0,0], [1,1,1],...]
outPathLonLat Array.<Array.<LonLat>> Geographic coordinates out array.
outTransformedPathMerc Array.<Array.<LonLat>> Mercator coordinates out array.
outExtent Extent Geodetic line extent.

staticmodule:og/entity/Polyline~Polyline.appendPoint3v(path3v, isClosed, outVertices, outOrders, outIndexes, ellipsoid, outTransformedPathLonLat, outPath3v, outTransformedPathMerc, outExtent)

Appends to the line new cartesian coordinates point data.
Name Type Description
path3v Array.<Array.<number>> Line coordinates path array. [[0,0,0], [1,1,1],...]
isClosed Boolean Identificator for the closed line data creation.
outVertices Array.<Number> Out vertices data array.
outOrders Array.<Number> Out vertices orders data array.
outIndexes Array.<Number> Out vertices indexes data array.
ellipsoid Ellipsoid optional Ellipsoid to coordinates transformation.
outTransformedPathLonLat Array.<Array.<LonLat>> optional Geodetic coordinates out array.
outPath3v Array.<Array.<LonLat>> optional Cartesian coordinates out array.
outTransformedPathMerc Array.<Array.<LonLat>> optional Mercator coordinates out array.
outExtent Extent optional Geodetic line extent.

protected_clearData()

protected_createIndexBuffer()

Creates gl index and order buffer.

protected_createVerticesBuffer()

Creates gl main data buffer.

protected_deleteBuffers()

Clear GL buffers.

protected_refresh()

Refresh buffers.

protected_setEqualPath3v(path3v)

Sets polyline path with cartesian coordinates.
Name Type Description
path3v Array.<pg.math.Vector3> Cartesian coordinates.

protected_setEqualPathLonLat(pathLonLat)

Sets polyline with geodetic coordinates.
Name Type Description
pathLonLat Array.<LonLat> Geodetic polyline path coordinates.

protected_update()

Updates render buffers.

addPoint3v(point3v, multiLineIndex)

Adds a new cartesian point in the end of the path.
Name Type Default Description
point3v Vec3 New coordinate.
multiLineIndex number 0 optional Path part index, first by default.

addPointLonLat(lonLat, multiLineIndex)

Adds a new geodetic point in the end of the path.
Name Type Default Description
lonLat LonLat New coordinate.
multiLineIndex number 0 optional Path part index, first by default.

appendPoint3v(point3v)

Adds a new cartesian point in the end of the path in a last line segment.
Name Type Description
point3v Vec3 New coordinate.
Clear Polyline object data.

getExtent(){Extent}

Returns polyline geodetic extent.
Returns:
Type Description
Extent - Geodetic extent

getPath3v(){Array.<Vec3>}

Returns path cartesian coordinates.
Returns:
Type Description
Array.<Vec3> Polyline path.

getPathLonLat(){Array.<LonLat>}

Returns geodetic path coordinates.
Returns:
Type Description
Array.<LonLat> Polyline path.

getThickness(){number}

Returns thickness.
Returns:
Type Description
number Thickness in screen pixels.

getVisibility(){boolean}

Gets Polyline visibility.
Returns:
Type Description
boolean Polyline visibility.
Removes from an entity.

setOpacity(opacity)

Sets Polyline opacity.
Name Type Description
opacity number Opacity.

setPath3v(path3v, forceEqual)

Sets Polyline cartesian coordinates.
Name Type Default Description
path3v Array.<Array.<number>> Polyline path cartesian coordinates. (exactly 3 entries)
forceEqual Boolean false optional Makes assigning faster for size equal coordinates array.

setPathLonLat(pathLonLat, forceEqual)

Sets geodetic coordinates.
Name Type Default Description
pathLonLat Array.<Array.<number>> Polyline path cartesian coordinates. (exactly 3 entries)
forceEqual Boolean false optional Makes assigning faster for size equal coordinates array.

setRenderNode(renderNode)

Assign with render node.
Name Type Description
renderNode RenderNode -

setThickness(thickness)

Sets Polyline thickness in screen pixels.
Name Type Description
thickness number Thickness.

setVisibility(visibility)

Sets visibility.
Name Type Description
visibility boolean Polyline visibility.