fix HQ-Splats; fix single value attributes(intensity, classification) in 2d profile
This commit is contained in:
parent
36e832a51c
commit
25b8ae85da
@ -233,7 +233,7 @@ Potree.ProfileRequest = function(pointcloud, profile, maxDepth, callback){
|
||||
}else{
|
||||
var values = geometry.attributes[property];
|
||||
if(values.itemSize === 1){
|
||||
segment.points[property].push(values.array[i + j]);
|
||||
segment.points[property].push(values.array[i]);
|
||||
}else{
|
||||
var value = [];
|
||||
for(var j = 0; j < values.itemSize; j++){
|
||||
|
||||
@ -130,6 +130,8 @@ Potree.Viewer.Profile = function(viewer, element){
|
||||
d.intensity = points.intensity ? 'rgb(' + points.intensity[j] + '%,' + points.intensity[j] + '%,' + points.intensity[j] + '%)' : 'rgb(0,0,0)';
|
||||
d.intensityCode = points.intensity ? points.intensity[j] : 0;
|
||||
d.classificationCode = points.classification ? points.classification[j] : 0;
|
||||
d.returnNumber = points.returnNumber[j];
|
||||
d.numberOfReturns = points.numberOfReturns[j];
|
||||
data.push(d);
|
||||
}
|
||||
}
|
||||
@ -249,6 +251,21 @@ Potree.Viewer.Profile = function(viewer, element){
|
||||
return 'rgb(255,255,255)';
|
||||
}
|
||||
} else if (material === Potree.PointColorType.HEIGHT) {
|
||||
return d.heightColor;
|
||||
} else if (material === Potree.PointColorType.RETURN_NUMBER) {
|
||||
|
||||
if(d.numberOfReturns === 1){
|
||||
return 'rgb(255, 255, 0)';
|
||||
}else{
|
||||
if(d.returnNumber === 1){
|
||||
return 'rgb(255, 0, 0)';
|
||||
}else if(d.returnNumber === d.numberOfReturns){
|
||||
return 'rgb(0, 0, 255)';
|
||||
}else{
|
||||
return 'rgb(0, 255, 0)';
|
||||
}
|
||||
}
|
||||
|
||||
return d.heightColor;
|
||||
} else {
|
||||
return d.color;
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
<option>Squares</option>
|
||||
<option>Circles</option>
|
||||
<option>Interpolation</option>
|
||||
<option>HQ-Splats</option>
|
||||
<option value="Splats">HQ-Splats</option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li>Height Range: <span id="lblHeightRange"></span> <div id="sldHeightRange"></div> </li>
|
||||
<li>Elevation Range: <span id="lblHeightRange"></span> <div id="sldHeightRange"></div> </li>
|
||||
|
||||
</ul>
|
||||
<!--<ul id="materialList" class="pv-menu-list"></ul>-->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user