GeOnDT GeOnDT for JS

Class: U3dCustomModel

Object. U3dCustomModel

사용자 건물(CustomModel) 모델 관련 클래스

new U3dCustomModel(opt)

사용자 건물(CustomModel) 모델 관련 클래스

Name Type Description
opt object

생성자 옵션

Name Type Default Description
name string Guid() optional

사용자 건물 이름

shape Shape

사용자 건물 밑면 shape

drawarg UDrawArg

사용자 건물 drawarg

extrudeheight number

건물 모델 Mesh 높이

zoffset number optional

해발고도 절대값. 모델 높이에 더하는 보정값.

center WorldPositionVector3 optional

사용자 건물 가운데 점 좌표 (월드 좌표, EPSG:3857)

usebox boolean false optional

BoundingBox 사용여부

vertex Array.<WorldPosition>

사용자 건물 3D 월드 좌표 리스트

points Array.<GeoPosition>

사용자 건물 위경도 좌표 리스트

style object optional

사용자 건물 스타일

Name Type Default Description
color Color 0x3399CC optional

건물 색상

side number THREE.FrontSide optional

렌더링 될 면 THREE.FrontSide=0(앞면) THREE.BackSide=1(뒷면) THREE.DoubleSide=2(양면)

opacity number 1 optional

건물 투명도

transparent boolean false optional

건물 투명도 적용 여부

textureUrl array optional

사용자 건물 텍스처 URL 리스트

textureVisible boolean false optional

사용자 건물 텍스처 가시화 여부

floorHeight number 3.3 optional

사용자 건물 한 층당 높이

labeltext string "" optional

건물 라벨 Text

landarea number optional

사용자 건물 대지면적 (건물을 지을 수 있도록 허가된 땅의 넓이)

floorarearatio number optional

사용자 건물 용적률 (연면적/대지면적 X 100)

buildingcoverageratio number optional

사용자 건물 건폐율 (건축면적/대지면적 X 100)

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) 리스트

모델의 색상을 반환하는 함수

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
color ColorRepresentation

모델 색상

setHeight(height)

모델의 높이를 설정하는 함수

Name Type Description
height number

모델의 높이

setLabelText(labelText)

사용자 건물 모델의 라벨을 설정하는 함수

Name Type Description
labelText string

라벨 텍스트

setLandHeight(landHeight)

모델의 지상높이를 설정하는 함수
(지상높이는 지면에 붙어있을 경우 0)

Name Type Description
landHeight number

지상높이

setName(name)

모델의 이름을 설정하는 함수

Name Type Description
name string

모델이름

setOpacity(opacity)

모델의 투명도를 설정하는 함수

Name Type Description
opacity number

모델 투명도 (0~1)

setPosition(position)

모델 좌표를 설정하는 함수

Name Type Description
position WorldPosition

3차원 좌표

setRotate(rotate)

모델을 회전시키는 함수

Name Type Description
rotate Vector3

회전값(˚)

Name Type Description
x number

x축 회전값

y number

y축 회전값

z number

z축 회전값

setScale(scale)

모델을 확대 또는 축소하는 함수

Name Type Description
scale Vector3

크기값

Name Type Description
x number

x축 크기값

y number

y축 크기값

z number

z축 크기값

setStyle(style)

모델의 스타일을 설정하는 함수

Name Type Description
style object

스타일 옵션

Name Type Description
color string

색상 문자열(RGB 또는 HEX)

metalness number

금속성 (높을수록 금속재질 강도 상승)

roughness number

표면 거칠기(높을수록 반사광 강도 저하)

opacity number

투명도

transparent boolean

투명도 설정 여부

setTexture(textureUrl)

모델의 텍스쳐을 설정하는 함수

Name Type Description
textureUrl string

텍스쳐를 불러올수 있는 url

show()

모델 가시화 함수

showBox()

해당 모델의 영역 가이드(boxHelper)를 가시화하는 함수

showLabel(show)

모델의 라벨을 On/Off 하는 함수

Name Type Default Description
show boolean true optional

라벨 가시화 여부

updateHeight()

모델의 높이를 지형 정보에 따라 갱신하는 함수