Skip to content

Commit

Permalink
update to latest potree & converter
Browse files Browse the repository at this point in the history
  • Loading branch information
potree committed May 16, 2020
1 parent 922e582 commit 85a06f7
Show file tree
Hide file tree
Showing 11 changed files with 23,448 additions and 21,561 deletions.
Binary file modified libs/PotreeConverter/PotreeConverter.exe
Binary file not shown.
Binary file modified libs/PotreeConverter/laszip.dll
Binary file not shown.
44,537 changes: 22,996 additions & 21,541 deletions libs/potree/potree.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/potree/potree.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/potree/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
opacity: 0.7;
padding: 5px;
border: 1px solid white;
user-select: auto;
user-select: text;
">
position: asdsadf asdf<br>
rgb: 123 423 123
Expand Down
5 changes: 4 additions & 1 deletion libs/potree/resources/lang/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@
"perspective_camera_control": "Perspective camera",
"orthographic_camera_control": "Orthographic camera",
"navigation_cube_control": "Navigation cube",
"remove_all_clipping_volumes": "Remove all clipping volumes"
"remove_all_clipping_volumes": "Remove all clipping volumes",
"compass": "Compass",
"camera_animation": "Camera Animation"
},
"appearance": {
"nb_max_pts": "Point budget",
"point_size": "Point size",
"min_point_size": "Minimum size",
"point_opacity": "Opacity",
"field_view": "Field of view",
"point_size_type": "Point sizing",
Expand Down
90 changes: 90 additions & 0 deletions libs/potree/resources/lang/es/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"tb": {
"navigation_opt": "Navegación",
"rendering_opt": "Apariencia",
"tools_opt": "Herramientas",
"measurments_opt": "Medidas",
"clipping_opt": "Recorte",
"annotations_opt": "Anotaciones",
"materials_opt": "Materiales",
"scene_opt": "Escena",
"classification_filter_opt": "Filtro de clasificación",
"parameters_opt": "Otros ajustes",
"about_opt": "Acerca de"
},
"tt": {
"angle_measurement": "Medición de ángulos",
"point_measurement": "Medición de puntos",
"distance_measurement": "Medición de distancia",
"height_measurement": "Medición de altura",
"area_measurement": "Medición de área",
"volume_measurement": "Medición de volumen",
"height_profile": "Perfil de altura",
"clip_volume": "Clip de volumen",
"clip_polygon": "Clip poligonal",
"screen_clip_box": "Dibuje un cuadro de selección. Requiere que usted esté en modo de cámara ortográfica",
"clip_plane_x": "Plano del clip en el eje x",
"clip_plane_y": "Plano del clip en el eje y",
"clip_plane_z": "Plano del clip en el eje z",
"remove_all_measurement": "Eliminar todas las mediciones",
"left_view_control": "Vista izquierda",
"right_view_control": "Vista derecha",
"front_view_control": "Vista de frente",
"back_view_control": "Vista desde atrás",
"top_view_control": "Vista superior",
"bottom_view_control": "Vista inferior",
"focus_control": "Alcance total",
"orbit_control": "Control de órbita",
"flight_control": "Control de vuelo",
"heli_control": "Control de helicóptero",
"earth_control": "Control de la tierra",
"perspective_camera_control": "Perspectiva de la cámara",
"orthographic_camera_control": "Cámara ortográfica",
"navigation_cube_control": "Cubo de navegación",
"remove_all_clipping_volumes": "Eliminar todos los volúmenes de recorte"
},
"appearance": {
"nb_max_pts": "Presupuesto de puntos",
"point_size": "Tamaño del punto",
"point_opacity": "Opacidad",
"field_view": "Campo de visión",
"point_size_type": "Dimensionamiento de puntos",
"point_material": "Materiales",
"elevation_range": "Rango de elevación",
"point_quality": "Calidad",
"point_shape": "Forma",
"edl_radius": "Radio",
"edl_strength": "Fuerza",
"edl_enable": "Habilitar",
"min_node_size": "Tamaño de nodo mínimo",
"clip_mode": "Modo clip",
"move_speed": "Velocidad",
"skybox": "Cielo",
"bottom_lock": "Mantenerse sobre el suelo",
"box": "Caja",
"length_unit": "Unidad de longitud",
"freeze": "Vista de bloqueo",
"language": "Lenguaje"
},
"measurements": {
"clip": "clip",
"show": "ver volumen"
},
"annotations": {
"show3D": "ver en 3D",
"showMap": "ver en mapa"
},
"profile": {
"nb_points": "Número de puntos",
"title": "Perfil de altura",
"save_las": "Guardar LAS(3D)",
"save_ortho": "Guardar CSV(2D)"
},
"scene": {
"camera_position": "Posición de la cámara",
"camera_target": "Objetuvo de la cámara"
},
"settings": {
"language": "Lenguaje"
}
}
48 changes: 38 additions & 10 deletions libs/potree/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,20 @@ <h3 id="menu_filters"><span data-i18n="tb.filters_opt"></span></h3>
</ul>
</div>

