CmWorld Home Return

지도응용

CmWorld 지도

Vworld 지도

3D 벡터

이미지 적용

극점 그리기

그래픽을 사용한 등고선

등고선

건물 용적률 계산

광원

광원 기준점

태양의 움직임

서치라이트

지오메트리

전광판

이미지 추가

모형 추가

3차원 입체격자

입체격자 컨셉트

입체격자 적용예

입체격자 디테일

지하공간

벡터형상

시각정보

3D 입체효과

건불정보

드론 비행

특정위치로 이동

지하지형물 확인하기

1인칭 시점

공간분석

침수지역 예측

적성 토량 예측

Sample 3차원 입체격자 벡터형상

벡터형상

3D 입체격자를 사용한 벡터 형상을 지원합니다.

CmWorld3 Sample

JS SCRIPT



setClipState = function (obj, enabled)
{
	if (obj)
	{
		if (obj instanceof THREE.Object3D)
		{
			obj.traverse(function (child)
			{
				if (child instanceof THREE.Mesh)
				{
					var mat = child.material;

					mat["clipping"] = enabled;
					if (enabled == true)
					{
						mat["clippingPlanes"] = cmworld.clipBox.localPlanes;
						mat["clipIntersection"] = cmworld.clipBox.clipIntersection;
					}
					else
					{
						mat["clippingPlanes"] = cmworld.clipBox.hidePlanes;
						mat["clipIntersection"] = cmworld.clipBox.clipIntersection;
					}

					mat.needsUpdate = true;
					child.needsUpdate = true;
				}
			});
		}
	}
}

onupdateobject = function (userObject, deltatime) {
    var pt = userObject.getPosition();
    $("#txtLabel").text("좌표: (" + pt.x.toFixed(6) + ", " + pt.y.toFixed(6) + ", " + pt.z.toFixed(1) + ")");
}

createCube3DLayer2 = function ()
{
	flyCubeLayer = cmworld.addCube3DLayer("fly", "http://demo.cmworld.net/cube3d/cbr_vector/{z}/{y}/{x}/{y}_{x}_{f}.cbr", 0, 16, -10, 10000, 4194304, "vector", "cbr");

	flyCubeLayer.renderFrame = true;
	flyCubeLayer.renderOnlyFrame = false;

	// 사용자 객체를 만들자
	var geo = new THREE.SphereGeometry(1);
	var material = new THREE.MeshBasicMaterial({ color: 0xff0000 });
	var mesh = new THREE.Mesh(geo, material);

          flycenter = new CMWORLD.UserObject("fly", mesh, new THREE.Vector3(127.02992490492944, 37.49314254229226, 10), onupdateobject );
	userLayer.add(flycenter);

	//flyCubeLayer.addTargetCamera("camera", 16, 200);
	flyCubeLayer.addTargetObject("fly", flycenter, 16, 10);

	/*
	지표 = 0

	하늘 = 1

	바다 = -2

	땅속 = 21 ~ 26
	*/

}

makeClipbox = function ()
{
	var localgeo = new THREE.BoxGeometry(100, 100, 100);
	var localmesh = new THREE.Mesh(localgeo, new THREE.MeshPhongMaterial({ color: 0xffffff, opacity: 0.2, transparent: true }));

	cmworld.clipBox.localMesh = localmesh;
	cmworld.clipBox.setLocalPosition(37.498077610324195, 127.0274561940137, 62.15379375000016);
	cmworld.clipBox.needLocalClipboxUpdate = true;
	cmworld.rootScene.add(cmworld.clipBox.localMesh);

	cmworld.clipBox.localClipboxEnabled = true;
}

checkFly = function ()
{
	if (flypass == undefined)
	{
		var pathpoints = [];

		pathpoints.push(new THREE.Vector3(127.02992490492944, 37.49314254229226, 20)),
			pathpoints.push(new THREE.Vector3(127.02945098278445, 37.49412820422488, 40)),
			pathpoints.push(new THREE.Vector3(127.02945098278445, 37.49412820422488, 80)),
			pathpoints.push(new THREE.Vector3(127.02789657061916, 37.497385165373416, 20)),
			pathpoints.push(new THREE.Vector3(127.02713379383667, 37.49716289011995, 40)),
			pathpoints.push(new THREE.Vector3(127.0281612963301, 37.49503707804059, 50)),
			pathpoints.push(new THREE.Vector3(127.0290934000677, 37.4931661423123, 30)),
			pathpoints.push(new THREE.Vector3(127.02992490492944, 37.49314254229226, 20)),

			flypass = new THREE.CatmullRomCurve3(pathpoints);
	}
}


checkAnimate = function ()
{
	if (animatepass == undefined)
	{
		var pathpoints = [];

		pathpoints.push(new THREE.Vector3(127.0274561940137, 37.498077610324195, 62.15379375000016)),
			pathpoints.push(new THREE.Vector3(127.0274561940137, 37.498077610324195, 30)),
			pathpoints.push(new THREE.Vector3(127.0274561940137, 37.498077610324195, 0)),
			pathpoints.push(new THREE.Vector3(127.0274561940137, 37.498077610324195, 50)),
			pathpoints.push(new THREE.Vector3(127.0274561940137, 37.498077610324195, 100)),
			pathpoints.push(new THREE.Vector3(127.0274561940137, 37.498077610324195, 17.770679811947048)),
			pathpoints.push(new THREE.Vector3(127.02419248142476, 37.49716467964495, 12.214464443735778)),
			pathpoints.push(new THREE.Vector3(127.0228035873738, 37.49983570161439, 12.821062065660954)),
			pathpoints.push(new THREE.Vector3(127.028660924021, 37.50111859808611, 36.06227322015911)),
			pathpoints.push(new THREE.Vector3(127.03020520787288, 37.496981317930754, 28.27079238090664)),
			pathpoints.push(new THREE.Vector3(127.02899277466136, 37.4960762939164, 18.820372722111642)),
			pathpoints.push(new THREE.Vector3(127.02726693707825, 37.494954961783975, 16.878087333403528)),
			pathpoints.push(new THREE.Vector3(127.02611874148117, 37.49615467408969, 15.145359858870506)),
			pathpoints.push(new THREE.Vector3(127.02608512216023, 37.49859802318132, 16.248056579381227)),
			pathpoints.push(new THREE.Vector3(127.02700778314758, 37.49820433203146, 17.17902781162411)),
			pathpoints.push(new THREE.Vector3(127.0274561940137, 37.498077610324195, 17.770679811947048)),

			animatepass = new THREE.CatmullRomCurve3(pathpoints);
	}
}
License지원브라우저Tel: 02-578-5101E-mail: mspyun@cmworld.co.kr

© CmWorld INC all right reserved.