📋
XDWorld_WebGL_Manual
  • 소개
    • XDWorld API
    • 시작하기
    • About EGIS
    • Release Note
      • 2.1x 버전 업데이트
      • 2.x 버전 업데이트
      • 1.6x 버전 업데이트
      • 1.5x 버전 업데이트
      • 1.4x 버전 업데이트
      • 1.3x 버전 업데이트
      • 이전 버전 업데이트
    • Tutorial
      • 카메라 설정
      • POI 생성하기
      • 폴리곤 생성하기
      • 라인 생성하기
      • 모델 추가하기
      • 레이어 설정
      • 배경 지도 설정
      • 거리 측정
      • 면적 측정
      • 높이 측정
      • 반경 측정
  • API
    • Module
    • Core
      • Collection
      • JSAABBox3D
      • JSColor
      • JSLine3D
      • JSSize2D
      • JSSize3D
      • JSVector2D
      • JSVector3D
      • JSVec2Array
      • JSVec3Array
      • JSDateTime
    • Analysis
      • JSAnalysis
      • JSAnalysisGridShadow
      • JSEarthquake
      • JSEditTerrain
      • JSFlood
      • JSGridAnal
      • JSSightAnalysis
      • JSSlope
      • JSTransparency
      • JSSolarManager
    • Camera
      • JSCamera
    • Layer
      • JSLayer
      • JSLayerList
      • JSImageryProvider
    • Map
      • JSMap
      • JSTerrain
      • JSIndexMap
    • Object
      • JSObject
      • JSAntenna
      • JSArrow
      • JSBarGraph
      • JSBarGraph3D
      • JSBillboard
      • JSColorGrid
      • JSColorGrid3D
      • JSColorPolygon
      • JSFigure
      • JSFlow
      • JSFlowPolygon
      • JSGhostSymbol
      • JSGhostSymbolMap
      • JSHTMLObject
      • JSIcon
      • JSInstanceObject
      • JSLineString
      • JSMultiCube
      • JSMultiPoint
      • JSPipe
      • JSPoint
      • JSPointGraph
      • JSPolygon
      • JSPolygonStyle
      • JSPolyLineStyle
      • JSReal3D
      • JSSurfaceGraph
      • JSSymbol
      • JSTimeSeriesObject
      • JSTraceTarget
      • JSTyphoon
      • JSVideoObject
      • JSViewFrustum
    • Option
      • JSControl
      • JSNavigationControl
      • JSOption
    • ETC
      • JSMath
      • JSProj
      • ~~JSProjection~~
      • SOPObject
      • EVENT
      • Type List
      • Tag List
Powered by GitBook
On this page
  • Function
  • clear()
  • create(coordinates) → number
  • setAutoMove(coordinates, frame) → boolean
  • setDepth(depth)
  • setRadius(radius)
  • setTexture(data, width, height, type) → boolean
  • startAutoMove() → boolean
  • stopAutoMove()

Was this helpful?

  1. API
  2. Analysis

JSTransparency

지도 내 지형의 터파기 분석 기능 설정을 위한 API입니다.

PreviousJSSlopeNextJSSolarManager

Last updated 1 year ago

Was this helpful?

Module.getTransparency API를 생성합니다.

var transparency = Module.getTransparency();

Function

clear()

터파기 결과를 초기화 합니다.

Module.getTransparency().clear();

create(coordinates) → number

입력 좌표를 받아 터파기 객체를 생성합니다.

입력 변수값(coordinates)은 (, , ...) 영역 좌표 목록으로 구성됩니다.

Name
Type
Description

coordinates

터파기 영역 좌표 리스트.

  • Return

    • number > 0: 생성 성공.

    • -1: 생성 실패.

  • Sample

    • function createTransparency 참조.

var AreaVertices = Module.getMap().getInputPoints();
var nIndex = Module.getTransparency().create(AreaVertices);

setAutoMove(coordinates, frame) → boolean

입력된 경로로 이동하는 원형 터파기의 경로와 속도를 설정합니다.

Name
Type
Description

coordinates

터파기 객체 이동 좌표 목록.

frame

number

터파기 애니메이션 갱신 프레임 수.

  • Return

    • true: 설정 성공.

    • false: 설정 실패.

  • Sample

    • function setTransparencyAutoMove 참조.

var movePositionList = new Module.JSVec2Array();
movePositionList.push(new Module.JSVector2D(127.03691229708741, 37.509635136930626));
movePositionList.push(new Module.JSVector2D(127.03987097629198, 37.50932526196098));
movePositionList.push(new Module.JSVector2D(127.03695802409491, 37.50865005215346));
movePositionList.push(new Module.JSVector2D(127.03985503640686, 37.50816724210336));
movePositionList.push(new Module.JSVector2D(127.03711645791172, 37.50779863443866));
movePositionList.push(new Module.JSVector2D(127.03978095384555, 37.50738212410067));
// Set auto-move for excavation
Module.getTransparency().setAutoMove(movePositionList, 5);

setDepth(depth)

터파기 높이를 설정합니다.

높이는 지상 기준이 아닌 지하 기준입니다.

Name
Type
Description

depth

number

터파기 높이 설정 (meters 단위).

  • Sample

    • function createTransparency 참조.

Module.getTransparency().setDepth(5.5);

setRadius(radius)

원형 터파기 반경을 설정합니다.

Name
Type
Description

radius

number

터파기 반경 (meters 단위).

  • Sample

    • function setTransparencyRadius 참조.

Module.getTransparency().setRadius(500.0);

setTexture(data, width, height, type) → boolean

터파기 구성하는 면에 이미지를 설정합니다.

data 변수는 Uint8Array 기반의 바이너리 배열 데이터.

Name
Type
Description

data

object

이미지 데이터.

width

number

이미지 너비.

height

number

이미지 높이.

type

boolean

true: 터파기 측면에 적용. false: 터파기 바닥면에 적용.

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

  • Sample

    • function setTransparencyTexture 참조.

var img = new Image();
// Load texture image
img.onload = function () {
    var canvas = document.createElement("canvas");
    canvas.width = img.width;
    canvas.height = img.height;
    var ctx = canvas.getContext("2d");
    ctx.drawImage(img, 0, 0);
    var imageSize = new Module.JSSize2D(img.width, img.height);
    var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height).data;
    // Set excavation texture
    var transparency = Module.getTransparency();
    transparency.setTexture(imageData, canvas.width, canvas.height, true); // floor texture
    transparency.setTexture(imageData, canvas.width, canvas.height, false); // wall texture
};
img.src = "./image/FaceImage.jpg";

startAutoMove() → boolean

등록된 경로로 터파기 자동 이동을 실행합니다.

  • Return

    • true: 동작 성공.

    • false: 동작 실패.

  • Sample

    • function startTransparencyAutoMove 참조.

Module.getTransparency().startAutoMove();

stopAutoMove()

자동 이동 중인 터피가 경로 애니메이션을 종료합니다.

  • Sample

    • function stopTransparencyAutoMove 참조.

Module.getTransparency().stopAutoMove();

입력 변수값(coordinates)은 (, , ...) 이동 좌표 목록으로 구성됩니다.

JSVector3D
JSVector3D
Sandbox_Creating Excavation
JSVector2D
JSVector2D
Sandbox_Moving Excavation
Sandbox_Setting Excavation Depth
Sandbox_Setting Excavation Radius
Sandbox_Excavation Texture
Sandbox_Moving Excavation
Sandbox_Moving Excavation
JSVec3Array
JSVec2Array