<div class="divider"><span>Point Source ID</span></div>

<div>
<ul class="pv-menu-list" id="pointsourceid_filter_panel">

</ul>
</div>

<div class="divider"><span>GPS Time</span></div>

<div id="gpstime_filter_panel">

<ul class="pv-menu-list">
<div id="gpstime_multilevel_range_container">
<li>Range: <span id="lblGpsTimeL0"></span> <div id="sldGpsTimeL0"></div></li>
<li>Range: <span id="lblGpsTimeL1"></span> <div id="sldGpsTimeL1"></div></li>
<li>Range: <span id="lblGpsTimeL2"></span> <div id="sldGpsTimeL2"></div></li>
<li>Range: <span id="lblGpsTimeL3"></span> <div id="sldGpsTimeL3"></div></li>

<li>
<span style="display: flex">
Expand Down Expand Up @@ -172,24 +176,48 @@ <h3 id="menu_about"><span data-i18n="tb.about_opt"></span></h3>
<li>License: <a target="_blank" href="http://potree.org/wp/potree_license/">FreeBSD (2-clause BSD)<a></li>
<li>Libraries:
<ul>
<li><a target="_blank" href="http://threejs.org/">three.js</a></li>
<li><a target="_blank" href="https://cesium.com/">Cesium</a></li>
<li><a target="_blank" href="https://d3js.org/">D3.js</a></li>
<li><a target="_blank" href="https://entwine.io/entwine-point-tile.html/">Entwine / EPT</a></li>
<li><a target="_blank" href="https://github.com/ngageoint/geopackage-js/">geopackage-js</a></li>
<li><a target="_blank" href="https://www.i18next.com/">i18next</a></li>
<li><a target="_blank" href="https://jquery.com/">Jquery</a></li>
<li><a target="_blank" href="http://www.laszip.org/">laszip</a></li>
<li><a target="_blank" href="https://github.com/verma/plasio">Plas.io (laslaz) </a></li>
<li><a target="_blank" href="https://jqueryui.com/">jQuery user interface</a></li>
<li><a target="_blank" href="https://www.jstree.com/">jstree</a></li>
<li><a target="_blank" href="https://www.clicktorelease.com/code/THREE.MeshLine/demo/index.html/">MeshLine</a></li>
<li><a target="_blank" href="http://openlayers.org/">OpenLayers3</a></li>
<li><a target="_blank" href="https://eloquentjavascript.net/1st_edition/appendix2.html/">BinaryHeap</a></li>
<li><a target="_blank" href="https://github.com/dataarts/dat.gui/">dat.gui</a></li>
<li><a target="_blank" href="https://github.com/mrdoob/stats.js/">stats.js</a></li>
<li><a target="_blank" href="https://github.com/verma/plasio">Plas.io (laslaz) </a></li>
<li><a target="_blank" href="http://proj4js.org/">proj4js</a></li>
<li><a target="_blank" href="https://github.com/mbostock/shapefile/">shapefile</a></li>
<li><a target="_blank" href="http://bgrins.github.io/spectrum/">Spectrum</a></li>
<li><a target="_blank" href="https://github.com/sql-js/sql.js/">sql.js</a></li>
<li><a target="_blank" href="http://threejs.org/">three.js</a></li>
<li><a target="_blank" href="https://github.com/tweenjs/tween.js/">tween</a></li>
<li><a target="_blank" href="https://github.com/i18next/i18next/">i18next</a></li>
<li><a target="_blank" href="http://www.laszip.org/">laszip</a></li>

</ul>
</li>
<li>Donators:
<ul>
<li><a target="_blank" href="http://www.ne.ch/autorites/DDTE/SGRF/SITN/Pages/accueil.aspx/">SITN</a></li>
<li><a target="_blank" href="http://www.synth3d.co/">Synth3D</a></li>
<li><a target="_blank" href="http://www.geocue.com/">GeoCue</a></li>
<li><a target="_blank" href="http://rapidlasso.com/">rapidlasso</a></li>

<li><a target="_blank" href="https://www.bart.gov/">BART</a></li>

<li><a target="_blank" href="https://georepublic.info/en/">georepublic</a></li>
<li><a target="_blank" href="http://sitn.ne.ch/">sitn</a></li>

