diff --git a/src/Core/Prefab/Globe/BuilderEllipsoidTile.ts b/src/Core/Prefab/Globe/BuilderEllipsoidTile.ts index 4201cf2adb..217d3354bd 100644 --- a/src/Core/Prefab/Globe/BuilderEllipsoidTile.ts +++ b/src/Core/Prefab/Globe/BuilderEllipsoidTile.ts @@ -42,7 +42,7 @@ class BuilderEllipsoidTile implements TileBuilder { return this._crs; } - constructor(options: { + public constructor(options: { crs: string, uvCount: number, }) { @@ -74,7 +74,7 @@ class BuilderEllipsoidTile implements TileBuilder { // prepare params // init projected object -> params.projected - prepare(params: TileBuilderParams): GlobeTileBuilderParams { + public prepare(params: TileBuilderParams): GlobeTileBuilderParams { const nbRow = 2 ** (params.level + 1.0); let st1 = WGS84ToOneSubY(params.extent.south); @@ -103,14 +103,14 @@ class BuilderEllipsoidTile implements TileBuilder { } // get center tile in cartesian 3D - center(extent: Extent) { + public center(extent: Extent) { return extent.center(this._transform.coords[0]) .as(this.crs, this._transform.coords[1]) .toVector3(); } // get position 3D cartesian - vertexPosition(position: THREE.Vector2): THREE.Vector3 { + public vertexPosition(position: THREE.Vector2): THREE.Vector3 { return this._transform.coords[0] .setFromValues(position.x, position.y) .as(this.crs, this._transform.coords[1]) @@ -118,21 +118,21 @@ class BuilderEllipsoidTile implements TileBuilder { } // get normal for last vertex - vertexNormal() { + public vertexNormal() { return this._transform.coords[1].geodesicNormal; } // coord u tile to projected - uProject(u: number, extent: Extent): number { + public uProject(u: number, extent: Extent): number { return extent.west + u * this._transform.dimension.x; } // coord v tile to projected - vProject(v: number, extent: Extent): number { + public vProject(v: number, extent: Extent): number { return extent.south + v * this._transform.dimension.y; } - computeShareableExtent(extent: Extent): ShareableExtent { + public computeShareableExtent(extent: Extent): ShareableExtent { // Compute shareable extent to pool the geometries // the geometry in common extent is identical to the existing input // with a transformation (translation, rotation) diff --git a/src/Core/Prefab/Planar/PlanarTileBuilder.ts b/src/Core/Prefab/Planar/PlanarTileBuilder.ts index 697c0dd628..fb5e9316dd 100644 --- a/src/Core/Prefab/Planar/PlanarTileBuilder.ts +++ b/src/Core/Prefab/Planar/PlanarTileBuilder.ts @@ -28,7 +28,7 @@ class PlanarTileBuilder implements TileBuilder { private _transform: Transform; private _crs: string; - constructor(options: { + public constructor(options: { projection?: string, crs: string, uvCount?: number, @@ -60,41 +60,41 @@ class PlanarTileBuilder implements TileBuilder { // prepare params // init projected object -> params.projected - prepare(params: TileBuilderParams): PlanarTileBuilderParams { + public prepare(params: TileBuilderParams): PlanarTileBuilderParams { const newParams = params as PlanarTileBuilderParams; newParams.nbRow = 2 ** (params.zoom + 1.0); newParams.projected = new Projected(); return newParams; } - center(extent: Extent): THREE.Vector3 { + public center(extent: Extent): THREE.Vector3 { extent.center(this._transform.coords); center.set(this._transform.coords.x, this._transform.coords.y, 0); return center; } // set position 3D cartesian - vertexPosition(position: THREE.Vector2): THREE.Vector3 { + public vertexPosition(position: THREE.Vector2): THREE.Vector3 { this._transform.position.set(position.x, position.y, 0); return this._transform.position; } // get normal for last vertex - vertexNormal(): THREE.Vector3 { + public vertexNormal(): THREE.Vector3 { return this._transform.normal; } // coord u tile to projected - uProject(u: number, extent: Extent): number { + public uProject(u: number, extent: Extent): number { return extent.west + u * (extent.east - extent.west); } // coord v tile to projected - vProject(v: number, extent: Extent): number { + public vProject(v: number, extent: Extent): number { return extent.south + v * (extent.north - extent.south); } - computeShareableExtent(extent: Extent): ShareableExtent { + public computeShareableExtent(extent: Extent): ShareableExtent { // compute shareable extent to pool the geometries // the geometry in common extent is identical to the existing input // with a translation