new U3dCustomModel(opt)
사용자 건물(CustomModel) 모델 관련 클래스
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opt |
object |
생성자 옵션
|
- See:
-
- GeOnDT.analysis.UAnalyCustomModel
Example
var custom = new GeOnDT.object.U3dCustomModel({
name: "Custom1",
extrudeheight: 50,
zoffset: 5,
labeltext: "편집지형1",
shape: new THREE.Shape(),
drawarg: drawArg,
buildingarea: 2318.6754120187584
vertex: [
{x: -211946.4565308597, y: 103316.36033566981, z: 15.000000000000014, isVector3: true},
{x: -211955.36906110903, y: 103270.76752662908, z: 14, isVector3: true},
{x: -211846.47066378364, y: 103314.50966402487, z: 9.846043358071782, isVector3: true}
],
points: [
{x: 126.93998060239859, y: 37.519023373269626, z: 15.000000000000014},
{x: 126.93988178771733, y: 37.518610122227656, z: 14},
{x: 126.94112146280959, y: 37.51900912327179, z: 9.846043358071782}
]
});
Methods
-
dispose()
-
사용자 건물을 처분(dispose)하는 함수
-
getAreaValue()object
-
해당 모델의 영역 정보(건축면적, 대지면적 등...)를 반환하는 함수
Returns:
Type Description object 모델이 포함하고 있는 영역 정보 Example
return { floor: 건물 높이, landArea: 대지면적, totalArea: 연면적, floorAreaRatio: 건물 용적률, buildingArea: 건축면적, buildingCoverageRatio:건물 건폐율 } -
getBottomShapeVertex()Array
-
모델의 바닥 정점(vertex) 리스트를 반환하는 함수
Returns:
Type Description Array 모델 바닥 정점(vertex) 리스트 -
getColor()ColorRepresentation
-
모델의 색상을 반환하는 함수
Returns:
Type Description ColorRepresentation 모델의 색상 -
getHeight()number
-
모델의 높이를 반환하는 함수
Returns:
Type Description number 모델의 높이 -
getLabelText()string
-
모델의 라벨 텍스트를 반환하는 함수
Returns:
Type Description string 라벨 텍스트 -
getLandHeight()number
-
모델의 지상높이를 반환하는 함수
(지상높이는 지면에 붙어있을 경우 0)Returns:
Type Description number 모델의 지상높이 -
getMesh()Object3D
-
모델 object의 Mesh를 반환하는 함수
Returns:
Type Description Object3D 모델 object의 Mesh -
getName()string
-
모델의 이름을 반환하는 함수
Returns:
Type Description string 모델의 이름 -
getOpacity()number
-
모델의 투명도를 반환하는 함수
Returns:
Type Description number 모델의 투명도 -
getParameter()object
-
모델의 생성 Parameter를 반환하는 함수
Returns:
Type Description object 모델 생성 Parameter Example
Parameter { center : {x: -211875.2421875, y: 103287.8515625, z: 27.40543608830194, isVector3: true}, extrudeheight : 33, labeltext : "3", landHeight : 0, modeltype : "extrude", name : "model1", position : {x: -211875.2421875, y: 103287.8515625, z: 27.40543608830194}, rotation : {x: 0, y: 0, z: 0}, scale : {x: 1, y: 1, z: 1}, style : { color : "#fff000", opacity : 1 }, textureUrl : "../image/building1", version : "1.2", vertex : [13.22, 3.45, 0 .... ] } -
getUid()string
-
모델의 Uid 반환 함수
Returns:
Type Description string 모델의 Uid -
hide()
-
모델 비가시화(hide) 함수
-
hideBox()
-
모델의 영역 가이드를(boxHelper) 제거하는 함수
-
removeTexture()
-
모델의 텍스쳐을 제거하는 함수
-
setColor(color)
-
모델의 색상을 설정하는 함수
Name Type Description colorColorRepresentation 모델 색상
-
setHeight(height)
-
모델의 높이를 설정하는 함수
Name Type Description heightnumber 모델의 높이
-
setLabelText(labelText)
-
사용자 건물 모델의 라벨을 설정하는 함수
Name Type Description labelTextstring 라벨 텍스트
-
setLandHeight(landHeight)
-
모델의 지상높이를 설정하는 함수
(지상높이는 지면에 붙어있을 경우 0)Name Type Description landHeightnumber 지상높이
-
setName(name)
-
모델의 이름을 설정하는 함수
Name Type Description namestring 모델이름
-
setOpacity(opacity)
-
모델의 투명도를 설정하는 함수
Name Type Description opacitynumber 모델 투명도 (0~1)
-
setPosition(position)
-
모델 좌표를 설정하는 함수
Name Type Description positionWorldPosition 3차원 좌표
-
setRotate(rotate)
-
모델을 회전시키는 함수
Name Type Description rotateVector3 회전값(˚)
Name Type Description xnumber x축 회전값
ynumber y축 회전값
znumber z축 회전값
-
setScale(scale)
-
모델을 확대 또는 축소하는 함수
Name Type Description scaleVector3 크기값
Name Type Description xnumber x축 크기값
ynumber y축 크기값
znumber z축 크기값
-
setStyle(style)
-
모델의 스타일을 설정하는 함수
Name Type Description styleobject 스타일 옵션
Name Type Description colorstring 색상 문자열(RGB 또는 HEX)
metalnessnumber 금속성 (높을수록 금속재질 강도 상승)
roughnessnumber 표면 거칠기(높을수록 반사광 강도 저하)
opacitynumber 투명도
transparentboolean 투명도 설정 여부
-
setTexture(textureUrl)
-
모델의 텍스쳐을 설정하는 함수
Name Type Description textureUrlstring 텍스쳐를 불러올수 있는 url
-
show()
-
모델 가시화 함수
-
showBox()
-
해당 모델의 영역 가이드(boxHelper)를 가시화하는 함수
-
showLabel(show)
-
모델의 라벨을 On/Off 하는 함수
Name Type Default Description showboolean true optional 라벨 가시화 여부
-
updateHeight()
-
모델의 높이를 지형 정보에 따라 갱신하는 함수