<li><a target="_blank" href="http://www.helimap.com">Helimap</a></li>
<li><a target="_blank" href="http://www.vevey.ch">Vevey</a></li>
<li><a target="_blank" href="https://www.yverdon-les-bains.ch">Yverdon-les-Bains</a></li>
<li><a target="_blank" href="http://archpro.lbg.ac.at/">LBI ArchPro</a></li>
<li><a target="_blank" href="http://www.kts.co.jp/">KTS</a></li>
<li><a target="_blank" href="http://www.veesus.com/veesus/index.php">Veesus</a></li>
<li><a target="_blank" href="http://sigeom.ch/">sigeom sa</a></li>
<li><a target="_blank" href="http://archpro.lbg.ac.at/">LBI ArchPro</a></li>
</ul>
</li>
<li>Credits:
Expand Down
81 changes: 76 additions & 5 deletions libs/potree/workers/BinaryDecoderWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ for (let obj in PointAttributeTypes) {
i++;
}


class PointAttribute{

constructor(name, type, numElements){
Expand All @@ -76,7 +77,6 @@ class PointAttribute{
}

}

PointAttribute.POSITION_CARTESIAN = new PointAttribute(
"POSITION_CARTESIAN", PointAttributeTypes.DATA_TYPE_FLOAT, 3);

Expand Down Expand Up @@ -135,6 +135,7 @@ function CustomView (buffer) {
let tmpf = new Float32Array(tmp);
let tmpd = new Float64Array(tmp);
let tmpu8 = new Uint8Array(tmp);

this.getUint32 = function (i) {
return (this.u8[i + 3] << 24) | (this.u8[i + 2] << 16) | (this.u8[i + 1] << 8) | this.u8[i];
};
Expand Down Expand Up @@ -170,6 +171,19 @@ function CustomView (buffer) {
};
}

const typedArrayMapping = {
"int8": Int8Array,
"int16": Int16Array,
"int32": Int32Array,
"int64": Float64Array,
"uint8": Uint8Array,
"uint16": Uint16Array,
"uint32": Uint32Array,
"uint64": Float64Array,
"float": Float32Array,
"double": Float64Array,
};

Potree = {};

onmessage = function (event) {
Expand Down Expand Up @@ -231,7 +245,7 @@ onmessage = function (event) {
}

attributeBuffers[pointAttribute.name] = { buffer: buff, attribute: pointAttribute };
} else if (pointAttribute.name === "RGBA") {
} else if (pointAttribute.name === "rgba") {
let buff = new ArrayBuffer(numPoints * 4);
let colors = new Uint8Array(buff);

Expand Down Expand Up @@ -326,6 +340,9 @@ onmessage = function (event) {
let buff = new ArrayBuffer(numPoints * 4);
let f32 = new Float32Array(buff);

let TypedArray = typedArrayMapping[pointAttribute.type.name];
preciseBuffer = new TypedArray(numPoints);

let [min, max] = [Infinity, -Infinity];
let [offset, scale] = [0, 1];

Expand Down Expand Up @@ -354,10 +371,19 @@ onmessage = function (event) {
}
}

offset = min;
scale = 1 / (max - min);


if(pointAttribute.initialRange != null){
offset = pointAttribute.initialRange[0];
scale = 1 / (pointAttribute.initialRange[1] - pointAttribute.initialRange[0]);
}else {
offset = min;
scale = 1 / (max - min);
}
}



for(let j = 0; j < numPoints; j++){
let value = getter(inOffset + j * pointAttributes.byteSize);

Expand All @@ -367,12 +393,14 @@ onmessage = function (event) {
}

f32[j] = (value - offset) * scale;
preciseBuffer[j] = value;
}

pointAttribute.range = [min, max];

attributeBuffers[pointAttribute.name] = {
buffer: buff,
buffer: buff,
preciseBuffer: preciseBuffer,
attribute: pointAttribute,
offset: offset,
scale: scale,
Expand All @@ -393,6 +421,49 @@ onmessage = function (event) {
attributeBuffers["INDICES"] = { buffer: buff, attribute: PointAttribute.INDICES };
}

{ // handle attribute vectors



let vectors = pointAttributes.vectors;

for(let vector of vectors){

let {name, attributes} = vector;
let numVectorElements = attributes.length;
let buffer = new ArrayBuffer(numVectorElements * numPoints * 4);
let f32 = new Float32Array(buffer);

let iElement = 0;
for(let sourceName of attributes){
let sourceBuffer = attributeBuffers[sourceName];
let {offset, scale} = sourceBuffer;
let cv = new CustomView(sourceBuffer.buffer);

const getter = cv.getFloat32.bind(cv);

for(let j = 0; j < numPoints; j++){
let value = getter(j * 4);

f32[j * numVectorElements + iElement] = (value / scale) + offset;
}

iElement++;
}

let vecAttribute = new PointAttribute(name, PointAttributeTypes.DATA_TYPE_FLOAT, 3);

attributeBuffers[name] = {
buffer: buffer,
attribute: vecAttribute,
// offset: offset,
// scale: scale,
};

}

}

performance.mark("binary-decoder-end");

// { // print timings
Expand Down
Loading

0 comments on commit 85a06f7

Please sign in to comment.