Class: Segment

og/segment/Segment~Segment

new Segment(node, planet, tileZoom, extent)

Planet segment Web Mercator tile class that stored and rendered with quad tree.
Name Type Description
node og.quadTree.Node Segment node.
planet og.scene.Planet Current planet scene.
tileZoom Number Zoom index.
extent og.Extent Segment extent.

Members

_extentog.Extent

Geographical extent.

bsphereog.bv.Sphere

Segment bounding box.

gridSizenumber

Vertices grid size.

handlerog.webgl.Handler

WebGl handler pointer.

initializedboolean

Segment is ready to create plain vertices.

materialsArray.<og.planetSegment.Material>

Texture materials array.

nodeog.quadTree.Node

Quad tree node of the segment.

normalMapReadyboolean

Normal map is allready made.

parentNormalMapReadyboolean

Parent normal map is made allready(optimization parameter).

plainReadyboolean

Plain segment vertices was created.
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 record.

acceptForRendering(camera){boolean}

Returns that segment good for rendering with camera by current lod ratio.
Name Type Description
camera og.Camera Camera object.
Returns:
Type Description
boolean -
Clear but not destroy segment data.

createBoundsByExtent()

Creates bound volumes by segment geographical extent.

createTerrainFromChildNodes()

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.
Name Type Description
elevations Float32Array Elevation data.

elevationsNotExists()

Terrain is not obtained or not exists on the server.

getEntityTerrainPoint(entity, res){og.Vec3}

Returns entity terrain point.
Name Type Description
entity og.Entity Entity.
res og.Vec3 Point coordinates.
Returns:
Type Description
og.Vec3 -

getMaterialByLayer(layer){og.planetSegment.Material}

Gets specific layer material.
Name Type Description
layer og.Layer Layer object.
Returns:
Type Description
og.planetSegment.Material - Segment 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.Vec3 Result cartesian coordiantes on the terrain.
xyz og.Vec3 Cartesian object position.
insideSegmentPosition og.LonLat Geodetic object position.
Returns:
Type Description
number -

projectNative(lonlat){og.LonLat}

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