SegmentLonLat#

Planet segment Web Mercator tile class that stored and rendered with quad tree.

Constructor#

new SegmentLonLat()#

Extends#

Members#

_extent :Extent#

Geographical extent.

Type:

bbox :Box#

Segment bounding box.

Type:
Overrides

bsphere :Sphere#

Segment bounding sphere

Type:

gridSize :number#

Vertices grid size.

Type:
  • number

handler :Handler#

WebGl handler pointer.

Type:

initialized :boolean#

Segment is ready to create plain vertices.

Type:
  • boolean

materials :Array.<planetSegment.Material>#

Texture materials array.

Type:
  • Array.<planetSegment.Material>

node :quadTree.Node#

Quad tree node of the segment.

Type:
  • quadTree.Node
Overrides

normalMapReady :boolean#

Normal map is allready made.

Type:
  • boolean

parentNormalMapReady :boolean#

Parent normal map is made allready(optimization parameter).

Type:
  • boolean

plainReady :boolean#

Plain segment vertices was created.

Type:
  • boolean

planet :Planet#

Planet pointer.

Type:

terrainExists :boolean#

Terrain existing flag.

Type:
  • boolean

terrainIsLoading :boolean#

Terrain is loading now flag.

Type:
  • boolean

terrainReady :boolean#

Terrain is allready applied flag.

Type:
  • boolean

tileX :number#

Horizontal tile index.

Type:
  • number
Overrides

tileY :number#

Vertical tile index.

Type:
  • number
Overrides

tileZoom :number#

Tile zoom index.

Type:
  • number

Methods#

_freeCache()#

Removes cache records.

(protected) _getLayerExtentOffset(layer)#

Parameters:
NameTypeDescription
layer
To Do
  • simplify layer._extentMerc in layer.getNativeExtent(this)

_setExtentLonLat()#

acceptForRendering(camera) → {boolean}#

Returns that segment good for rendering with camera by current lod ratio.

Parameters:
NameTypeDescription
cameraCamera

Camera object.

Returns:
Type: 
boolean

clearSegment()#

Clear but not destroy segment data.

createBoundsByExtent()#

Creates bound volumes by segment geographical extent.

deleteBuffers()#

Delete segment gl buffers.

deleteElevations()#

Delete elevation data.

deleteMaterials()#

Delete materials.

destroySegment()#

Clear and destroy all segment data.

elevationsExists(elevations)#

Terrain obtained from server.

Parameters:
NameTypeDescription
elevationsFloat32Array

Elevation data.

elevationsNotExists()#

Terrain is not obtained or not exists on the server.

getEntityTerrainPoint(entity, res, normalopt) → {Vec3}#

Returns entity terrain point.

Parameters:
NameTypeAttributesDescription
entityEntity

Entity.

resVec3

Point coordinates.

normalVec3<optional>

Terrain point normal.

Returns:
Type: 
Vec3

getMaterialByLayer(layer) → {planetSegment.Material}#

Gets specific layer material.

Parameters:
NameTypeDescription
layerLayer

Layer object.

Returns:
  • Segment material.
Type: 
planetSegment.Material

getTerrainPoint(xyz, insideSegmentPosition, resopt, normalopt) → {number}#

Returns distance from object to terrain coordinates and terrain point that calculates out in the res parameter.

Parameters:
NameTypeAttributesDescription
xyzVec3

Cartesian object position.

insideSegmentPositionLonLat

Geodetic object position.

resVec3<optional>

Result cartesian coordinates on the terrain.

normalVec3<optional>

Terrain point normal.

Returns:
Type: 
number

loadTerrain(forceLoading)#

Parameters:
NameTypeDescription
forceLoadingboolean

projectNative(lonlat) → {LonLat}#

Project wgs86 to segment native projection.

Parameters:
NameTypeDescription
lonlatLonLat

Coordinates to project.

Returns:
Type: 
LonLat