1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- //CLASS: 显示图像类。
- function Wall(points, image) {
- Geometry.apply(this, arguments);
- this.points = points;
- this.image=image;
-
- this.disappearPointIndex=-1;
- //0表示闭合,1表示不闭合
- this.state=0;
- //1表示墙,2表示隔断
- this.wallType=1;
- //
- this.main=false;
- //对应三维部分的floor
- this.floorId=null;
- //交点,除去原生的
- //border,wallId,point,startIndex,endIndex;
- this.joins=[];
- /*
- this.inside=[];
- this.outside=[];
- //每块墙的高度
- this.height=[];
- //每块墙的厚度
- this.thick=[];
- //每块墙的测量距离
- this.measuredistance=[];
- */
-
- //每堵墙的信息
- //里面的元素是json格式: border1:,border2:,height:,thick:,measuredistance:
- this.wallInfo=[];
-
- this.initWall();
- };
- Wall.prototype.SetImage = function(image)
- {
- if(typeof image == Image) {
- this.useUrl = false;
- this.image = image;
- }
- else {
- this.useUrl = true;
- this.image = image;
- }
- };
- Wall.prototype = new Geometry();
- Wall.prototype.geoType = "Wall";
- Wall.prototype.initWall = function(){
-
- for(var i=0;i<this.points.length;++i)
- {
- this.wallInfo[i]={};
- this.wallInfo[i].height=layer.parameter.wallHeight;
- if(this.wallType==1)
- {
- this.wallInfo[i].thick=layer.parameter.wallThickness;
- this.wallInfo[i].measuredistance=layer.parameter.wallThickness/2;
- }
- else
- {
- this.wallInfo[i].thick=layer.parameter.partitionThickness;
- this.wallInfo[i].measuredistance=layer.parameter.partitionThickness/2;
- }
- }
- };
|