LinestringEntity

선 엔티티 표시 클래스.
Linestring entity display class.

new Ditap.LinestringEntity(viewer, position)

Name Type Description
viewer DitapViewer 사용할 Ditap Viewer 인스턴스.
The DitapViewer instance to use.
position Array.<Cartesian3> optional 선 생성을 위한 Cartesian 좌표.
Cartesian coordinates for line creation.
Example:
// 샌드캐슬 예제 'DiTAP - Linestring Entity' 참조

const viewer = new DitapViewer("ditapContainer");

// 1. 위치 지정 없이 객체 생성. (InteractionLinestringEntity를 통해 선 엔티티 표시.)
const LinestringEntity = new Ditap.LinestringEntity(viewer);

const InteractionLinestringEntity = new Ditap.InteractionLinestringEntity();
InteractionLinestringEntity.LinestringEntity = LinestringEntity;

// 2. 위치 지정하여 인스턴스 생성. (InteractionLinestringEntity 통한 수정 불가.)
const position1 = new Ditap.Cartesian3.fromDegrees(
 126.97759025002786,
 37.56679755138474
);
const position2 = new Ditap.Cartesian3.fromDegrees(
 126.97764810657144,
 37.566518888624664
);

const LinestringEntity = new Ditap.LinestringEntity(viewer, [position1, position2]);

Members

readonly pointEntities : Array.<Entity>

선 생성으로 얻은 포인트 엔티티 배열.
Array of point entities obtained by line creation.

readonly polylineEntity : Entity

선 생성으로 얻은 polyline Entity.
Polyline entities obtained by line creation.

readonly positions : Array.<Cartesian3>

선 생성 할 Cartesian 배열
Cartesian array for create LineEntity.

viewer : DitapViewer

사용할 Ditap Viewer 인스턴스.
The DitapViewer instance to use.

Methods

computeBoundingSphere(time)BoundingSphere|undefined

지정된 시간에 엔티티에 대한 BoundingSphere 계산.
Calculate BoundingSphere for an entity at a given time.
Name Type Default Description
time JulianDate JulianDate optional time 모델 BoundingSphere를 검색하는 시간.
The time to retrieve model BoundingSphere for.
Returns:
Model BoundingSphere.
Model BoundingSphere.

computeModelMatrix(time)Matrix4|undefined

지정된 시간에 엔티티 변환에 대한 모델 행렬 계산.
Compute model matrix for entity transformation at specified time.
Name Type Default Description
time JulianDate JulianDate optional time 모델 행렬을 검색하는 시간.
The time to retrieve model matrix for.
Returns:
모델 행렬.
Model matrix.

computePositions(time)positions|undefined

지정된 시간에 엔티티에 대한 positions 계산.
Calculate positions for an entity at a given time.
Name Type Default Description
time JulianDate JulianDate optional time 모델 positions를 검색하는 시간.
The time to retrieve model positions for.
Returns:
Model positions.
Model positions.

destroy()

인스턴스 파괴. 영구적으로 제거하는 경우 호출.
Destroys the instance. Should be called if permanently removing the instance from layout.

reset()

인스턴스 설정 값 초기화.
Initializing instance settings.