Class: SegmentLonLat

SegmentLonLat

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

new SegmentLonLat(node, planet, tileZoom, extent)

Name Type Description
node quadNode.Node Quad tree segment node.
planet Planet Scene planet.
tileZoom Number Segment tile zoom index.
extent Extent Segment WGS84 extent.

Extends

Members

_extentExtent

Geographical extent.

bboxBox

Segment bounding box.

bsphereSphere

Segment bounding sphere

gridSizenumber

Vertices grid size.

handlerHandler

WebGl handler pointer.

initializedboolean

Segment is ready to create plain vertices.

materialsArray.<planetSegment.Material>

Texture materials array.

nodequadTree.Node

Quad tree node of the segment.

normalMapReadyboolean

Normal map is allready made.

parentNormalMapReadyboolean

Parent normal map is made allready(optimization parameter).

passReadyboolean

Means that tree passage reach the segment, and the segment terrain is ready.

plainReadyboolean

Plain segment vertices was created.

planetPlanet

Planet pointer.

terrainExistsboolean

Terrain existing flag.

terrainIsLoadingboolean

Terrain is loading now flag.

terrainReadyboolean

Terrain is allready applied flag.

tileXnumber

Horizontal tile index.

tileYnumber

Vertical tile index.

tileZoomnumber

Tile zoom index.

Methods

Removes cache records.

inherited acceptForRendering(camera){boolean}

Returns that segment good for rendering with camera by current lod ratio.
Name Type Description
camera Camera Camera object.
Returns:
Type Description
boolean -
Clear but not destroy segment data.
Creates bound volumes by segment geographical extent.
Delete segment gl buffers.
Delete elevation data.
Delete materials.
Clear and destroy all segment data.
Terrain obtained from server.
Name Type Description
elevations Float32Array Elevation data.
Terrain is not obtained or not exists on the server.

inherited getEntityTerrainPoint(entity, res, normal){Vec3}

Returns entity terrain point.
Name Type Description
entity Entity Entity.
res Vec3 Point coordinates.
normal Vec3 optional Terrain point normal.
Returns:
Type Description
Vec3 -

inherited getMaterialByLayer(layer){planetSegment.Material}

Gets specific layer material.
Name Type Description
layer Layer Layer object.
Returns:
Type Description
planetSegment.Material - Segment material.

inherited getTerrainPoint(xyz, insideSegmentPosition, res, normal){number}

Returns distance from object to terrain coordinates and terrain point that calculates out in the res parameter.
Name Type Description
xyz Vec3 Cartesian object position.
insideSegmentPosition LonLat Geodetic object position.
res Vec3 optional Result cartesian coordiantes on the terrain.
normal Vec3 optional Terrain point normal.
Returns:
Type Description
number -
Name Type Description
forceLoading boolean

inherited projectNative(lonlat){LonLat}

Project wgs86 to segment native projection.
Name Type Description
lonlat LonLat Coordinates to project.
Returns:
Type Description
LonLat -