Constructor
new Polyline(optionsopt)
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | Polyline options: Properties
|
- Source
Methods
__appendLineData3v()
Appends to the line array new cartesian coordinates line data.
- Source
__appendLineDataLonLat()
Appends to the line array new geodetic coordinates line data.
- Source
(protected) _createIndexBuffer()
Creates gl index and order buffer.
- Source
(protected) _createVerticesBuffer()
Creates vertices buffers.
- Source
_deleteBuffers()
Clear GL buffers.
- Source
_getAtlasTexCoordsForSegment()
Get atlas tex coords for segment (null = color-only)
- Source
(protected) _refresh()
Refresh buffers.
- Source
(protected) _setSegmentEqualPath3v(path3v, segmentIndex)
Sets one polyline segment with cartesian coordinates.
| Name | Type | Description |
|---|---|---|
path3v | SegmentPath3vExt | Cartesian coordinates for one segment. |
segmentIndex | number | Segment index to update. |
- Source
(protected) _update()
Updates render buffers.
- Source
addPoint3v(point3v, segmentIndexopt, coloropt)
Append new point in the end of the path.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
point3v | Vec3 | New point coordinates. | ||
segmentIndex | number | <optional> | 0 | Path segment index, first by default. |
color | NumberArray4 | <optional> | Point color |
- Source
addPointLonLat(lonLat, segmentIndexopt)
Append new geodetic point in the end of the path.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
lonLat | LonLat | New coordinate. | ||
segmentIndex | number | <optional> | 0 | Path segment index, first by default. |
- Source
clear()
Clear polyline data.
- Source
getExtent() → {Extent}
Returns polyline geodetic extent.
- Source
- Geodetic extent
- Type:
- Extent
getOpacity()
Gets polyline opacity.
- Source
getPath3v() → {Array.<SegmentPath3vExt>}
Returns path cartesian coordinates.
- Source
Polyline path.
- Type:
- Array.<SegmentPath3vExt>
getPathLonLat() → {Array.<SegmentPathLonLatExt>}
Returns geodetic path coordinates.
- Source
Polyline path.
- Type:
- Array.<SegmentPathLonLatExt>
getVisibility() → {boolean}
Gets Polyline visibility.
- Source
Polyline visibility.
- Type:
- boolean
insertPoint3v(point3v, indexopt, coloropt, segmentIndexopt)
Insert point coordinates in a path segment
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
point3v | Vec3 | Point coordinates | ||
index | number | <optional> | 0 | Index in the path |
color | NumberArray4 | <optional> | Point color | |
segmentIndex | number | <optional> | 0 | Path segment index |
- Source
remove()
Removes from an entity.
- Source
removePath(index)
Remove multiline path segment
| Name | Type | Description |
|---|---|---|
index | number | Segment index in multiline |
- Source
removePoint(index, segmentIndexopt)
Remove point from the path
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
index | number | Point index in a path segment | ||
segmentIndex | number | <optional> | 0 | Segment path index |
- Source
setAltitude(altitude)
Sets Polyline thickness in screen pixels.
| Name | Type | Description |
|---|---|---|
altitude | number | ALtitude value. |
- Source
setColorHTML(htmlColor)
Sets polyline color
| Name | Type | Description |
|---|---|---|
htmlColor | string | HTML color. |
- Source
setOpacity(opacity)
Sets polyline opacity.
| Name | Type | Description |
|---|---|---|
opacity | number | Opacity. |
- Source
setPath3v(path3v, pathColorsopt, forceEqualopt)
Sets Polyline cartesian coordinates.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
path3v | Array.<SegmentPath3vExt> | Polyline path cartesian coordinates. (exactly 3 entries) | ||
pathColors | Array.<SegmentPathColor> | <optional> | Polyline path cartesian coordinates. (exactly 3 entries) | |
forceEqual | Boolean | <optional> | false | Makes assigning faster for size equal coordinates array. |
- Source
setPathLonLat(pathLonLat, pathColors, forceEqualopt)
Sets polyline geodetic coordinates.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
pathLonLat | Array.<SegmentPathLonLat> | Polyline path cartesian coordinates. | ||
pathColors | Array.<SegmentPathColor> | Polyline path points colors. | ||
forceEqual | Boolean | <optional> | false | OPTIMIZATION FLAG: Makes assigning faster for size equal coordinates array. |
- Source
setPathSrc()
Set stroke image source for a segment index.
- Source
setPoint3v(coordinates, indexopt, segmentIndexopt, skipLonLatopt)
Changes cartesian point coordinates of the path
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
coordinates | Vec3 | New coordinates | ||
index | number | <optional> | 0 | Path segment index |
segmentIndex | number | <optional> | 0 | Index of the point in the path segment |
skipLonLat | boolean | <optional> | false | Do not update geodetic coordinates |
- Source
setPointColor(color, indexopt, segmentIndexopt)
Change path point color
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
color | NumberArray4 | New color | ||
index | number | <optional> | 0 | Point index |
segmentIndex | number | <optional> | 0 | Path segment index |
- Source
setRenderNode(renderNode)
Assign with render node.
| Name | Type | Description |
|---|---|---|
renderNode | RenderNode |
- Source
setSrc()
Sets image template url source. string = all segments, array = per-segment (null/undefined = color-only).
- Source
setThickness(thickness, segmentIndexopt)
Sets Polyline thickness in screen pixels.
| Name | Type | Attributes | Description |
|---|---|---|---|
thickness | number | Thickness. | |
segmentIndex | number | <optional> |
- Source
setVisibility(visibility)
Sets visibility.
| Name | Type | Description |
|---|---|---|
visibility | boolean | Polyline visibility. |
- Source
(static) setPathTexCoords()
[1, -1, 2, -2] - orders for triangle strip line segment t2 t3 (2)-------(-2) | | | | | | | | (1)-------(-1) t0 t1
- Source