# TriangulationTool

#### new Cesium.TriangulationTool(viewer, options)
MapGIS/Measure/TriangulationTool.js 65

三角测量

Name | Type | Description
--- | --- | ---
`viewer` | Object | 视图

`options`

Object

包含以下属性的对象

Name | Type | Default | Description
--- | --- | --- | ---
`callBack` | Boolean | `function(){}` | optional 回调函数
`disableDepthTestDistance` | Number | `Number.POSITIVE_INFINITY` | optional 只要小于这个距离深度检测就会失效，就会一直显示在最前面 不会被遮挡
`lineColor` | Color |  | optional 线颜色
`pointColor` | Color |  | optional 点颜色
`lineMaterial` | Material |  | optional 线材质

Author:
  - 韩彦生

##### Example:

    function callBack(arg){
       }
      var triangulationTool = new Cesium.TriangulationTool(viewer,{callBack:callBack});
      triangulationTool.startTool();  //开始测量
      //triangulationTool.stopTool(); //结束测量
    scene.camera.enableTerrainAdjustmentWhenLoading = false;

### Members

#### depthTestAgainstTerrain
MapGIS/Measure/TriangulationTool.js 451

是否开启深度检测 遮挡效果

#### horizontalDiatance
MapGIS/Measure/TriangulationTool.js 487

水平距离

#### rightClickReBegin
MapGIS/Measure/TriangulationTool.js 439

右键是否继续重新

#### slantDiatance
MapGIS/Measure/TriangulationTool.js 475

直线距离

#### verticalDiatance
MapGIS/Measure/TriangulationTool.js 463

高差

### Methods

#### calculateByTwoPoints(startPoint, endPoint)
MapGIS/Measure/TriangulationTool.js 502

计算两点之间的高程差

Name | Type | Description
--- | --- | ---
`startPoint` | Object | 起始点
`endPoint` | Object | 终止点

#### startTool()
MapGIS/Measure/TriangulationTool.js 384

开始测量

#### stopTool()
MapGIS/Measure/TriangulationTool.js 407

结束测量