Name | Type | Description |
---|---|---|
viewer |
DitapViewer | 사용할 Ditap Viewer 인스턴스. The DitapViewer instance to use. |
Example:
// 샌드캐슬 예제 'DiTAP - Split' 참조
const viewer = new Ditap.DitapViewer("ditapContainer", {
baseLayerPicker: true,
});
// InteractionSplit 생성
const interactionSplit = new Ditap.InteractionSplit(viewer);
// interactionSplit handler 실행 버튼
Sandcastle.addToolbarButton("Split On", async () => {
// interactionSplit handler 실행
interactionSplit.on(viewer);
// AnalysisSplit 인스턴스 생성
const analysisSplit = interactionSplit.analysisSplit;
// 뷰어에 추가할 데이터 생성
// 1. 정사영상
// 정사영상 인스턴스 생성
const imagery = new Ditap.NationwideOrthoImageryProvider();
// 2. 모델
// 모델 좌표
const modelPosition = new Ditap.Cartesian3.fromDegrees(
126.9782349646649,
37.56671536989183,
100
);
// 모델 행렬 생성
const modelMatrix = Ditap.Transforms.eastNorthUpToFixedFrame(
modelPosition
);
// 모델 인스턴스 생성
const model = await Ditap.Model.fromGltfAsync({
id: "model_01",
url: "../../SampleData/models/GroundVehicle/GroundVehicle.glb",
modelMatrix: modelMatrix,
minimumPixelSize: 128,
});
// 분할된 뷰어에 생성된 인스턴스 추가
// 우측 분할 뷰어에 정사영상 추가
const rightImagery = analysisSplit.addImagery(
Ditap.SplitDirection.RIGHT,
imagery
);
// 좌측 분할 뷰어에 모델 추가
const leftModel = analysisSplit.addModel(
Ditap.SplitDirection.LEFT,
model
);
// 모델 위치로 카메라 이동
viewer.camera.flyTo({
destination: Ditap.Cartesian3.fromDegrees(
126.9782349646649,
37.5645,
150
),
duration: 2,
orientation: {
heading: Ditap.Math.toRadians(0),
pitch: Ditap.Math.toRadians(-10),
roll: 0,
},
});
});
// interactionSplit handler 종료 버튼
Sandcastle.addToolbarButton("Split Off", () => {
// interactionSplit handler 종료
// interactionSplit.off() - 모든 분할 뷰어에 생성된 객체가 제거됩니다.
// interactionSplit.off(Ditap.SplitDirection.LEFT) - 좌측 분할 뷰어에 생성된 객체가 유지됩니다.
// interactionSplit.off(Ditap.SplitDirection.RIGHT) - 우측 분할 뷰어에 생성된 객체가 유지됩니다.
// interactionSplit.off(Ditap.SplitDirection.BOTH) - 좌측, 우측 모든 분할 뷰어에 생성된 객체가 유지됩니다.
interactionSplit.off();
});
Members
좌측 DitapViewer에 생성된 이미지 배열.
Array of Imagery created in the left DitapViewer.
Array of Imagery created in the left DitapViewer.
좌측 DitapViewer에 생성된 모델 배열.
Array of Model created in the left DitapViewer.
Array of Model created in the left DitapViewer.
좌측 DitapViewer에 생성된 타일셋 배열.
Array of tilesets created in the left DitapViewer
Array of tilesets created in the left DitapViewer
우측 DitapViewer에 생성된 이미지 배열.
Array of Imagery created in the right DitapViewer.
Array of Imagery created in the right DitapViewer.
우측 DitapViewer에 생성된 모델 배열.
Array of Model created in the right DitapViewer.
Array of Model created in the right DitapViewer.
우측 DitapViewer에 생성된 타일셋 배열.
Array of tilesets created in the right DitapViewer.
Array of tilesets created in the right DitapViewer.
viewer : DitapViewer
사용할 Ditap Viewer 인스턴스.
The DitapViewer instance to use.
Methods
DitapViewer에 이미지 추가.
Add Imagery to viewer.
Add Imagery to viewer.
Name | Type | Description |
---|---|---|
type |
SplitDirection |
추가할 뷰어 방향. Split direction of DitapViewer. |
ortho |
ImageryProvider |
추가할 이미지. The Imagery to add. |
Returns:
생성된 프리미티브.
Imagery added to the DitapViewer.
Imagery added to the DitapViewer.
DitapViewer에 모델 추가.
Add Model to viewer.
Add Model to viewer.
Name | Type | Description |
---|---|---|
type |
SplitDirection |
추가할 뷰어 방향. Split direction of DitapViewer. |
model |
Model |
추가할 모델. The Model to add |
Returns:
생성된 프리미티브.
Primitives added to the DitapViewer.
Primitives added to the DitapViewer.
DitapViewer에 타일셋 추가.
Add tileset to viewer.
Add tileset to viewer.
Name | Type | Description |
---|---|---|
type |
SplitDirection |
추가할 뷰어 방향. Split direction of DitapViewer. |
tileset |
Cesium3DTileset |
추가할 타일셋. The tileset to add. |
Returns:
생성된 프리미티브.
Primitives added to the DitapViewer.
Primitives added to the DitapViewer.
분할 슬라이더 제거.
Exit the AnalysisSplit
Exit the AnalysisSplit
Name | Type | Description |
---|---|---|
splitDirection |
SplitDirection |
파라미터가 없을 경우, 분할 뷰어에 생성된 모든 객체가 제거됩니다.
SplitDirection 파라미터를 전달하면 해당 방향의 분할 뷰어 위치에 생성된 객체가 유지됩니다.
When no parameter is provided, all objects created within the split viewer will be removed. Passing the SplitDirection parameter will maintain the objects created at the position of the split viewer in the specified direction. |
분할 슬라이더 실행.
Running the AnalysisSplit
Running the AnalysisSplit
DitapViewer에 생성된 이미지 삭제.
Remove all Imagery added to the DitapViewer.
Remove all Imagery added to the DitapViewer.
Name | Type | Description |
---|---|---|
type |
SplitDirection |
추가할 뷰어 방향. Split direction of DitapViewer. |
DitapViewer에 생성된 모델 삭제.
Remove all models added to the DitapViewer.
Remove all models added to the DitapViewer.
Name | Type | Description |
---|---|---|
type |
SplitDirection |
추가할 뷰어 방향. Split direction of DitapViewer. |
DitapViewer에 생성된 모든 분할 객체 삭제.
Remove All split object added to the DitapViewer.
Remove All split object added to the DitapViewer.
DitapViewer에 생성된 타일셋 삭제.
Remove all tilesets added to the DitapViewer.
Remove all tilesets added to the DitapViewer.
Name | Type | Description |
---|---|---|
type |
SplitDirection |
추가할 뷰어 방향. Split direction of DitapViewer. |
DitapViewer에 생성된 이미지 삭제.
Remove Imageries added to the DitapViewer.
Remove Imageries added to the DitapViewer.
Name | Type | Description |
---|---|---|
imageries |
Array.<ImageryProvider> |
삭제할 이미지 배열. The Imageries to remove. |
DitapViewer에 생성된 프리미티브 삭제.
Remove primitieves added to the DitapViewer.
Remove primitieves added to the DitapViewer.
Name | Type | Description |
---|---|---|
primitives |
Array.<Primitive> |
삭제할 프리미티브 배열. The primitives to remove. |