import { GeoBox } from "../coordinates/GeoBox" ; import { GeoCoordinates } from "../coordinates/GeoCoordinates" ; import { GeoCoordinatesLike , isGeoCoordinatesLike } from "../coordinates/GeoCoordinatesLike" ; import { Box3Like } from "../math/Box3Like" ; import { MathUtils } from "../math/MathUtils" ; import { OrientedBox3Like } from "../math/OrientedBox3Like" ; import { TransformLike } from "../math/TransformLike" ; import { Vector3Like } from "../math/Vector3Like" ; /**
 * The type of projection.
 */ export enum ProjectionType { /**
     * A type of [Projection] with zero curvature.
     */ Planar , /**
     * A spherical [Projection].
     */ Spherical } /**
 * `Projection` is used to convert positions from geo coordinates to world coordinates and vice
 * versa.
 */ export abstract class Projection { /**
     * The type of this [Projection].
     */ abstract get type ( ) : ProjectionType ; param unitScale constructor ( readonly unitScale ) { } param minElevation param maxElevation param result abstract worldExtent < Bounds extends Box3Like > ( minElevation , maxElevation , result ? ) ; param geoPoint param result - The optional object used to store the resulting world position, result must
     * implement  Vector3Like .
      abstract projectPoint < WorldCoordinates extends Vector3Like > ( geoPoint , result ? ) ; /**
     * Gets the  TransformLike of the local tangent space at the given point.
     *
     *  param point param result - The  TransformLike .
      localTangentSpace ( point , result ) { if ( isGeoCoordinatesLike ( point ) ) { this . projectPoint ( point , result . position ) ; } else { MathUtils . copyVector3 ( point , result . position ) ; } MathUtils . newVector3 ( 1 , 0 , 0 , result . xAxis ) ; MathUtils . newVector3 ( 0 , 1 , 0 , result . yAxis ) ; MathUtils . newVector3 ( 0 , 0 , 1 , result . zAxis ) ; return result ; } param worldPoint abstract unprojectPoint ( worldPoint ) ; param worldPoint abstract unprojectAltitude ( worldPoint ) ; param geoBox abstract projectBox ( geoBox ) ; param geoBox param result - The resulting  OrientedBox3Like .
      abstract projectBox < WorldBoundingBox extends Box3Like | OrientedBox3Like > ( geoBox , result ) ; param worldBox abstract unprojectBox ( worldBox ) ; param worldPoint abstract getScaleFactor ( worldPoint ) ; param worldPoint abstract surfaceNormal ( worldPoint ) ; param worldPoint returns abstract surfaceNormal < Normal extends Vector3Like > ( worldPoint , result ) ; param worldPoint abstract groundDistance ( worldPoint ) ; param worldPoint abstract scalePointToSurface ( worldPoint ) ; /**
     * Reproject a world position from the given source  Projection .
     *
     *  param sourceProjection param worldPos returns The world position reprojected using this  Projection .
      reprojectPoint ( sourceProjection , worldPos ) ; /**
     * Reproject a world position from the given source  Projection .
     *
     *  param sourceProjection param worldPos param result - The resulting position reprojected using this  Projection .
      reprojectPoint < WorldCoordinates extends Vector3Like > ( sourceProjection , worldPos , result ) ; /**
     * Reproject a world position from the given source  Projection .
     * Implementations should be aware of worldPos and result may be one object
     *
     *  param sourceProjection param worldPos param result - The resulting position reprojected using this  Projection .
     *  hidden reprojectPoint ( sourceProjection , worldPos , result ? ) { if ( sourceProjection === this ) { if ( result === undefined ) { return { x : worldPos . x , y : worldPos . y , z : worldPos . z } ; } result . x = worldPos . x ; result . y = worldPos . y ; result . z = worldPos . z ; return result ; } return this . projectPoint ( sourceProjection . unprojectPoint ( worldPos ) , result ) ; } }