Class: Segment

Segment

new og.planetSegment.Segment()

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

Members

_extentog.Extent

Geographical extent.

bboxog.bv.Box

Segment bounding box.

bsphereog.bv.Sphere

Segment bounding box.

gridSizenumber

Vertices grid size.
WebGl handler pointer.

materialsArray.<og.planetSegment.Material>

Texture materials array.
Quad tree node of the segment.

normalMapReadyboolean

Normal map is allready made.

parentNormalMapReadyboolean

Parent normal map is made allready.

planetpg.node.RenderNode

Planet pointer.

readyboolean

Segment is ready for rendering.

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

acceptForRendering(){boolean}

Returns that segment good for rendering with camera by current RATIO_LOD.
Returns:
Type Description
boolean
Callback that calls in terrain provider to complete the terrain.
Clear but not destroy segment data.

createBoundsByExtent()

Creates bound volumes by segment geographical extent.

createNormalMapTexture()

Creates normal map texture for the segment.
Delete segment gl buffers.
Delete elevation data.
Delete materials.
Clear and destroy all segment data.

elevationsExists(elevation)

Terrain obtained from server.
Name Type Description
elevation Array.<number> Elevation data.

elevationsNotExists()

Terrain is not obtained or not exists on the server.

getEntityTerrainPoint(entity){og.math.Vector3}

Returns entity terrain point.
Name Type Description
entity og.Entity Entity.
Returns:
Type Description
og.math.Vector3

getMaterialByLayer(layer){og.planetSegment.Material}

Gets material by layer object.
Name Type Description
layer og.layer.Layer Layer object.
Returns:
Type Description
og.planetSegment.Material

getMaterialByLayerName(name){og.planetSegment.Material}

Gets material by layer name.
Name Type Description
name string Layer name.
Returns:
Type Description
og.planetSegment.Material

getTerrainPoint(res, xyz, insideSegmentPosition){number}

Returns distance from object to terrain coordinates and terrain point that calculates out in the res parameter.
Name Type Description
res og.math.Vector3 Result cartesian coordiantes on the terrain.
xyz og.math.Vector3 Cartesian object position.
insideSegmentPosition og.LonLat Geodetic object position.
Returns:
Type Description
number
Starts and load terrain provider to make terrain.
Project wgs86 to segment native projection.
Name Type Description
lonlat og.LonLat Coordinates to project.
Returns:
Type Description
og.LonLat