57
README.md
@ -1,47 +1,50 @@
|
||||
# Potree - WebGL Pointcloud Viewer
|
||||
|
||||
# README
|
||||
|
||||
* [Getting Started](./docs/getting_started.md)
|
||||
* [Changelog](./docs/changelog.md)
|
||||
* [User Interface](./docs/user_interface.md)
|
||||
* [Converting Point Clouds](./docs/converting.md)
|
||||
* [FAQ](./docs/faq.md)
|
||||
* [Measuring](./docs/measuring.md)
|
||||
* [File Format](./docs/file_format.md)
|
||||
|
||||
## About
|
||||
|
||||
Potree is a WebGL based point cloud viewer for large datasets.
|
||||
Thanks to WebGL, it runs in all major browsers without plugins.
|
||||
Potree is a free open-source WebGL based point cloud renderer for large point clouds.
|
||||
Similar to map software like Google Maps or OpenStreeMap, only data inside the visible area and up to a certain level of detail are loaded.
|
||||
|
||||
Homepage: <a href="http://potree.org/">potree.org</a>
|
||||
<img src="http://potree.org/resources/images/pompei.jpg">
|
||||

|
||||
|
||||
## Demos
|
||||
At the moment, this project is continued as master thesis under the [Harvest4D Project](https://harvest4d.org/)
|
||||
|
||||
This video shows a point cloud of the St. Stephens Cathedral. It consists of ~700m points.
|
||||
<a href="http://www.youtube.com/watch?v=p9e6xElafJU" target="_blank"><img src="http://img.youtube.com/vi/p9e6xElafJU/0.jpg"></a>
|
||||
Newest information and work in progress is usually available on [twitter](https://twitter.com/m_schuetz)
|
||||
|
||||
Take a look at the [online showcase](http://potree.org/wp/demo/)
|
||||
General infos, downloads, showcase, etc. at [potree.org](http://potree.org/)
|
||||
|
||||
## Getting Started
|
||||
1. Deploy potree on a webserver.
|
||||
2. Open one of the demos in the examples directory. <br>
|
||||
Potree pages must run on a webserver so the url
|
||||
should be something like "localhost/potree/examples/lion.html". URLs starting with "file:///" will not work.
|
||||
## Downloads
|
||||
|
||||
For more details, read the [Getting Started Section](./docs/getting_started.md)
|
||||
* [PotreeConverter windows binary (2014.12.30)](http://potree.org/downloads/PotreeConverter/PotreeConverter_2014.12.30.zip)
|
||||
|
||||
## Convert Your Own Pointclouds
|
||||
Use the [PotreeConverter](https://github.com/potree/PotreeConverter) to convert your own point clouds into the potree format.
|
||||
## Showcase
|
||||
|
||||
## Changelog
|
||||
Take a look at the changelog to get an overview of new features and possible changes to the usage:
|
||||
[docs/changelog.md](./docs/changelog.md)
|
||||
Take a look at the [potree showcase](http://potree.org/wp/demo/) for some live examples.
|
||||
|
||||
## Compatibility
|
||||
|
||||
| Browser | OS | Result |
|
||||
| -------------------- |:-------:|:-------------:|
|
||||
| Chrome 32 | Win7 | works |
|
||||
| Firefox 26 | Win7 | works |
|
||||
| Opera 19 | Win7 | works |
|
||||
| Internet Explorer 11 | Win7 | technically works, if you don't expect performance |
|
||||
| Safari | Mac | works |
|
||||
| Chrome 39 | Win7 | works |
|
||||
| Firefox 34 | Win7 | works |
|
||||
| Internet Explorer 11 | Win7 | partially works; performance issues |
|
||||
| Firefox | Android | partially works, GUI and stability issues |
|
||||
| Opera | Android | partially works, GUI and stabilty issues and slow |
|
||||
|
||||
|
||||
## License
|
||||
Potree is available under the FreeBSD license.
|
||||
## Credits
|
||||
|
||||
* The multi-res-octree algorithms used by this viewer were developed at the Vienna University of Technology by Michael Wimmer and Claus Scheiblauer as part of the [Scanopy Project](http://www.cg.tuwien.ac.at/research/projects/Scanopy/).
|
||||
* [Three.js](https://github.com/mrdoob/three.js), the WebGL 3D rendering library on which potree is built.
|
||||
* [plas.io](http://plas.io/) point cloud viewer. LAS and LAZ support have been taken from the laslaz.js implementation of plas.io. Thanks to [Uday Verma](https://twitter.com/udaykverma) and [Howard Butler](https://twitter.com/howardbutler) for this!
|
||||
* [Harvest4D](https://harvest4d.org/) Potree currently runs as Master Thesis under the Harvest4D Project
|
||||
* [Martin Isenburg](http://rapidlasso.com/), [Georepublic](http://georepublic.de/en/), [Sigeom Sa](http://www.sigeom.ch/), [SITN](http://www.ne.ch/sitn), [Pix4D](http://pix4d.com/) as well as all the contributers to potree and PotreeConverter and many more for their support.
|
||||
|
||||
2801
build/js/potree.js
7
build/js/potree.min.js
vendored
@ -1,14 +1,35 @@
|
||||
|
||||
|
||||
## 2014.30.12
|
||||
|
||||
### features
|
||||
* Rebuild the profile tool to behave more like the distant measure tool.
|
||||
Visible points inside the profile can be retrieved with
|
||||
```
|
||||
var points = pointcloud.getPointsInProfile(profileTool.profiles[0], maxOctreeDepth);
|
||||
```
|
||||
|
||||
* Added clip modes: DISABLED, CLIP_OUTSIDE, HIGHLIGHT_INSIDE. Clip mode can be set with
|
||||
```
|
||||
pointcloud.material.clipMode = Potree.ClipMode.CLIP_OUTSIDE;
|
||||
```
|
||||
|
||||
* Added support for potree format 1.4. This format stores coordinates as integers instead of floats (for uniform precision). Additionaly, the *.bin extension has been added to all data/* files in order to avoid problems that occur with files witout extensions.
|
||||
|
||||
* Added [High Quality Splatting](http://graphics.ucsd.edu/~matthias/Papers/HighQualitySplattingOnGPUs.pdf) for screen aligned quads. See examples/viewer.html with quality set to "Splats".
|
||||
|
||||
|
||||
|
||||
|
||||
## 2014.12.17
|
||||
|
||||
### features
|
||||
* Added Area and Volume measurement tools.
|
||||
* Added Area and Volume measurement tools.
|
||||
* Made tool markers draggable.
|
||||
* See examples/viewer.js for a demo of all measurement tools. In this demo, the volume can be translated, scaled and rotated by pressing e, r and t.
|
||||
* Attenuated point sizes are differently scaled. Now, the point size specifies the radius of the point in scene coordinates.
|
||||
* Attenuated point sizes are differently scaled. Now, the point size specifies the radius of the point in scene coordinates.
|
||||
* Adaptive point sizes are differently scaled. A size of 1 means that the point size is choosen to optimaly cover holes. Due to this it is now necessary to pass the renderer to the pointcloud.update() function:
|
||||
|
||||
|
||||
```
|
||||
pointcloud.update(camera, renderer);
|
||||
```
|
||||
@ -23,13 +44,13 @@
|
||||
## 2014.12.03
|
||||
|
||||
* Made measurement tool independant of scale. Spheres and Labels are displayed at the same size regardless of the distance to the camera.
|
||||
MeasurementTool now has to be rendered using
|
||||
MeasurementTool now has to be rendered using
|
||||
```
|
||||
// render scene first, then measuring tool over the scene
|
||||
renderer.render(scene, camera);
|
||||
measuringTool.render();
|
||||
```
|
||||
|
||||
|
||||
* Support for binary files with .bin extension. Files without extension have shown to cause problems with FTP Uploaders and some WebServers.
|
||||
* Added classification, return number and point source ID to Potree.PointColorType. These color modes only work with LAS and LAZ files.
|
||||
* Replaced synchronous requests in favour of async requests.
|
||||
|
||||
46
docs/converting.md
Normal file
@ -0,0 +1,46 @@
|
||||
|
||||
# Converting Point Clouds
|
||||
|
||||
This section explains how to use the [PotreeConverter](https://github.com/potree/PotreeConverter) to convert point clouds.
|
||||
|
||||
If you want to get the best out of potree, you might want to consider following points:
|
||||
|
||||
* The resulting data/r* files should idealy be smaller than 60k poins (~1mb). Larger files will increase load times and reduce the rendering efficiency.
|
||||
* There should not be too much very small data/*r files. (like 60% files with <10kb).
|
||||
A lot of small files will result in a large amount of small nodes being rendered at run time and a large amount of small nodes can decrease performance just as much as a small amount of too large nodes. (large with respect to the amount of points they contain)
|
||||
* When using the adaptive point size mode, you might get better results if you don't try convert all points, i.e. choose a lower depth or higher spacing. This is because adaptive point size reduces the point size for each node that has been loaded but if a high level node does not have enough points to cover up for the reduced point size, holes will appear.
|
||||
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
For your first conversion, try this:
|
||||
|
||||
```
|
||||
./PotreeConverter.exe pointcloud.las -l 3 --scale 0.01
|
||||
```
|
||||
|
||||
It will create an octree hierarchy with a depth of 0-3. A higher depth will increase the amount of details but it shouldn't be set arbitrarely high. Read about the options to learn about good values.
|
||||
The scale parameter specifies the coordinate precision.
|
||||
|
||||
Somewhere in the command line you'll get this output:
|
||||
```
|
||||
spacing calculated from diagonal: 0.5
|
||||
Last level will have spacing: 0.0625
|
||||
```
|
||||
|
||||
The spacing is the distance between points, not to be confused with coordinate precision. With each level, the distance between points is halved. The final spacing at the lowest level is calculated with (spacing) / 2 ^ levels.
|
||||
In this case, points at the root level have a distance of 0.5 from each other and at the lowest level their distance is 0.0625. If the unit is meters, this means that your result will have a spacing of 6.25cm. The actual precision of the coordinates is set with the scale parameter and independant of the spacing!
|
||||
|
||||
|
||||
## Options
|
||||
|
||||
__-l (octree depth):__ Number of octree levels. Use 3 or 4 for smaller point clouds (~5m) and 8-10 for large point clouds (500m - 18b). With each level, the amount of detail increases. This option should not be set too high and may require some trial and error. __Affects the number of nodes in the output!__. Increase the octree depth to get more details and more files and vice versa. If you get too much small files, decrease this.
|
||||
|
||||
__-s (spacing):__ Distance between points at root level. At each level down the hierarchy, the spacing is halved. If this parameter is omitted, a default value is calculated from the diagonal of the bounding box. __Affects the file size of the nodes in the output!__ Lower the spacing to get larger files with more points and vice versa.
|
||||
|
||||
__-i (input files and directories):__ If a directory is specified, all files inside the directory will be converted. Multiple files and directories may be specified.
|
||||
|
||||
__-o (output directory):__
|
||||
|
||||
__--output-format:__ May be either BINARY (default), LAS or LAZ. As of now, BINARY only supports coordinate position and point colors. LAS and LAZ files can also handle intensity, classification, return number and point source id. LAZ is a compressed format that produces the smallest output(~1/3 of binary format) but comes at a higher CPU and memory cost.
|
||||
50
docs/documentation.md
Normal file
@ -0,0 +1,50 @@
|
||||
|
||||
# Documentation
|
||||
|
||||
* [Getting Started](getting_started.md)
|
||||
* [Changelog](changelog.md)
|
||||
* [User Interface](user_interface.md)
|
||||
* [Converting Point Clouds](converting.md)
|
||||
* [FAQ](faq.md)
|
||||
* [Measuring](measuring.md)
|
||||
* [File Format](file_format.md)
|
||||
|
||||
## About
|
||||
|
||||
Potree is a free open-source WebGL based point cloud renderer for large point clouds.
|
||||
Similar to map software like Google Maps or OpenStreeMap, only data inside the visible area and up to a certain level of detail are loaded.
|
||||
|
||||

|
||||
|
||||
At the moment, this project is continued as master thesis under the [Harvest4D Project](https://harvest4d.org/)
|
||||
|
||||
Newest information and work in progress is usually available on [twitter](https://twitter.com/m_schuetz)
|
||||
|
||||
General infos, downloads, showcase, etc. at [potree.org](http://potree.org/)
|
||||
|
||||
## Downloads
|
||||
|
||||
* [PotreeConverter windows binary (2014.12.30)](http://potree.org/downloads/PotreeConverter/PotreeConverter_2014.12.30.zip)
|
||||
|
||||
## Showcase
|
||||
|
||||
Take a look at the [potree showcase](http://potree.org/wp/demo/) for some live examples.
|
||||
|
||||
## Compatibility
|
||||
|
||||
| Browser | OS | Result |
|
||||
| -------------------- |:-------:|:-------------:|
|
||||
| Chrome 39 | Win7 | works |
|
||||
| Firefox 34 | Win7 | works |
|
||||
| Internet Explorer 11 | Win7 | partially works; performance issues |
|
||||
| Firefox | Android | partially works, GUI and stability issues |
|
||||
| Opera | Android | partially works, GUI and stabilty issues and slow |
|
||||
|
||||
|
||||
## Credits
|
||||
|
||||
* The multi-res-octree algorithms used by this viewer were developed at the Vienna University of Technology by Michael Wimmer and Claus Scheiblauer as part of the [Scanopy Project](http://www.cg.tuwien.ac.at/research/projects/Scanopy/).
|
||||
* [Three.js](https://github.com/mrdoob/three.js), the WebGL 3D rendering library on which potree is built.
|
||||
* [plas.io](http://plas.io/) point cloud viewer. LAS and LAZ support have been taken from the laslaz.js implementation of plas.io. Thanks to [Uday Verma](https://twitter.com/udaykverma) and [Howard Butler](https://twitter.com/howardbutler) for this!
|
||||
* [Harvest4D](https://harvest4d.org/) Potree currently runs as Master Thesis under the Harvest4D Project
|
||||
* [Martin Isenburg](http://rapidlasso.com/), [Georepublic](http://georepublic.de/en/), [Sigeom Sa](http://www.sigeom.ch/), [SITN](http://www.ne.ch/sitn), [Pix4D](http://pix4d.com/) as well as all the contributers to potree and PotreeConverter and many more for their support.
|
||||
46
docs/faq.md
Normal file
@ -0,0 +1,46 @@
|
||||
|
||||
# FAQ
|
||||
|
||||
If you encounter any problem in the browser, try to open the developer console (ctrl + shift + i in firefox and chrome) and look for error messages. Some of the messages are covered in this FAQ.
|
||||
|
||||
If your problem is not covered in this FAQ, either create a new issue at the [github
|
||||
repository](https://github.com/potree/potree) or send an email to
|
||||
mschuetz@potree.org.
|
||||
|
||||
|
||||
## I've uploaded the point cloud to a web server but it is not visible.
|
||||
|
||||
### Did it work on a local web server?
|
||||
If yes and the error console shows the following error, then it is likely that your uploader altered the data/r* files:
|
||||
```
|
||||
Uncaught RangeError: byte length of Float32Array should be a multiple of 4
|
||||
```
|
||||
|
||||
To solve this, tell your uploader to treat files as BINARY rather than ASCII.
|
||||
In Filezilla you can do this here:
|
||||
Edit -> Settings -> Transfers -> File Types -> Default Transfer Type
|
||||
|
||||
Another option is to pack all your data into a zip file, upload it and unpack it on the server.
|
||||
|
||||
### Are you using IIS?
|
||||
|
||||
IIS may cause problems with files that have no extension, such as the data/r* files for potree format up to 1.3.
|
||||
|
||||
In this case, you can try to configure IIS:
|
||||
http://www.serverintellect.com/support/iis/enable-no-extensions/
|
||||
|
||||
## The converted point cloud is black
|
||||
|
||||
As of now, the PotreeConvert expects rgb colors in LAS or LAZ files in a range of 0-65536.
|
||||
If you have colors in a 0-255 range, you will have to upscale them before conversion.
|
||||
You can use the [lastools](http://rapidlasso.com/lastools/) to do this:
|
||||
|
||||
```
|
||||
las2las -i pointcloud.las -scale_rgb_up
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Can I use potree for commercial projects?
|
||||
|
||||
Yes, the license allows you to do this free of charge. If you do use potree, please consider supporting this project with a donation.
|
||||
@ -36,10 +36,10 @@ indicate which child it is.
|
||||
|
||||
Child nodes are arranged like this:
|
||||
|
||||
3----7
|
||||
/| /|
|
||||
y 2----6 |
|
||||
| -z | 1--|-5
|
||||
3----7
|
||||
/| /|
|
||||
y 2----6 |
|
||||
| -z | 1--|-5
|
||||
|/ |/ |/
|
||||
O----x 0----4
|
||||
|
||||
@ -54,7 +54,8 @@ Stores information about the pointcloud in JSON format.
|
||||
necessary so that parsers know how to interpret the data.
|
||||
* __octreeDir__ - Directory or URL where node data is stored. Usually points to
|
||||
"data".
|
||||
* __boundingBox__ - Contains the minimum and maximum of the axis aligned bounding box.
|
||||
* __boundingBox__ - Contains the minimum and maximum of the axis aligned bounding box. This bounding box is cubic and aligned to fit to the octree root.
|
||||
* __tightBoundingBox__ - This bounding box thightly fits the point data.
|
||||
* __pointAttributes__ - Declares the point data format.
|
||||
As of now, only ["POSITION_CARTESIAN", "COLOR_PACKED"] is supported which
|
||||
stores each point in 16 bytes. The first 12 bytes contain x/y/z coordinates and
|
||||
@ -96,6 +97,6 @@ The nodes must be stored top to bottom, i.e. root at the beginning and leaf-node
|
||||
|
||||
The node files in the data directory contain the point data.
|
||||
With point attributes set to "POSITION_CARTESIAN" and "COLOR_PACKED",
|
||||
each point will be stored as 3x32bit floats for the xyz-coordinates and 4 unsigned bytes to store
|
||||
each point will be stored as 3x32bit signed integers for the xyz-coordinates and 4 unsigned bytes to store
|
||||
rgba data. All data is stored in little endian order.
|
||||
Other formats are not supported at the moment.
|
||||
|
||||
@ -1,190 +1,27 @@
|
||||
|
||||
# Getting Started
|
||||
|
||||
Read the [FAQ](faq.md) if you encounter any problems.
|
||||
|
||||
|
||||
## Converting A Point Cloud
|
||||
|
||||
Potree requires a special point cloud format. Use the PotreeConverter to convert las, ply or xyz files into this format.
|
||||
See [PotreeConverter - usage](https://github.com/potree/PotreeConverter)
|
||||
Potree requires a special point cloud format. Use the [PotreeConverter](https://github.com/potree/PotreeConverter) to convert your las or laz files.
|
||||
|
||||
## Including Source Files
|
||||
Try this for your first point cloud and then take a look at [conversion manual](converting.md) to learn more about the converter options to get better results:
|
||||
```
|
||||
./PotreeConverter.exe pointcloud.las -l 3
|
||||
```
|
||||
|
||||
This example needs three.js, OrbitControls.js, and the potree source files:
|
||||
Copy the converted point cloud directory (with cloud.js + data directory) to _./resources/pointclouds_
|
||||
|
||||
<script src="../libs/three.js/build/three.js"></script>
|
||||
<script src="../libs/other/OrbitControls.js"></script>
|
||||
<script src="../src/Potree.js"></script>
|
||||
<script src="../src/PointCloudOctreeGeometry.js"></script>
|
||||
<script src="../src/PointCloudOctree.js"></script>
|
||||
<script src="../src/loader/POCLoader.js"></script>
|
||||
<script src="../src/loader/PointAttributes.js"></script>
|
||||
<script src="../src/utils.js"></script>
|
||||
<script src="../src/LRU.js"></script>
|
||||
## Creating the Web Page
|
||||
|
||||
## Setting Up The Scene
|
||||
Copy examples/viewer.html and change the path to your own point cloud.
|
||||
|
||||
In this section, we will set up a simple scene to load and display a point cloud.
|
||||
|
||||
|
||||
Potree is built upon the three.js library and so the first step is to
|
||||
create a three.js scene, camera and renderer:
|
||||
|
||||
scene = new THREE.Scene();
|
||||
camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 100000);
|
||||
renderer = new THREE.WebGLRenderer();
|
||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
document.body.appendChild(renderer.domElement);
|
||||
|
||||
In the next step, we move the camera to position 1 / 7 / 7 and make it point
|
||||
to the target at 0 / 4 / 0. The OrbitControls makes it possible to rotate around
|
||||
the target by dragging the mouse.
|
||||
|
||||
camera.position.set(1, 7, 7);
|
||||
controls = new THREE.OrbitControls(camera, renderer.domElement);
|
||||
controls.target.set(0, 4, 0 );
|
||||
camera.lookAt(controls.target);
|
||||
|
||||
In the next few steps, we will load the pointcloud, modify its position and orientation
|
||||
and add it to the scene.
|
||||
|
||||
First, load the pointcloud:
|
||||
|
||||
var pco = POCLoader.load(pointcloudPath);
|
||||
|
||||
POCLoader.load() returns a geometry object. Geometry objects can be attached to
|
||||
scene nodes, PointCloudOctree in this case, which in turn can be added to the scene:
|
||||
|
||||
|
||||
pointcloudMaterial = new THREE.PointCloudMaterial( { size: defaultPointSize, vertexColors: true } );
|
||||
pointcloud = new Potree.PointCloudOctree(pco, pointcloudMaterial);
|
||||
scene.add(pointcloud);
|
||||
|
||||
It is possible to create multiple scene nodes that use the same geometry, if needed.
|
||||
|
||||
Usually, the position and orientation of pointclouds must be modified as well.
|
||||
Use _moveToOrigin()_ if you want to center your pointcloud around the origin and
|
||||
_moveToGroundPlane()_ to put it on top of the ground plane.
|
||||
Change the LOD parameter to alter the Level of Detail. A higher LOD results in
|
||||
more octree nodes beeing displayed at once. If you experience performance problems,
|
||||
try to lower the LOD.
|
||||
|
||||
pointcloud.LOD = defaultLOD;
|
||||
pointcloud.rotation.set(Math.PI/2, 0.85* -Math.PI/2, -0.0);
|
||||
pointcloud.moveToOrigin();
|
||||
pointcloud.moveToGroundPlane();
|
||||
|
||||
A common problem is that your pointcloud is upside down or the y and z axis are
|
||||
flipped. In three.js / WebGL y points upwards while a lot of software packages
|
||||
use z as the up-vector.
|
||||
|
||||
To fix the upside down problem, you an apply a matrix transformation to mirror
|
||||
along the y axis:
|
||||
|
||||
pointcloud.applyMatrix(new THREE.Matrix4().set(
|
||||
1,0,0,0,
|
||||
0,-1,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,1
|
||||
));
|
||||
|
||||
To fix the problem with flipped y and z axis, you an apply another matrix transformation:
|
||||
|
||||
pointcloud.applyMatrix(new THREE.Matrix4().set(
|
||||
1,0,0,0,
|
||||
0,0,1,0,
|
||||
0,1,0,0,
|
||||
0,0,0,1
|
||||
));
|
||||
|
||||
|
||||
## Rendering the Scene
|
||||
|
||||
pointcloud.update(camera) loads nodes that are visible from the given camera
|
||||
and hides nodes that are not.
|
||||
|
||||
pointcloud.update(camera);
|
||||
|
||||
Render the scene:
|
||||
|
||||
renderer.render(scene, camera);
|
||||
|
||||
|
||||
|
||||
## Putting It All Together
|
||||
|
||||
This is a complete html file that will display the lion_takanawa pointcloud
|
||||
that is included in the potree repository.
|
||||
Make sure to put the html file into the potree root dir (not ./examples) or update
|
||||
the pointcloudPath variable.
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Lion</title>
|
||||
<style>canvas { width: 100%; height: 100% }</style>
|
||||
</head>
|
||||
<body style="margin: 0; padding: 0">
|
||||
|
||||
<script src="../libs/three.js/build/three.js"></script>
|
||||
<script src="../libs/other/OrbitControls.js"></script>
|
||||
<script src="../src/Potree.js"></script>
|
||||
<script src="../src/PointCloudOctreeGeometry.js"></script>
|
||||
<script src="../src/PointCloudOctree.js"></script>
|
||||
<script src="../src/loader/POCLoader.js"></script>
|
||||
<script src="../src/loader/PointAttributes.js"></script>
|
||||
<script src="../src/utils.js"></script>
|
||||
<script src="../src/LRU.js"></script>
|
||||
|
||||
<script>
|
||||
var defaultPointSize = 0.03;
|
||||
var defaultLOD = 15;
|
||||
var pointcloudPath = "./resources/pointclouds/lion_takanawa/cloud.js";
|
||||
|
||||
var renderer;
|
||||
var camera;
|
||||
var scene;
|
||||
var pointcloud;
|
||||
var pointcloudMaterial;
|
||||
|
||||
function init(){
|
||||
scene = new THREE.Scene();
|
||||
camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 100000);
|
||||
|
||||
renderer = new THREE.WebGLRenderer();
|
||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
document.body.appendChild(renderer.domElement);
|
||||
|
||||
// camera and controls
|
||||
camera.position.set(1, 7, 7);
|
||||
controls = new THREE.OrbitControls(camera, renderer.domElement);
|
||||
controls.target.set(0, 4, 0 );
|
||||
camera.lookAt(controls.target);
|
||||
|
||||
// load pointcloud
|
||||
var pco = POCLoader.load(pointcloudPath);
|
||||
pointcloudMaterial = new THREE.PointCloudMaterial( { size: defaultPointSize, vertexColors: true } );
|
||||
pointcloud = new Potree.PointCloudOctree(pco, pointcloudMaterial);
|
||||
scene.add(pointcloud);
|
||||
|
||||
pointcloud.LOD = defaultLOD;
|
||||
pointcloud.rotation.set(Math.PI/2, 0.85* -Math.PI/2, -0.0);
|
||||
pointcloud.moveToOrigin();
|
||||
pointcloud.moveToGroundPlane();
|
||||
|
||||
}
|
||||
|
||||
function render() {
|
||||
requestAnimationFrame(render);
|
||||
|
||||
pointcloud.update(camera);
|
||||
|
||||
renderer.render(scene, camera);
|
||||
};
|
||||
|
||||
init();
|
||||
render();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
var pointcloudPath = "../resources/pointclouds/my_own_pointcloud/cloud.js";
|
||||
```
|
||||
|
||||
## Deploying Potree On A Webserver
|
||||
|
||||
@ -201,7 +38,7 @@ alone should work fine:
|
||||
After you've installed apache/XAMPP, start it and copy your potree directory
|
||||
to the htdocs directory. You should now be able to access your localy hosted files like this:
|
||||
|
||||
http://localhost/potree/pointcloud.html
|
||||
http://localhost/potree/examples/my_own_viewer.html
|
||||
|
||||
|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 68 KiB |
BIN
docs/images/potree_screens.png
Normal file
|
After Width: | Height: | Size: 350 KiB |
15
docs/measuring.md
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
# Measuring
|
||||
|
||||
if you're missing some functionality in the interface, you can still achieve certain things by using your browsers developer tools as a scripting console. Open the developer tools with ctrl + shift + i, paste code into the console and execute it.
|
||||
|
||||
|
||||
## Height Profile
|
||||
|
||||
|
||||
To get points inside a height profile, use this:
|
||||
```
|
||||
var maxOctreeDepth = 2;
|
||||
var points = pointcloud.getPointsInProfile(profileTool.profiles[0], maxOctreeDepth);
|
||||
console.log(points);
|
||||
```
|
||||
82
docs/user_interface.md
Normal file
@ -0,0 +1,82 @@
|
||||
|
||||
# User Interface
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
 __Fly-Navigation__
|
||||
|
||||
ASDW or Arrow Keys: Move through scene
|
||||
|
||||
Left Mouse: Rotate camera
|
||||
|
||||
|
||||
 __Orbit-Navigation__
|
||||
|
||||
Left Mouse: Rotate camera around pivot.
|
||||
|
||||
Right Mouse: Pan camera & pivot.
|
||||
|
||||
 __Zoom to Point Cloud__
|
||||
|
||||
Moves camera so that the whole point cloud is within the view area.
|
||||
|
||||
 __Flip Y and Z__
|
||||
|
||||
Flips y and -z coordinates. Some software uses y as the up vector(WebGL, three.js, potree), others use z.
|
||||
|
||||
 __Distance Measurement__
|
||||
|
||||
Left Mouse: Insert Measurement Point
|
||||
|
||||
Right Mouse: Finish insertion
|
||||
|
||||
Drag&Drop: Move Measurement Points
|
||||
|
||||
Distance between measurement points will be displayed on the edge.
|
||||
|
||||
 __Area Measurement__
|
||||
|
||||
Left Mouse: Insert Measurement Point
|
||||
|
||||
Right Mouse: Finish insertion
|
||||
|
||||
Drag&Drop: Move Measurement Points
|
||||
|
||||
Distance between measurement points will be displayed on the edge and the
|
||||
total area on the centroid.
|
||||
The area is calculated on the ground plane. The height does not affect the result.
|
||||
Crossings should be avoided.
|
||||
|
||||
 __Volume Measurement__
|
||||
|
||||
Left Mouse: Insert Volume or Select Inserted Volume
|
||||
|
||||
E, R, T: Switch between translation, scale and rotation mode.
|
||||
|
||||
Volume will be displayed on the objects centroid.
|
||||
|
||||
 __Height Profile__
|
||||
|
||||
Left Mouse: Insert Profile Marker
|
||||
|
||||
Right Mouse: Finish insertion
|
||||
|
||||
Drag&Drop: Move Profile Marker
|
||||
|
||||
ctrl + Drag&Drop: Drag upwards to increase or downwards to decrease the profile width
|
||||
|
||||
Depending on the Clip Mode, points inside the profile will be highlighted or points outside the profile will be clipped.
|
||||
|
||||
|
||||
 __Clip Volume__
|
||||
|
||||
Left Mouse: Insert Volume or Select Inserted Volume
|
||||
|
||||
E, R, T: Switch between translation, scale and rotation mode.
|
||||
|
||||
Depending on the Clip Mode, points inside the volume will be highlighted or points outside the volume will be clipped.
|
||||
|
||||
|
||||

|
||||
@ -52,23 +52,6 @@ To transform the swissCoordinates to local coordinates, use
|
||||
var sceneCoordinate = toLocal(new THREE.Vector3(swissCoordinate[0], swissCoordinate[1], 0));
|
||||
|
||||
|
||||
|
||||
== Profile ==
|
||||
|
||||
There are 2 ways to get a height profile:
|
||||
- ProfileTool: renders points inside the profile area into a texture.
|
||||
- pointcloud.getProfile(): Returns points inside the profile area
|
||||
|
||||
In this demo, both are used side by side. The ProfileTool is very fast and can be used as a
|
||||
preview to the result of the getProfile() function.
|
||||
The depth parameter specifies the detail level of the result.
|
||||
Especially with higher depth values, it is likely that not all the octree nodes necessary
|
||||
for the calculation have been loaded, yet which is why you can provide a callback function
|
||||
that is called once all the necessary nodes have been loaded and the point profile has been calculated.
|
||||
If you call getProfile without a callback, it will ignore unloaded nodes and immediately return
|
||||
a result.
|
||||
|
||||
|
||||
== GeoExtent ==
|
||||
|
||||
You can get the boundaries of the currently visible parts using pointcloud.getVisibleExtent()
|
||||
@ -144,17 +127,11 @@ The updateMapExtent() shows how this can be used to visualize the boundaries in
|
||||
<div class="info" style="position: absolute; left: 300px; right: 300px; top: 10px; text-align: center;">
|
||||
<a href="http://potree.org" target="_blank">potree.org</a><br>
|
||||
Point cloud courtesy of <a href="http://www.sigeom.ch/" target="_blank">sigeom sa</a><br>
|
||||
Georeferencing - Check "coordinates" to display mouse hover coordinates on the bottom left
|
||||
<br>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="info" style="position: absolute; left: 5px; top: 20px">
|
||||
Georeferencing, Height Profile and Measurement.<br>
|
||||
Double click to generate measurement points. <br>
|
||||
Drag endpoints of red line in map window to modify the profile. <br>
|
||||
Check "coordinates" to display mouse hover coordinates on the bottom left.<br>
|
||||
Push the <input type="button" value="Height Profile" onclick="doHeightProfile()"/> button to create some spheres along the profile<br>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="renderArea"></div>
|
||||
@ -183,10 +160,6 @@ The updateMapExtent() shows how this can be used to visualize the boundaries in
|
||||
var minWeb = proj4(swiss, webMercator, [minSwiss[0], minSwiss[1]]);
|
||||
var maxWeb = proj4(swiss, webMercator, [maxSwiss[0], maxSwiss[1]]);
|
||||
|
||||
// default values for start and end of profile in Web Mercator
|
||||
var profileStart = proj4(swiss, webMercator, [589468, 231313]);
|
||||
var profileEnd = proj4(swiss, webMercator, [590134, 231328]);
|
||||
|
||||
// bounds of the EPSG:21781 projection
|
||||
//var swissMin = new THREE.Vector3(485869.5728, 76443.1884, 0);
|
||||
//var swissMax = new THREE.Vector3(837076.5648, 299941.7864, 0);
|
||||
@ -195,7 +168,6 @@ The updateMapExtent() shows how this can be used to visualize the boundaries in
|
||||
var featureVector;
|
||||
var camFrustumFeatureVector;
|
||||
var camFrustum;
|
||||
var profileOverlay;
|
||||
var visibleBounds;
|
||||
|
||||
// three.js / potree stuff
|
||||
@ -206,8 +178,6 @@ The updateMapExtent() shows how this can be used to visualize the boundaries in
|
||||
var skybox;
|
||||
var pointcloud;
|
||||
var clock = new THREE.Clock();
|
||||
var measuringTool;
|
||||
var profileTool;
|
||||
var showCoordinates = false;
|
||||
var mouse = {x: 0, y: 0};
|
||||
var elCoordinates = document.getElementById("lblCoordinates");
|
||||
@ -333,36 +303,6 @@ The updateMapExtent() shows how this can be used to visualize the boundaries in
|
||||
})
|
||||
});
|
||||
|
||||
{// profile layer
|
||||
profileOverlay = new ol.FeatureOverlay({
|
||||
style: new ol.style.Style({
|
||||
fill: new ol.style.Fill({
|
||||
color: 'rgba(255, 255, 255, 0.2)'
|
||||
}),
|
||||
stroke: new ol.style.Stroke({
|
||||
color: '#ff0000',
|
||||
width: 2
|
||||
}),
|
||||
image: new ol.style.Circle({
|
||||
radius: 7,
|
||||
fill: new ol.style.Fill({
|
||||
color: '#ff0000'
|
||||
})
|
||||
})
|
||||
})
|
||||
});
|
||||
profileOverlay.setMap(map);
|
||||
|
||||
var profile = new ol.geom.LineString([profileStart, profileEnd]);
|
||||
var profileFeature = new ol.Feature(profile);
|
||||
profileOverlay.addFeature(profileFeature);
|
||||
|
||||
// enable drag modification of the profile line
|
||||
var modify = new ol.interaction.Modify({
|
||||
features: profileOverlay.getFeatures(),
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
}
|
||||
}
|
||||
|
||||
function initPotreeView(){
|
||||
@ -393,11 +333,13 @@ The updateMapExtent() shows how this can be used to visualize the boundaries in
|
||||
controls.moveSpeed *= 10;
|
||||
camera.position.set(600, 880, -370);
|
||||
camera.lookAt(new THREE.Vector3(480, 797, -219));
|
||||
|
||||
referenceFrame = new THREE.Object3D();
|
||||
|
||||
// load pointcloud
|
||||
var pco = POCLoader.load(pointcloudPath, function(geometry){
|
||||
offset = geometry.offset;
|
||||
pointcloud = new Potree.PointCloudOctree(geometry, new Potree.PointCloudMaterial());
|
||||
pointcloud = new Potree.PointCloudOctree(geometry);
|
||||
pointcloud.material.pointSizeType = Potree.PointSizeType.ADAPTIVE;
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
@ -405,9 +347,13 @@ The updateMapExtent() shows how this can be used to visualize the boundaries in
|
||||
// the reference frame transforms the point cloud into the scene coordinate system
|
||||
// by moving it towards the origin and flipping the y and z axes.
|
||||
// This is necessary to avoid precision errors due to large floating point values.
|
||||
referenceFrame = new THREE.Object3D();
|
||||
referenceFrame.add(pointcloud);
|
||||
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
|
||||
referenceFrame.position.set(-pointcloud.position.x, -pointcloud.position.y, 0);
|
||||
referenceFrame.updateMatrix();
|
||||
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
referenceFrame.applyMatrix(new THREE.Matrix4().set(
|
||||
1,0,0,0,
|
||||
0,0,1,0,
|
||||
@ -415,35 +361,8 @@ The updateMapExtent() shows how this can be used to visualize the boundaries in
|
||||
0,0,0,1
|
||||
));
|
||||
scene.add(referenceFrame);
|
||||
referenceFrame.add(pointcloud);
|
||||
referenceFrame.updateMatrixWorld();
|
||||
});
|
||||
|
||||
// create measuring tool
|
||||
measuringTool = new Potree.MeasuringTool(scene, camera, renderer);
|
||||
measuringTool.addEventListener("newpoint", function(event){
|
||||
point = toGeo(event.position);
|
||||
|
||||
// transform from swiss projection to Web Mercator
|
||||
var swiss = proj4.defs("EPSG:21781");
|
||||
var WGS84 = proj4.defs("WGS84");
|
||||
var coordinate = proj4(swiss, webMercator, [point.x, point.y]);
|
||||
|
||||
// add a point to the OpenLayers map
|
||||
var olPoint = new ol.geom.Point(coordinate);
|
||||
var feature = new ol.Feature(olPoint);
|
||||
featureVector.addFeature(feature);
|
||||
});
|
||||
|
||||
// create profile tool
|
||||
profileTool = new Potree.ProfileTool(400, 200, 10);
|
||||
profileTool.position.set(0,0,0);
|
||||
scene.add(profileTool);
|
||||
sceneHUD.add(profileTool.hudElement);
|
||||
profileTool.setCoordinates(
|
||||
new THREE.Vector3(-32, 750, -13),
|
||||
new THREE.Vector3(634, 750, -28));
|
||||
|
||||
renderer.domElement.addEventListener( 'mousemove', onMouseMove, false );
|
||||
}
|
||||
|
||||
@ -579,7 +498,6 @@ The updateMapExtent() shows how this can be used to visualize the boundaries in
|
||||
pointcloud.update(camera, renderer);
|
||||
updateMapFrustum();
|
||||
updateCoordinatePicking();
|
||||
updateProfile();
|
||||
updateMapExtent();
|
||||
updateProgressBar();
|
||||
}
|
||||
@ -682,39 +600,6 @@ The updateMapExtent() shows how this can be used to visualize the boundaries in
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the ProfileTools start and end according to the users modification
|
||||
* in the map window
|
||||
*/
|
||||
function updateProfile(){
|
||||
var features = profileOverlay.getFeatures();
|
||||
if(features.getArray().length == 0){
|
||||
return;
|
||||
}
|
||||
|
||||
var geometry = profileOverlay.getFeatures().getArray()[0].getGeometry();
|
||||
var coordinates = geometry.getCoordinates();
|
||||
|
||||
if(coordinates.length < 2){
|
||||
return;
|
||||
}
|
||||
|
||||
var start = new THREE.Vector3(coordinates[0][0], coordinates[0][1], 0);
|
||||
var end = new THREE.Vector3(coordinates[1][0], coordinates[1][1], 0);
|
||||
|
||||
var startSwiss = proj4(webMercator, swiss, [start.x, start.y]);
|
||||
var startScene = toLocal(new THREE.Vector3(startSwiss[0], startSwiss[1], 0));
|
||||
|
||||
var endSwiss = proj4(webMercator, swiss, [end.x, end.y]);
|
||||
var endScene = toLocal(new THREE.Vector3(endSwiss[0], endSwiss[1], 0));
|
||||
|
||||
startScene.y = 750;
|
||||
endScene.y = 750;
|
||||
|
||||
profileTool.setCoordinates(startScene, endScene);
|
||||
|
||||
}
|
||||
|
||||
function getMousePointCloudIntersection(){
|
||||
var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 );
|
||||
vector.unproject(camera);
|
||||
@ -761,11 +646,6 @@ The updateMapExtent() shows how this can be used to visualize the boundaries in
|
||||
|
||||
renderer.setSize(width, height);
|
||||
|
||||
profileTool.hudElement.scale.x = 400 / width;
|
||||
profileTool.hudElement.scale.y = 300 / height;
|
||||
profileTool.hudElement.position.x = 1 - 405 / width;
|
||||
profileTool.hudElement.position.y = -1 + 905 / height;
|
||||
|
||||
// render skybox
|
||||
if(showSkybox){
|
||||
skybox.camera.rotation.copy(camera.rotation);
|
||||
@ -774,44 +654,11 @@ The updateMapExtent() shows how this can be used to visualize the boundaries in
|
||||
|
||||
|
||||
// render scenes
|
||||
profileTool.render(renderer, scene);
|
||||
renderer.render(scene, camera);
|
||||
measuringTool.render();
|
||||
renderer.render(sceneHUD, cameraHUD);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Demonstrating the pointcloud.getProfile() method by creating spheres at some
|
||||
* of the points inside the profile.
|
||||
* The depth value specifies the density of the points.
|
||||
* This method is async and will call its callback once all the necessary
|
||||
* nodes have been loaded. If no callback is given, it will immediately
|
||||
* return an array of points and ignore nodes that have not been loaded, yet.
|
||||
*
|
||||
*/
|
||||
function doHeightProfile(){
|
||||
var start = profileTool.start;
|
||||
var end = profileTool.end;
|
||||
var width = 10;
|
||||
var depth = 4;
|
||||
|
||||
var callback = function(event){
|
||||
if(event.type === "finished"){
|
||||
var points = event.points;
|
||||
var sphereGeometry = new THREE.SphereGeometry(1, 5, 5);
|
||||
for(var i = 0; i < points.length; i += Math.ceil(points.length / 500)){
|
||||
var point = points[i];
|
||||
var sphere = new THREE.Mesh(sphereGeometry);
|
||||
sphere.position.copy(point);
|
||||
scene.add(sphere);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
pointcloud.getProfile(start, end, width, depth, callback);
|
||||
}
|
||||
|
||||
function onMouseMove(event){
|
||||
mouse.x = ( event.clientX / renderer.domElement.clientWidth ) * 2 - 1;
|
||||
mouse.y = - ( event.clientY / renderer.domElement.clientHeight ) * 2 + 1;
|
||||
@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Lion</title>
|
||||
<title>Viewer</title>
|
||||
<style>canvas { width: 100%; height: 100% }</style>
|
||||
</head>
|
||||
<body style="margin: 0; padding: 0">
|
||||
@ -28,69 +28,163 @@
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script id="vs" type="x-shader/x-vertex">
|
||||
varying vec2 vUv;
|
||||
|
||||
void main() {
|
||||
vUv = uv;
|
||||
|
||||
gl_Position = projectionMatrix *
|
||||
modelViewMatrix *
|
||||
vec4(position,1.0);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script id="fs" type="x-shader/x-vertex">
|
||||
|
||||
#extension GL_EXT_frag_depth : enable
|
||||
|
||||
uniform sampler2D depthMap;
|
||||
uniform sampler2D texture;
|
||||
|
||||
varying vec2 vUv;
|
||||
|
||||
void main() {
|
||||
vec4 color = texture2D(texture, vUv);
|
||||
float depth = texture2D(depthMap, vUv).g;
|
||||
color = color / color.w;
|
||||
gl_FragColor = color;
|
||||
|
||||
gl_FragDepthEXT = depth;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="../libs/plasio/vendor/bluebird.js"></script>
|
||||
<script src="../libs/three.js/build/three.js"></script>
|
||||
<script src="../libs/other/OrbitControls.js"></script>
|
||||
<script src="../libs/other/stats.min.js"></script>
|
||||
<script src="../libs/other/dat.gui.min.js"></script>
|
||||
|
||||
<script src="../build/js/potree.js"></script>
|
||||
<script src="js/ProgressBar.js"></script>
|
||||
<script src="../examples/js/ProgressBar.js"></script>
|
||||
|
||||
<div id="lblNumVisibleNodes" class="info" style="position: absolute; left: 10px; top: 80px; width: 400px; color:white"></div>
|
||||
<div id="lblNumVisiblePoints" class="info" style="position: absolute; left: 10px; top: 100px; width: 400px; color:white"></div>
|
||||
<div id="lblMessage" class="info" style="position: absolute; left: 10px; bottom: 0px; width: 400px; color:white"></div>
|
||||
|
||||
<div id="tools" style="position: fixed; width: 340px; bottom: 10px; right: 10px">
|
||||
|
||||
|
||||
<img src="../resources/icons/fps_controls.png"
|
||||
onclick="useFPSControls()"
|
||||
title="Fly Camera"/>
|
||||
|
||||
<img src="../resources/icons/orbit_controls.png"
|
||||
onclick="useOrbitControls()"
|
||||
title="Orbit Controls"/>
|
||||
|
||||
<img src="../resources/icons/focus.png"
|
||||
onclick="camera.zoomTo(pointcloud)"
|
||||
title="focus on pointcloud"/>
|
||||
|
||||
<img src="../resources/icons/flip_y_z.png"
|
||||
onclick="flipYZ()"
|
||||
title="flip y and z coordinates"/>
|
||||
|
||||
|
||||
<img src="../resources/icons/distance.png"
|
||||
onclick="measuringTool.setEnabled(true)"
|
||||
title="distance measurements"/>
|
||||
<img src="../resources/icons/area.png"
|
||||
onclick="areaTool.setEnabled(true)"
|
||||
title="area measurements"/>
|
||||
|
||||
<img src="../resources/icons/volume.png"
|
||||
onclick="volumeTool.startInsertion()"
|
||||
title="volume measurements"/>
|
||||
|
||||
<img src="../resources/icons/profile.png"
|
||||
onclick="profileTool.startInsertion({width: pointcloud.boundingSphere.radius / 100})"
|
||||
title="height profiles"/>
|
||||
|
||||
<img src="../resources/icons/clip_volume.png"
|
||||
onclick="volumeTool.startInsertion({clip: true})"
|
||||
title="clipping volumes"/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="info" style="position: absolute; left: 300px; right: 300px; top: 10px; text-align: center;">
|
||||
<a href="http://potree.org" target="_blank">potree.org</a><br>
|
||||
<a href="http://potree.org" target="_blank">potree.org</a>
|
||||
</div>
|
||||
|
||||
<div id="renderArea"></div>
|
||||
|
||||
<script>
|
||||
var pointSize = 1;
|
||||
var pointCountTarget = 0.4;
|
||||
var pointSize = 1.0 ;
|
||||
var pointCountTarget = 1;
|
||||
var opacity = 1;
|
||||
var pointSizeType = Potree.PointSizeType.ADAPTIVE;
|
||||
var pointColorType = Potree.PointColorType.RGB;
|
||||
var pointShape = Potree.PointShape.SQUARE;
|
||||
var interpolate = false;
|
||||
var clipMode = Potree.ClipMode.HIGHLIGHT_INSIDE;
|
||||
var quality = "Normal";
|
||||
var isFlipYZ = false;
|
||||
|
||||
var showStats = false;
|
||||
var showBoundingBox = false;
|
||||
|
||||
var fpControls;
|
||||
var orbitControls;
|
||||
var controls;
|
||||
|
||||
var progressBar = new ProgressBar();
|
||||
|
||||
|
||||
var pointcloudPath = "../resources/pointclouds/lion_takanawa/cloud.js";
|
||||
|
||||
|
||||
var elRenderArea = document.getElementById("renderArea");
|
||||
|
||||
var gui;
|
||||
var renderer;
|
||||
var camera;
|
||||
var scene;
|
||||
var scenePointCloud;
|
||||
var sceneBG, cameraBG;
|
||||
var pointcloud;
|
||||
var skybox;
|
||||
var stats;
|
||||
var clock = new THREE.Clock();
|
||||
var showSkybox = false;
|
||||
var measuringTool;
|
||||
var areaTool;
|
||||
var volumeTool;
|
||||
var transformationTool;
|
||||
var referenceFrame;
|
||||
|
||||
function initGUI(){
|
||||
|
||||
// dat.gui
|
||||
var gui = new dat.GUI({
|
||||
gui = new dat.GUI({
|
||||
height : 5 * 32 - 1
|
||||
});
|
||||
|
||||
var params = {
|
||||
params = {
|
||||
"points(m)": pointCountTarget,
|
||||
PointSize: pointSize,
|
||||
"opacity": opacity,
|
||||
"SizeType" : "Adaptive",
|
||||
"show octree" : false,
|
||||
"Materials" : "RGB",
|
||||
"interpolate": interpolate,
|
||||
"circles": false,
|
||||
"skybox": false
|
||||
"Clip Mode": "Highlight Inside",
|
||||
"quality": "Normal",
|
||||
"skybox": false,
|
||||
"stats": showStats,
|
||||
"BoundingBox": showBoundingBox
|
||||
};
|
||||
|
||||
var pPoints = gui.add(params, 'points(m)', 0.02, 0.5);
|
||||
var pPoints = gui.add(params, 'points(m)', 0.02, 2);
|
||||
pPoints.onChange(function(value){
|
||||
pointCountTarget = value ;
|
||||
});
|
||||
@ -116,7 +210,17 @@
|
||||
}
|
||||
});
|
||||
|
||||
var pMaterial = gui.add(params, 'Materials', [ "RGB", "Color", "Height", "Octree Depth"]);
|
||||
var options = [];
|
||||
if(pointcloud.pcoGeometry.pointAttributes === "LAS" || pointcloud.pcoGeometry.pointAttributes === "LAZ"){
|
||||
options = [
|
||||
"RGB", "Color", "Height", "Intensity", "Intensity Gradient",
|
||||
"Classification", "Return Number", "Source",
|
||||
"Octree Depth"];
|
||||
}else{
|
||||
options = options = [ "RGB", "Color", "Height", "Octree Depth"];
|
||||
}
|
||||
|
||||
pMaterial = gui.add(params, 'Materials',options);
|
||||
pMaterial.onChange(function(value){
|
||||
if(value === "RGB"){
|
||||
pointColorType = Potree.PointColorType.RGB;
|
||||
@ -124,7 +228,16 @@
|
||||
pointColorType = Potree.PointColorType.COLOR;
|
||||
}else if(value === "Height"){
|
||||
pointColorType = Potree.PointColorType.HEIGHT;
|
||||
|
||||
}else if(value === "Intensity"){
|
||||
pointColorType = Potree.PointColorType.INTENSITY;
|
||||
}else if(value === "Intensity Gradient"){
|
||||
pointColorType = Potree.PointColorType.INTENSITY_GRADIENT;
|
||||
}else if(value === "Classification"){
|
||||
pointColorType = Potree.PointColorType.CLASSIFICATION;
|
||||
}else if(value === "Return Number"){
|
||||
pointColorType = Potree.PointColorType.RETURN_NUMBER;
|
||||
}else if(value === "Source"){
|
||||
pointColorType = Potree.PointColorType.SOURCE;
|
||||
}else if(value === "Octree Depth"){
|
||||
pointColorType = Potree.PointColorType.OCTREE_DEPTH;
|
||||
}else if(value === "Point Index"){
|
||||
@ -132,19 +245,19 @@
|
||||
}
|
||||
});
|
||||
|
||||
if(renderer.context.getExtension("EXT_frag_depth")){
|
||||
var pInterpolate = gui.add(params, 'interpolate');
|
||||
pInterpolate.onChange(function(value){
|
||||
interpolate = value;
|
||||
});
|
||||
}
|
||||
var pQuality = gui.add(params, 'quality', [ "Normal", "Circles", "Interpolation", "Splats"]);
|
||||
pQuality.onChange(function(value){
|
||||
quality = value;
|
||||
});
|
||||
|
||||
var pCircular = gui.add(params, 'circles');
|
||||
pCircular.onChange(function(value){
|
||||
if(value){
|
||||
pointShape = Potree.PointShape.CIRCLE;
|
||||
}else{
|
||||
pointShape = Potree.PointShape.SQUARE;
|
||||
var pClipMode = gui.add(params, 'Clip Mode', [ "No Clipping", "Clip Outside", "Highlight Inside"]);
|
||||
pClipMode.onChange(function(value){
|
||||
if(value === "No Clipping"){
|
||||
clipMode = Potree.ClipMode.DISABLED;
|
||||
}else if(value === "Clip Outside"){
|
||||
clipMode = Potree.ClipMode.CLIP_OUTSIDE;
|
||||
}else if(value === "Highlight Inside"){
|
||||
clipMode = Potree.ClipMode.HIGHLIGHT_INSIDE;
|
||||
}
|
||||
});
|
||||
|
||||
@ -152,6 +265,16 @@
|
||||
pSykbox.onChange(function(value){
|
||||
showSkybox = value;
|
||||
});
|
||||
|
||||
var pStats = gui.add(params, 'stats');
|
||||
pStats.onChange(function(value){
|
||||
showStats = value;
|
||||
});
|
||||
|
||||
var pBoundingBox = gui.add(params, 'BoundingBox');
|
||||
pBoundingBox.onChange(function(value){
|
||||
showBoundingBox = value;
|
||||
});
|
||||
|
||||
// stats
|
||||
stats = new Stats();
|
||||
@ -167,10 +290,19 @@
|
||||
var height = elRenderArea.clientHeight;
|
||||
var aspect = width / height;
|
||||
var near = 0.1;
|
||||
var far = 100000;
|
||||
var far = 1000000;
|
||||
|
||||
scene = new THREE.Scene();
|
||||
scenePointCloud = new THREE.Scene();
|
||||
sceneBG = new THREE.Scene();
|
||||
|
||||
camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
|
||||
cameraBG = new THREE.Camera();
|
||||
|
||||
camera.rotation.order = 'ZYX';
|
||||
|
||||
referenceFrame = new THREE.Object3D();
|
||||
scenePointCloud.add(referenceFrame);
|
||||
|
||||
renderer = new THREE.WebGLRenderer();
|
||||
renderer.setSize(width, height);
|
||||
@ -180,10 +312,13 @@
|
||||
skybox = Potree.utils.loadSkybox("../resources/textures/skybox/");
|
||||
|
||||
// camera and controls
|
||||
camera.position.set(3, 7, 6);
|
||||
controls = new THREE.OrbitControls(camera, renderer.domElement);
|
||||
controls.target.set( 0, 5, 0 );
|
||||
camera.lookAt(controls.target);
|
||||
camera.position.set(-304, 372, 318);
|
||||
camera.rotation.y = -Math.PI / 4;
|
||||
camera.rotation.x = -Math.PI / 6;
|
||||
useOrbitControls();
|
||||
|
||||
|
||||
controls.moveSpeed *= 10;
|
||||
|
||||
// enable frag_depth extension for the interpolation shader, if available
|
||||
renderer.context.getExtension("EXT_frag_depth");
|
||||
@ -196,36 +331,147 @@
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
|
||||
pointcloud.rotation.set(Math.PI/2, 0.85* -Math.PI/2, -0.0);
|
||||
pointcloud.moveToOrigin();
|
||||
pointcloud.moveToGroundPlane();
|
||||
referenceFrame.add(pointcloud);
|
||||
|
||||
scene.add(pointcloud);
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
var sg = pointcloud.boundingSphere.clone().applyMatrix4(pointcloud.matrixWorld);
|
||||
|
||||
referenceFrame.position.copy(sg.center).multiplyScalar(-1);
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
|
||||
controls.moveSpeed = pointcloud.boundingSphere.radius / 2;
|
||||
|
||||
camera.zoomTo(pointcloud, 1);
|
||||
|
||||
flipYZ();
|
||||
|
||||
initGUI();
|
||||
useOrbitControls();
|
||||
});
|
||||
|
||||
var grid = Potree.utils.createGrid(5, 5, 2);
|
||||
scene.add(grid);
|
||||
|
||||
measuringTool = new Potree.MeasuringTool(scenePointCloud, camera, renderer);
|
||||
profileTool = new Potree.ProfileTool(scenePointCloud, camera, renderer);
|
||||
areaTool = new Potree.AreaTool(scenePointCloud, camera, renderer);
|
||||
volumeTool = new Potree.VolumeTool(scenePointCloud, camera, renderer);
|
||||
transformationTool = new Potree.TransformationTool(scenePointCloud, camera, renderer);
|
||||
|
||||
|
||||
// background
|
||||
// var texture = THREE.ImageUtils.loadTexture( '../resources/textures/background.gif' );
|
||||
var texture = Potree.utils.createBackgroundTexture(512, 512);
|
||||
|
||||
texture.minFilter = texture.magFilter = THREE.NearestFilter;
|
||||
texture.minFilter = texture.magFilter = THREE.LinearFilter;
|
||||
|
||||
var bg = new THREE.Mesh(
|
||||
new THREE.PlaneBufferGeometry(2, 2, 0),
|
||||
new THREE.MeshBasicMaterial({
|
||||
map: texture
|
||||
})
|
||||
);
|
||||
//bg.position.z = -1;
|
||||
bg.material.depthTest = false;
|
||||
bg.material.depthWrite = false;
|
||||
sceneBG.add(bg);
|
||||
|
||||
|
||||
window.addEventListener( 'keydown', onKeyDown, false );
|
||||
}
|
||||
|
||||
function flipYZ(){
|
||||
isFlipYZ = !isFlipYZ;
|
||||
|
||||
if(isFlipYZ){
|
||||
referenceFrame.matrix.copy(new THREE.Matrix4());
|
||||
referenceFrame.applyMatrix(new THREE.Matrix4().set(
|
||||
1,0,0,0,
|
||||
0,0,1,0,
|
||||
0,-1,0,0,
|
||||
0,0,0,1
|
||||
));
|
||||
|
||||
}else{
|
||||
referenceFrame.matrix.copy(new THREE.Matrix4());
|
||||
referenceFrame.applyMatrix(new THREE.Matrix4().set(
|
||||
1,0,0,0,
|
||||
0,1,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,1
|
||||
));
|
||||
}
|
||||
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
pointcloud.updateMatrixWorld();
|
||||
var sg = pointcloud.boundingSphere.clone().applyMatrix4(pointcloud.matrixWorld);
|
||||
referenceFrame.position.copy(sg.center).multiplyScalar(-1);
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
referenceFrame.position.y -= pointcloud.getWorldPosition().y;
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
}
|
||||
|
||||
function onKeyDown(event){
|
||||
//console.log(event.keyCode);
|
||||
|
||||
if(event.keyCode === 69){
|
||||
// e pressed
|
||||
|
||||
transformationTool.translate();
|
||||
}else if(event.keyCode === 82){
|
||||
// r pressed
|
||||
|
||||
transformationTool.scale();
|
||||
}else if(event.keyCode === 84){
|
||||
// r pressed
|
||||
|
||||
transformationTool.rotate();
|
||||
}
|
||||
};
|
||||
|
||||
function update(){
|
||||
if(pointcloud){
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointColorType = pointColorType;
|
||||
pointcloud.material.pointShape = pointShape;
|
||||
pointcloud.material.interpolate = interpolate;
|
||||
pointcloud.material.heightMin = 0;
|
||||
pointcloud.material.heightMax = 8;
|
||||
|
||||
pointcloud.update(camera, renderer);
|
||||
|
||||
document.getElementById("lblNumVisibleNodes").innerHTML = "visible nodes: " + pointcloud.numVisibleNodes;
|
||||
document.getElementById("lblNumVisiblePoints").innerHTML = "visible points: " + Potree.utils.addCommas(pointcloud.numVisiblePoints);
|
||||
var bbWorld = Potree.utils.computeTransformedBoundingBox(pointcloud.boundingBox, pointcloud.matrixWorld);
|
||||
|
||||
//pointcloud.material.size = pointSize;
|
||||
//pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
//pointcloud.material.opacity = opacity;
|
||||
//pointcloud.material.pointSizeType = pointSizeType;
|
||||
////pointcloud.material.pointColorType = pointColorType;
|
||||
//pointcloud.material.pointShape = (quality === "High") ? Potree.PointShape.CIRCLE : pointShape;
|
||||
//pointcloud.material.interpolate = (quality === "High");
|
||||
//pointcloud.material.heightMin = bbWorld.min.y;
|
||||
//pointcloud.material.heightMax = bbWorld.max.y;
|
||||
//pointcloud.material.clipMode = clipMode;
|
||||
////pointcloud.material.weighted = false;
|
||||
|
||||
pointcloud.material.clipMode = clipMode;
|
||||
pointcloud.material.heightMin = bbWorld.min.y;
|
||||
pointcloud.material.heightMax = bbWorld.max.y;
|
||||
pointcloud.material.intensityMin = 0;
|
||||
pointcloud.material.intensityMax = 200;
|
||||
pointcloud.showBoundingBox = showBoundingBox;
|
||||
pointcloud.update(camera, renderer);
|
||||
}
|
||||
|
||||
stats.update();
|
||||
if(stats && showStats){
|
||||
document.getElementById("lblNumVisibleNodes").style.display = "";
|
||||
document.getElementById("lblNumVisiblePoints").style.display = "";
|
||||
stats.domElement.style.display = "";
|
||||
|
||||
stats.update();
|
||||
|
||||
if(pointcloud){
|
||||
document.getElementById("lblNumVisibleNodes").innerHTML = "visible nodes: " + pointcloud.numVisibleNodes;
|
||||
document.getElementById("lblNumVisiblePoints").innerHTML = "visible points: " + Potree.utils.addCommas(pointcloud.numVisiblePoints);
|
||||
}
|
||||
}else if(stats){
|
||||
document.getElementById("lblNumVisibleNodes").style.display = "none";
|
||||
document.getElementById("lblNumVisiblePoints").style.display = "none";
|
||||
stats.domElement.style.display = "none";
|
||||
}
|
||||
|
||||
controls.update(clock.getDelta());
|
||||
|
||||
@ -245,6 +491,83 @@
|
||||
progressBar.show();
|
||||
progressBar.message = "loading metadata";
|
||||
}
|
||||
|
||||
volumeTool.update();
|
||||
transformationTool.update();
|
||||
profileTool.update();
|
||||
|
||||
|
||||
var clipBoxes = [];
|
||||
|
||||
//var profiles = [];
|
||||
//for(var i = 0; i < profileTool.profiles.length; i++){
|
||||
// profiles.push(profileTool.profiles[i]);
|
||||
//}
|
||||
//if(profileTool.activeProfile){
|
||||
// profiles.push(profileTool.activeProfile);
|
||||
//}
|
||||
for(var i = 0; i < profileTool.profiles.length; i++){
|
||||
var profile = profileTool.profiles[i];
|
||||
|
||||
for(var j = 0; j < profile.boxes.length; j++){
|
||||
var box = profile.boxes[j];
|
||||
box.updateMatrixWorld();
|
||||
var boxInverse = new THREE.Matrix4().getInverse(box.matrixWorld);
|
||||
clipBoxes.push(boxInverse);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
for(var i = 0; i < volumeTool.volumes.length; i++){
|
||||
var volume = volumeTool.volumes[i];
|
||||
|
||||
if(volume.clip){
|
||||
volume.updateMatrixWorld();
|
||||
var boxInverse = new THREE.Matrix4().getInverse(volume.matrixWorld);
|
||||
|
||||
clipBoxes.push(boxInverse);
|
||||
}
|
||||
}
|
||||
|
||||
if(pointcloud){
|
||||
pointcloud.material.setClipBoxes(clipBoxes);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//fpControls = new THREE.FirstPersonControls(camera, renderer.domElement);
|
||||
// orbitControls = new THREE.OrbitControls(camera, renderer.domElement);
|
||||
// controls = fpControls;
|
||||
// orbitControls.enabled = false;
|
||||
|
||||
|
||||
function useFPSControls(){
|
||||
if(controls){
|
||||
controls.enabled = false;
|
||||
}
|
||||
if(!fpControls){
|
||||
fpControls = new THREE.FirstPersonControls(camera, renderer.domElement);
|
||||
}
|
||||
|
||||
controls = fpControls;
|
||||
controls.enabled = true;
|
||||
}
|
||||
|
||||
function useOrbitControls(){
|
||||
if(controls){
|
||||
controls.enabled = false;
|
||||
}
|
||||
if(!orbitControls){
|
||||
orbitControls = new THREE.OrbitControls(camera, renderer.domElement);
|
||||
}
|
||||
|
||||
controls = orbitControls;
|
||||
controls.enabled = true;
|
||||
|
||||
if(pointcloud){
|
||||
controls.target.copy(pointcloud.boundingSphere.center.clone().applyMatrix4(pointcloud.matrixWorld));
|
||||
}
|
||||
}
|
||||
|
||||
function render(){
|
||||
@ -263,21 +586,196 @@
|
||||
if(showSkybox){
|
||||
skybox.camera.rotation.copy(camera.rotation);
|
||||
renderer.render(skybox.scene, skybox.camera);
|
||||
}else{
|
||||
renderer.render(sceneBG, cameraBG);
|
||||
}
|
||||
|
||||
if(pointcloud){
|
||||
if(pointcloud.originalMaterial){
|
||||
pointcloud.material = pointcloud.originalMaterial;
|
||||
}
|
||||
|
||||
var bbWorld = Potree.utils.computeTransformedBoundingBox(pointcloud.boundingBox, pointcloud.matrixWorld);
|
||||
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointColorType = pointColorType;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointShape = (quality === "Circles") ? Potree.PointShape.CIRCLE : Potree.PointShape.SQUARE;
|
||||
pointcloud.material.interpolate = (quality === "Interpolation");
|
||||
pointcloud.material.weighted = false;
|
||||
}
|
||||
|
||||
// render scene
|
||||
renderer.render(scene, camera);
|
||||
renderer.render(scenePointCloud, camera);
|
||||
|
||||
profileTool.render();
|
||||
volumeTool.render();
|
||||
|
||||
renderer.clearDepth();
|
||||
measuringTool.render();
|
||||
areaTool.render();
|
||||
transformationTool.render();
|
||||
}
|
||||
|
||||
// high quality rendering using splats
|
||||
//
|
||||
var rtDepth = new THREE.WebGLRenderTarget( 1024, 1024, {
|
||||
minFilter: THREE.NearestFilter,
|
||||
magFilter: THREE.NearestFilter,
|
||||
format: THREE.RGBAFormat,
|
||||
type: THREE.FloatType
|
||||
} );
|
||||
var rtNormalize = new THREE.WebGLRenderTarget( 1024, 1024, {
|
||||
minFilter: THREE.LinearFilter,
|
||||
magFilter: THREE.NearestFilter,
|
||||
format: THREE.RGBAFormat,
|
||||
type: THREE.FloatType
|
||||
} );
|
||||
|
||||
var sceneNormalize;
|
||||
|
||||
var depthMaterial, weightedMaterial;
|
||||
|
||||
// render with splats
|
||||
function renderHighQuality(){
|
||||
|
||||
if(!sceneNormalize){
|
||||
sceneNormalize = new THREE.Scene();
|
||||
|
||||
var vsNormalize = document.getElementById('vs').innerHTML;
|
||||
var fsNormalize = document.getElementById('fs').innerHTML;
|
||||
|
||||
var uniformsNormalize = {
|
||||
depthMap: { type: "t", value: rtDepth },
|
||||
texture: { type: "t", value: rtNormalize }
|
||||
};
|
||||
|
||||
var materialNormalize = new THREE.ShaderMaterial({
|
||||
uniforms: uniformsNormalize,
|
||||
vertexShader: vsNormalize,
|
||||
fragmentShader: fsNormalize
|
||||
});
|
||||
|
||||
var quad = new THREE.Mesh( new THREE.PlaneBufferGeometry(2, 2, 0), materialNormalize);
|
||||
quad.material.depthTest = true;
|
||||
quad.material.depthWrite = true;
|
||||
quad.material.transparent = true;
|
||||
sceneNormalize.add(quad);
|
||||
|
||||
}
|
||||
|
||||
// resize
|
||||
var width = elRenderArea.clientWidth;
|
||||
var height = elRenderArea.clientHeight;
|
||||
var aspect = width / height;
|
||||
|
||||
camera.aspect = aspect;
|
||||
camera.updateProjectionMatrix();
|
||||
|
||||
renderer.setSize(width, height);
|
||||
rtDepth.setSize(width, height);
|
||||
rtNormalize.setSize(width, height);
|
||||
|
||||
|
||||
renderer.clear();
|
||||
//renderer.render(sceneBG, cameraBG);
|
||||
// render skybox
|
||||
if(showSkybox){
|
||||
skybox.camera.rotation.copy(camera.rotation);
|
||||
renderer.render(skybox.scene, skybox.camera);
|
||||
}else{
|
||||
renderer.render(sceneBG, cameraBG);
|
||||
}
|
||||
renderer.render(scene, camera);
|
||||
|
||||
if(pointcloud){
|
||||
if(!weightedMaterial){
|
||||
pointcloud.originalMaterial = pointcloud.material;
|
||||
depthMaterial = new Potree.PointCloudMaterial();
|
||||
weightedMaterial = new Potree.PointCloudMaterial();
|
||||
}
|
||||
|
||||
pointcloud.material = depthMaterial;
|
||||
|
||||
var bbWorld = Potree.utils.computeTransformedBoundingBox(pointcloud.boundingBox, pointcloud.matrixWorld);
|
||||
|
||||
// get rid of this
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointColorType = Potree.PointColorType.DEPTH;
|
||||
pointcloud.material.pointShape = Potree.PointShape.CIRCLE;
|
||||
pointcloud.material.interpolate = (quality === "Interpolate");
|
||||
pointcloud.material.weighted = false;
|
||||
|
||||
pointcloud.material.minSize = 2;
|
||||
pointcloud.material.screenWidth = width;
|
||||
pointcloud.material.screenHeight = height;
|
||||
|
||||
pointcloud.update(camera, renderer);
|
||||
|
||||
renderer.clearTarget( rtDepth, true, true, true );
|
||||
renderer.clearTarget( rtNormalize, true, true, true );
|
||||
|
||||
var origType = pointcloud.material.pointColorType;
|
||||
renderer.render(scenePointCloud, camera, rtDepth);
|
||||
|
||||
pointcloud.material = weightedMaterial;
|
||||
|
||||
|
||||
|
||||
// get rid of this
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointColorType = pointColorType;
|
||||
pointcloud.material.pointShape = Potree.PointShape.CIRCLE;
|
||||
pointcloud.material.interpolate = (quality === "Interpolation");
|
||||
pointcloud.material.weighted = true;
|
||||
|
||||
pointcloud.material.depthMap = rtDepth;
|
||||
pointcloud.material.blendDepth = Math.min(pointcloud.material.spacing, 20);
|
||||
pointcloud.update(camera, renderer);
|
||||
renderer.render(scenePointCloud, camera, rtNormalize);
|
||||
|
||||
|
||||
volumeTool.render();
|
||||
profileTool.render();
|
||||
renderer.render(sceneNormalize, cameraBG);
|
||||
|
||||
|
||||
renderer.clearDepth();
|
||||
measuringTool.render();
|
||||
areaTool.render();
|
||||
transformationTool.render();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function loop() {
|
||||
requestAnimationFrame(loop);
|
||||
|
||||
update();
|
||||
render();
|
||||
|
||||
if(quality === "Splats"){
|
||||
renderHighQuality();
|
||||
}else{
|
||||
render();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
initThree();
|
||||
initGUI();
|
||||
//initGUI();
|
||||
loop();
|
||||
|
||||
</script>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Lion</title>
|
||||
<title>Viewer</title>
|
||||
<style>canvas { width: 100%; height: 100% }</style>
|
||||
</head>
|
||||
<body style="margin: 0; padding: 0">
|
||||
@ -28,6 +28,37 @@
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script id="vs" type="x-shader/x-vertex">
|
||||
varying vec2 vUv;
|
||||
|
||||
void main() {
|
||||
vUv = uv;
|
||||
|
||||
gl_Position = projectionMatrix *
|
||||
modelViewMatrix *
|
||||
vec4(position,1.0);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script id="fs" type="x-shader/x-vertex">
|
||||
|
||||
#extension GL_EXT_frag_depth : enable
|
||||
|
||||
uniform sampler2D depthMap;
|
||||
uniform sampler2D texture;
|
||||
|
||||
varying vec2 vUv;
|
||||
|
||||
void main() {
|
||||
vec4 color = texture2D(texture, vUv);
|
||||
float depth = texture2D(depthMap, vUv).g;
|
||||
color = color / color.w;
|
||||
gl_FragColor = color;
|
||||
|
||||
gl_FragDepthEXT = depth;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="../libs/plasio/js/laslaz.js"></script>
|
||||
<script src="../libs/plasio/vendor/bluebird.js"></script>
|
||||
@ -38,64 +69,130 @@
|
||||
|
||||
<script src="../build/js/potree.js"></script>
|
||||
<script src="../build/js/laslaz.js"></script>
|
||||
<script src="js/ProgressBar.js"></script>
|
||||
<script src="../examples/js/ProgressBar.js"></script>
|
||||
|
||||
<div id="lblNumVisibleNodes" class="info" style="position: absolute; left: 10px; top: 80px; width: 400px; color:white"></div>
|
||||
<div id="lblNumVisiblePoints" class="info" style="position: absolute; left: 10px; top: 100px; width: 400px; color:white"></div>
|
||||
<div id="lblMessage" class="info" style="position: absolute; left: 10px; bottom: 0px; width: 400px; color:white"></div>
|
||||
|
||||
<div id="tools" style="position: fixed; width: 340px; bottom: 10px; right: 10px">
|
||||
|
||||
|
||||
<img src="../resources/icons/fps_controls.png"
|
||||
onclick="useFPSControls()"
|
||||
title="Fly Camera"/>
|
||||
|
||||
<img src="../resources/icons/orbit_controls.png"
|
||||
onclick="useOrbitControls()"
|
||||
title="Orbit Controls"/>
|
||||
|
||||
<img src="../resources/icons/focus.png"
|
||||
onclick="camera.zoomTo(pointcloud)"
|
||||
title="focus on pointcloud"/>
|
||||
|
||||
<img src="../resources/icons/flip_y_z.png"
|
||||
onclick="flipYZ()"
|
||||
title="flip y and z coordinates"/>
|
||||
|
||||
|
||||
<img src="../resources/icons/distance.png"
|
||||
onclick="measuringTool.setEnabled(true)"
|
||||
title="distance measurements"/>
|
||||
<img src="../resources/icons/area.png"
|
||||
onclick="areaTool.setEnabled(true)"
|
||||
title="area measurements"/>
|
||||
|
||||
<img src="../resources/icons/volume.png"
|
||||
onclick="volumeTool.startInsertion()"
|
||||
title="volume measurements"/>
|
||||
|
||||
<img src="../resources/icons/profile.png"
|
||||
onclick="profileTool.startInsertion({width: pointcloud.boundingSphere.radius / 100})"
|
||||
title="height profiles"/>
|
||||
|
||||
<img src="../resources/icons/clip_volume.png"
|
||||
onclick="volumeTool.startInsertion({clip: true})"
|
||||
title="clipping volumes"/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="info" style="position: absolute; left: 300px; right: 300px; top: 10px; text-align: center;">
|
||||
<a href="http://potree.org" target="_blank">potree.org</a><br>
|
||||
<a href="http://potree.org" target="_blank">potree.org</a>
|
||||
</div>
|
||||
|
||||
<div id="renderArea"></div>
|
||||
|
||||
<script>
|
||||
var pointSize = 1;
|
||||
var pointCountTarget = 0.4;
|
||||
var pointSize = 1.0 ;
|
||||
var pointCountTarget = 1;
|
||||
var opacity = 1;
|
||||
var pointSizeType = Potree.PointSizeType.ADAPTIVE;
|
||||
var pointColorType = Potree.PointColorType.RGB;
|
||||
var pointShape = Potree.PointShape.SQUARE;
|
||||
var interpolate = false;
|
||||
var clipMode = Potree.ClipMode.HIGHLIGHT_INSIDE;
|
||||
var quality = "Normal";
|
||||
var isFlipYZ = false;
|
||||
|
||||
var showStats = false;
|
||||
var showBoundingBox = false;
|
||||
|
||||
var fpControls;
|
||||
var orbitControls;
|
||||
var controls;
|
||||
|
||||
var progressBar = new ProgressBar();
|
||||
|
||||
|
||||
|
||||
|
||||
var pointcloudPath = "../resources/pointclouds/lion_takanawa_las/cloud.js";
|
||||
|
||||
var pointcloudPath = "../resources/pointclouds/lion_takanawa_las/cloud.js";
|
||||
|
||||
var elRenderArea = document.getElementById("renderArea");
|
||||
|
||||
var gui;
|
||||
var renderer;
|
||||
var camera;
|
||||
var scene;
|
||||
var scenePointCloud;
|
||||
var sceneBG, cameraBG;
|
||||
var pointcloud;
|
||||
var skybox;
|
||||
var stats;
|
||||
var clock = new THREE.Clock();
|
||||
var showSkybox = false;
|
||||
var measuringTool;
|
||||
var areaTool;
|
||||
var volumeTool;
|
||||
var transformationTool;
|
||||
var referenceFrame;
|
||||
|
||||
function initGUI(){
|
||||
|
||||
// dat.gui
|
||||
var gui = new dat.GUI({
|
||||
gui = new dat.GUI({
|
||||
height : 5 * 32 - 1
|
||||
});
|
||||
|
||||
var params = {
|
||||
params = {
|
||||
"points(m)": pointCountTarget,
|
||||
PointSize: pointSize,
|
||||
"opacity": opacity,
|
||||
"SizeType" : "Adaptive",
|
||||
"show octree" : false,
|
||||
"Materials" : "RGB",
|
||||
"interpolate": interpolate,
|
||||
"circles": false,
|
||||
"skybox": false
|
||||
"Clip Mode": "Highlight Inside",
|
||||
"quality": "Normal",
|
||||
"skybox": false,
|
||||
"stats": showStats,
|
||||
"BoundingBox": showBoundingBox
|
||||
};
|
||||
|
||||
var pPoints = gui.add(params, 'points(m)', 0.02, 0.5);
|
||||
var pPoints = gui.add(params, 'points(m)', 0.02, 2);
|
||||
pPoints.onChange(function(value){
|
||||
pointCountTarget = value;
|
||||
pointCountTarget = value ;
|
||||
});
|
||||
|
||||
var pPointSize = gui.add(params, 'PointSize', 0, 3);
|
||||
@ -119,7 +216,17 @@
|
||||
}
|
||||
});
|
||||
|
||||
var pMaterial = gui.add(params, 'Materials', [ "RGB", "Color", "Height", "Intensity", "Intensity Gradient", "Octree Depth"]);
|
||||
var options = [];
|
||||
if(pointcloud.pcoGeometry.pointAttributes === "LAS" || pointcloud.pcoGeometry.pointAttributes === "LAZ"){
|
||||
options = [
|
||||
"RGB", "Color", "Height", "Intensity", "Intensity Gradient",
|
||||
"Classification", "Return Number", "Source",
|
||||
"Octree Depth"];
|
||||
}else{
|
||||
options = options = [ "RGB", "Color", "Height", "Octree Depth"];
|
||||
}
|
||||
|
||||
pMaterial = gui.add(params, 'Materials',options);
|
||||
pMaterial.onChange(function(value){
|
||||
if(value === "RGB"){
|
||||
pointColorType = Potree.PointColorType.RGB;
|
||||
@ -127,31 +234,36 @@
|
||||
pointColorType = Potree.PointColorType.COLOR;
|
||||
}else if(value === "Height"){
|
||||
pointColorType = Potree.PointColorType.HEIGHT;
|
||||
|
||||
}else if(value === "Octree Depth"){
|
||||
pointColorType = Potree.PointColorType.OCTREE_DEPTH;
|
||||
}else if(value === "Point Index"){
|
||||
pointColorType = Potree.PointColorType.POINT_INDEX;
|
||||
}else if(value === "Intensity"){
|
||||
pointColorType = Potree.PointColorType.INTENSITY;
|
||||
}else if(value === "Intensity Gradient"){
|
||||
pointColorType = Potree.PointColorType.INTENSITY_GRADIENT;
|
||||
}else if(value === "Classification"){
|
||||
pointColorType = Potree.PointColorType.CLASSIFICATION;
|
||||
}else if(value === "Return Number"){
|
||||
pointColorType = Potree.PointColorType.RETURN_NUMBER;
|
||||
}else if(value === "Source"){
|
||||
pointColorType = Potree.PointColorType.SOURCE;
|
||||
}else if(value === "Octree Depth"){
|
||||
pointColorType = Potree.PointColorType.OCTREE_DEPTH;
|
||||
}else if(value === "Point Index"){
|
||||
pointColorType = Potree.PointColorType.POINT_INDEX;
|
||||
}
|
||||
});
|
||||
|
||||
if(renderer.context.getExtension("EXT_frag_depth")){
|
||||
var pInterpolate = gui.add(params, 'interpolate');
|
||||
pInterpolate.onChange(function(value){
|
||||
interpolate = value;
|
||||
});
|
||||
}
|
||||
var pQuality = gui.add(params, 'quality', [ "Normal", "Circles", "Interpolation", "Splats"]);
|
||||
pQuality.onChange(function(value){
|
||||
quality = value;
|
||||
});
|
||||
|
||||
var pCircular = gui.add(params, 'circles');
|
||||
pCircular.onChange(function(value){
|
||||
if(value){
|
||||
pointShape = Potree.PointShape.CIRCLE;
|
||||
}else{
|
||||
pointShape = Potree.PointShape.SQUARE;
|
||||
var pClipMode = gui.add(params, 'Clip Mode', [ "No Clipping", "Clip Outside", "Highlight Inside"]);
|
||||
pClipMode.onChange(function(value){
|
||||
if(value === "No Clipping"){
|
||||
clipMode = Potree.ClipMode.DISABLED;
|
||||
}else if(value === "Clip Outside"){
|
||||
clipMode = Potree.ClipMode.CLIP_OUTSIDE;
|
||||
}else if(value === "Highlight Inside"){
|
||||
clipMode = Potree.ClipMode.HIGHLIGHT_INSIDE;
|
||||
}
|
||||
});
|
||||
|
||||
@ -159,6 +271,16 @@
|
||||
pSykbox.onChange(function(value){
|
||||
showSkybox = value;
|
||||
});
|
||||
|
||||
var pStats = gui.add(params, 'stats');
|
||||
pStats.onChange(function(value){
|
||||
showStats = value;
|
||||
});
|
||||
|
||||
var pBoundingBox = gui.add(params, 'BoundingBox');
|
||||
pBoundingBox.onChange(function(value){
|
||||
showBoundingBox = value;
|
||||
});
|
||||
|
||||
// stats
|
||||
stats = new Stats();
|
||||
@ -174,10 +296,19 @@
|
||||
var height = elRenderArea.clientHeight;
|
||||
var aspect = width / height;
|
||||
var near = 0.1;
|
||||
var far = 100000;
|
||||
var far = 1000000;
|
||||
|
||||
scene = new THREE.Scene();
|
||||
scenePointCloud = new THREE.Scene();
|
||||
sceneBG = new THREE.Scene();
|
||||
|
||||
camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
|
||||
//camera = new THREE.OrthographicCamera(-50, 50, 50, -50, 1, 100000);
|
||||
cameraBG = new THREE.Camera();
|
||||
camera.rotation.order = 'ZYX';
|
||||
|
||||
referenceFrame = new THREE.Object3D();
|
||||
scenePointCloud.add(referenceFrame);
|
||||
|
||||
renderer = new THREE.WebGLRenderer();
|
||||
renderer.setSize(width, height);
|
||||
@ -187,10 +318,13 @@
|
||||
skybox = Potree.utils.loadSkybox("../resources/textures/skybox/");
|
||||
|
||||
// camera and controls
|
||||
camera.position.set(3, 7, 6);
|
||||
controls = new THREE.OrbitControls(camera, renderer.domElement);
|
||||
controls.target.set( 0, 5, 0 );
|
||||
camera.lookAt(controls.target);
|
||||
camera.position.set(-304, 372, 318);
|
||||
camera.rotation.y = -Math.PI / 4;
|
||||
camera.rotation.x = -Math.PI / 6;
|
||||
useOrbitControls();
|
||||
|
||||
|
||||
controls.moveSpeed *= 10;
|
||||
|
||||
// enable frag_depth extension for the interpolation shader, if available
|
||||
renderer.context.getExtension("EXT_frag_depth");
|
||||
@ -203,38 +337,147 @@
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
|
||||
pointcloud.rotation.set(Math.PI/2, 0.85* -Math.PI/2, -0.0);
|
||||
pointcloud.moveToOrigin();
|
||||
pointcloud.moveToGroundPlane();
|
||||
referenceFrame.add(pointcloud);
|
||||
|
||||
scene.add(pointcloud);
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
var sg = pointcloud.boundingSphere.clone().applyMatrix4(pointcloud.matrixWorld);
|
||||
|
||||
referenceFrame.position.copy(sg.center).multiplyScalar(-1);
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
|
||||
controls.moveSpeed = pointcloud.boundingSphere.radius / 2;
|
||||
|
||||
camera.zoomTo(pointcloud, 1);
|
||||
|
||||
flipYZ();
|
||||
|
||||
initGUI();
|
||||
useOrbitControls();
|
||||
});
|
||||
|
||||
var grid = Potree.utils.createGrid(5, 5, 2);
|
||||
scene.add(grid);
|
||||
|
||||
measuringTool = new Potree.MeasuringTool(scenePointCloud, camera, renderer);
|
||||
profileTool = new Potree.ProfileTool(scenePointCloud, camera, renderer);
|
||||
areaTool = new Potree.AreaTool(scenePointCloud, camera, renderer);
|
||||
volumeTool = new Potree.VolumeTool(scenePointCloud, camera, renderer);
|
||||
transformationTool = new Potree.TransformationTool(scenePointCloud, camera, renderer);
|
||||
|
||||
|
||||
// background
|
||||
// var texture = THREE.ImageUtils.loadTexture( '../resources/textures/background.gif' );
|
||||
var texture = Potree.utils.createBackgroundTexture(512, 512);
|
||||
|
||||
texture.minFilter = texture.magFilter = THREE.NearestFilter;
|
||||
texture.minFilter = texture.magFilter = THREE.LinearFilter;
|
||||
|
||||
var bg = new THREE.Mesh(
|
||||
new THREE.PlaneBufferGeometry(2, 2, 0),
|
||||
new THREE.MeshBasicMaterial({
|
||||
map: texture
|
||||
})
|
||||
);
|
||||
//bg.position.z = -1;
|
||||
bg.material.depthTest = false;
|
||||
bg.material.depthWrite = false;
|
||||
sceneBG.add(bg);
|
||||
|
||||
|
||||
window.addEventListener( 'keydown', onKeyDown, false );
|
||||
}
|
||||
|
||||
function flipYZ(){
|
||||
isFlipYZ = !isFlipYZ;
|
||||
|
||||
if(isFlipYZ){
|
||||
referenceFrame.matrix.copy(new THREE.Matrix4());
|
||||
referenceFrame.applyMatrix(new THREE.Matrix4().set(
|
||||
1,0,0,0,
|
||||
0,0,1,0,
|
||||
0,-1,0,0,
|
||||
0,0,0,1
|
||||
));
|
||||
|
||||
}else{
|
||||
referenceFrame.matrix.copy(new THREE.Matrix4());
|
||||
referenceFrame.applyMatrix(new THREE.Matrix4().set(
|
||||
1,0,0,0,
|
||||
0,1,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,1
|
||||
));
|
||||
}
|
||||
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
pointcloud.updateMatrixWorld();
|
||||
var sg = pointcloud.boundingSphere.clone().applyMatrix4(pointcloud.matrixWorld);
|
||||
referenceFrame.position.copy(sg.center).multiplyScalar(-1);
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
referenceFrame.position.y -= pointcloud.getWorldPosition().y;
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
}
|
||||
|
||||
function onKeyDown(event){
|
||||
//console.log(event.keyCode);
|
||||
|
||||
if(event.keyCode === 69){
|
||||
// e pressed
|
||||
|
||||
transformationTool.translate();
|
||||
}else if(event.keyCode === 82){
|
||||
// r pressed
|
||||
|
||||
transformationTool.scale();
|
||||
}else if(event.keyCode === 84){
|
||||
// r pressed
|
||||
|
||||
transformationTool.rotate();
|
||||
}
|
||||
};
|
||||
|
||||
function update(){
|
||||
if(pointcloud){
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointColorType = pointColorType;
|
||||
pointcloud.material.pointShape = pointShape;
|
||||
pointcloud.material.interpolate = interpolate;
|
||||
pointcloud.material.heightMin = 0;
|
||||
pointcloud.material.heightMax = 8;
|
||||
|
||||
var bbWorld = Potree.utils.computeTransformedBoundingBox(pointcloud.boundingBox, pointcloud.matrixWorld);
|
||||
|
||||
//pointcloud.material.size = pointSize;
|
||||
//pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
//pointcloud.material.opacity = opacity;
|
||||
//pointcloud.material.pointSizeType = pointSizeType;
|
||||
////pointcloud.material.pointColorType = pointColorType;
|
||||
//pointcloud.material.pointShape = (quality === "High") ? Potree.PointShape.CIRCLE : pointShape;
|
||||
//pointcloud.material.interpolate = (quality === "High");
|
||||
//pointcloud.material.heightMin = bbWorld.min.y;
|
||||
//pointcloud.material.heightMax = bbWorld.max.y;
|
||||
//pointcloud.material.clipMode = clipMode;
|
||||
////pointcloud.material.weighted = false;
|
||||
|
||||
pointcloud.material.clipMode = clipMode;
|
||||
pointcloud.material.heightMin = bbWorld.min.y;
|
||||
pointcloud.material.heightMax = bbWorld.max.y;
|
||||
pointcloud.material.intensityMin = 0;
|
||||
pointcloud.material.intensityMax = 65000;
|
||||
|
||||
pointcloud.showBoundingBox = showBoundingBox;
|
||||
pointcloud.update(camera, renderer);
|
||||
|
||||
document.getElementById("lblNumVisibleNodes").innerHTML = "visible nodes: " + pointcloud.numVisibleNodes;
|
||||
document.getElementById("lblNumVisiblePoints").innerHTML = "visible points: " + Potree.utils.addCommas(pointcloud.numVisiblePoints);
|
||||
}
|
||||
|
||||
stats.update();
|
||||
if(stats && showStats){
|
||||
document.getElementById("lblNumVisibleNodes").style.display = "";
|
||||
document.getElementById("lblNumVisiblePoints").style.display = "";
|
||||
stats.domElement.style.display = "";
|
||||
|
||||
stats.update();
|
||||
|
||||
if(pointcloud){
|
||||
document.getElementById("lblNumVisibleNodes").innerHTML = "visible nodes: " + pointcloud.numVisibleNodes;
|
||||
document.getElementById("lblNumVisiblePoints").innerHTML = "visible points: " + Potree.utils.addCommas(pointcloud.numVisiblePoints);
|
||||
}
|
||||
}else if(stats){
|
||||
document.getElementById("lblNumVisibleNodes").style.display = "none";
|
||||
document.getElementById("lblNumVisiblePoints").style.display = "none";
|
||||
stats.domElement.style.display = "none";
|
||||
}
|
||||
|
||||
controls.update(clock.getDelta());
|
||||
|
||||
@ -254,6 +497,77 @@
|
||||
progressBar.show();
|
||||
progressBar.message = "loading metadata";
|
||||
}
|
||||
|
||||
volumeTool.update();
|
||||
transformationTool.update();
|
||||
profileTool.update();
|
||||
|
||||
|
||||
var clipBoxes = [];
|
||||
|
||||
//var profiles = [];
|
||||
//for(var i = 0; i < profileTool.profiles.length; i++){
|
||||
// profiles.push(profileTool.profiles[i]);
|
||||
//}
|
||||
//if(profileTool.activeProfile){
|
||||
// profiles.push(profileTool.activeProfile);
|
||||
//}
|
||||
for(var i = 0; i < profileTool.profiles.length; i++){
|
||||
var profile = profileTool.profiles[i];
|
||||
|
||||
for(var j = 0; j < profile.boxes.length; j++){
|
||||
var box = profile.boxes[j];
|
||||
box.updateMatrixWorld();
|
||||
var boxInverse = new THREE.Matrix4().getInverse(box.matrixWorld);
|
||||
clipBoxes.push(boxInverse);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
for(var i = 0; i < volumeTool.volumes.length; i++){
|
||||
var volume = volumeTool.volumes[i];
|
||||
|
||||
if(volume.clip){
|
||||
volume.updateMatrixWorld();
|
||||
var boxInverse = new THREE.Matrix4().getInverse(volume.matrixWorld);
|
||||
|
||||
clipBoxes.push(boxInverse);
|
||||
}
|
||||
}
|
||||
|
||||
if(pointcloud){
|
||||
pointcloud.material.setClipBoxes(clipBoxes);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function useFPSControls(){
|
||||
if(controls){
|
||||
controls.enabled = false;
|
||||
}
|
||||
if(!fpControls){
|
||||
fpControls = new THREE.FirstPersonControls(camera, renderer.domElement);
|
||||
}
|
||||
|
||||
controls = fpControls;
|
||||
controls.enabled = true;
|
||||
}
|
||||
|
||||
function useOrbitControls(){
|
||||
if(controls){
|
||||
controls.enabled = false;
|
||||
}
|
||||
if(!orbitControls){
|
||||
orbitControls = new THREE.OrbitControls(camera, renderer.domElement);
|
||||
}
|
||||
|
||||
controls = orbitControls;
|
||||
controls.enabled = true;
|
||||
|
||||
if(pointcloud){
|
||||
controls.target.copy(pointcloud.boundingSphere.center.clone().applyMatrix4(pointcloud.matrixWorld));
|
||||
}
|
||||
}
|
||||
|
||||
function render(){
|
||||
@ -272,21 +586,196 @@
|
||||
if(showSkybox){
|
||||
skybox.camera.rotation.copy(camera.rotation);
|
||||
renderer.render(skybox.scene, skybox.camera);
|
||||
}else{
|
||||
renderer.render(sceneBG, cameraBG);
|
||||
}
|
||||
|
||||
if(pointcloud){
|
||||
if(pointcloud.originalMaterial){
|
||||
pointcloud.material = pointcloud.originalMaterial;
|
||||
}
|
||||
|
||||
var bbWorld = Potree.utils.computeTransformedBoundingBox(pointcloud.boundingBox, pointcloud.matrixWorld);
|
||||
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointColorType = pointColorType;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointShape = (quality === "Circles") ? Potree.PointShape.CIRCLE : Potree.PointShape.SQUARE;
|
||||
pointcloud.material.interpolate = (quality === "Interpolation");
|
||||
pointcloud.material.weighted = false;
|
||||
}
|
||||
|
||||
// render scene
|
||||
renderer.render(scene, camera);
|
||||
renderer.render(scenePointCloud, camera);
|
||||
|
||||
profileTool.render();
|
||||
volumeTool.render();
|
||||
|
||||
renderer.clearDepth();
|
||||
measuringTool.render();
|
||||
areaTool.render();
|
||||
transformationTool.render();
|
||||
}
|
||||
|
||||
// high quality rendering using splats
|
||||
//
|
||||
var rtDepth = new THREE.WebGLRenderTarget( 1024, 1024, {
|
||||
minFilter: THREE.NearestFilter,
|
||||
magFilter: THREE.NearestFilter,
|
||||
format: THREE.RGBAFormat,
|
||||
type: THREE.FloatType
|
||||
} );
|
||||
var rtNormalize = new THREE.WebGLRenderTarget( 1024, 1024, {
|
||||
minFilter: THREE.LinearFilter,
|
||||
magFilter: THREE.NearestFilter,
|
||||
format: THREE.RGBAFormat,
|
||||
type: THREE.FloatType
|
||||
} );
|
||||
|
||||
var sceneNormalize;
|
||||
|
||||
var depthMaterial, weightedMaterial;
|
||||
|
||||
// render with splats
|
||||
function renderHighQuality(){
|
||||
|
||||
if(!sceneNormalize){
|
||||
sceneNormalize = new THREE.Scene();
|
||||
|
||||
var vsNormalize = document.getElementById('vs').innerHTML;
|
||||
var fsNormalize = document.getElementById('fs').innerHTML;
|
||||
|
||||
var uniformsNormalize = {
|
||||
depthMap: { type: "t", value: rtDepth },
|
||||
texture: { type: "t", value: rtNormalize }
|
||||
};
|
||||
|
||||
var materialNormalize = new THREE.ShaderMaterial({
|
||||
uniforms: uniformsNormalize,
|
||||
vertexShader: vsNormalize,
|
||||
fragmentShader: fsNormalize
|
||||
});
|
||||
|
||||
var quad = new THREE.Mesh( new THREE.PlaneBufferGeometry(2, 2, 0), materialNormalize);
|
||||
quad.material.depthTest = true;
|
||||
quad.material.depthWrite = true;
|
||||
quad.material.transparent = true;
|
||||
sceneNormalize.add(quad);
|
||||
|
||||
}
|
||||
|
||||
// resize
|
||||
var width = elRenderArea.clientWidth;
|
||||
var height = elRenderArea.clientHeight;
|
||||
var aspect = width / height;
|
||||
|
||||
camera.aspect = aspect;
|
||||
camera.updateProjectionMatrix();
|
||||
|
||||
renderer.setSize(width, height);
|
||||
rtDepth.setSize(width, height);
|
||||
rtNormalize.setSize(width, height);
|
||||
|
||||
|
||||
renderer.clear();
|
||||
//renderer.render(sceneBG, cameraBG);
|
||||
// render skybox
|
||||
if(showSkybox){
|
||||
skybox.camera.rotation.copy(camera.rotation);
|
||||
renderer.render(skybox.scene, skybox.camera);
|
||||
}else{
|
||||
renderer.render(sceneBG, cameraBG);
|
||||
}
|
||||
renderer.render(scene, camera);
|
||||
|
||||
if(pointcloud){
|
||||
if(!weightedMaterial){
|
||||
pointcloud.originalMaterial = pointcloud.material;
|
||||
depthMaterial = new Potree.PointCloudMaterial();
|
||||
weightedMaterial = new Potree.PointCloudMaterial();
|
||||
}
|
||||
|
||||
pointcloud.material = depthMaterial;
|
||||
|
||||
var bbWorld = Potree.utils.computeTransformedBoundingBox(pointcloud.boundingBox, pointcloud.matrixWorld);
|
||||
|
||||
// get rid of this
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointColorType = Potree.PointColorType.DEPTH;
|
||||
pointcloud.material.pointShape = Potree.PointShape.CIRCLE;
|
||||
pointcloud.material.interpolate = (quality === "Interpolate");
|
||||
pointcloud.material.weighted = false;
|
||||
|
||||
pointcloud.material.minSize = 2;
|
||||
pointcloud.material.screenWidth = width;
|
||||
pointcloud.material.screenHeight = height;
|
||||
|
||||
pointcloud.update(camera, renderer);
|
||||
|
||||
renderer.clearTarget( rtDepth, true, true, true );
|
||||
renderer.clearTarget( rtNormalize, true, true, true );
|
||||
|
||||
var origType = pointcloud.material.pointColorType;
|
||||
renderer.render(scenePointCloud, camera, rtDepth);
|
||||
|
||||
pointcloud.material = weightedMaterial;
|
||||
|
||||
|
||||
|
||||
// get rid of this
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointColorType = pointColorType;
|
||||
pointcloud.material.pointShape = Potree.PointShape.CIRCLE;
|
||||
pointcloud.material.interpolate = (quality === "Interpolation");
|
||||
pointcloud.material.weighted = true;
|
||||
|
||||
pointcloud.material.depthMap = rtDepth;
|
||||
pointcloud.material.blendDepth = Math.min(pointcloud.material.spacing, 20);
|
||||
pointcloud.update(camera, renderer);
|
||||
renderer.render(scenePointCloud, camera, rtNormalize);
|
||||
|
||||
|
||||
volumeTool.render();
|
||||
profileTool.render();
|
||||
renderer.render(sceneNormalize, cameraBG);
|
||||
|
||||
|
||||
renderer.clearDepth();
|
||||
measuringTool.render();
|
||||
areaTool.render();
|
||||
transformationTool.render();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function loop() {
|
||||
requestAnimationFrame(loop);
|
||||
|
||||
update();
|
||||
render();
|
||||
|
||||
if(quality === "Splats"){
|
||||
renderHighQuality();
|
||||
}else{
|
||||
render();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
initThree();
|
||||
initGUI();
|
||||
//initGUI();
|
||||
loop();
|
||||
|
||||
</script>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Lion</title>
|
||||
<title>Viewer</title>
|
||||
<style>canvas { width: 100%; height: 100% }</style>
|
||||
</head>
|
||||
<body style="margin: 0; padding: 0">
|
||||
@ -28,6 +28,37 @@
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script id="vs" type="x-shader/x-vertex">
|
||||
varying vec2 vUv;
|
||||
|
||||
void main() {
|
||||
vUv = uv;
|
||||
|
||||
gl_Position = projectionMatrix *
|
||||
modelViewMatrix *
|
||||
vec4(position,1.0);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script id="fs" type="x-shader/x-vertex">
|
||||
|
||||
#extension GL_EXT_frag_depth : enable
|
||||
|
||||
uniform sampler2D depthMap;
|
||||
uniform sampler2D texture;
|
||||
|
||||
varying vec2 vUv;
|
||||
|
||||
void main() {
|
||||
vec4 color = texture2D(texture, vUv);
|
||||
float depth = texture2D(depthMap, vUv).g;
|
||||
color = color / color.w;
|
||||
gl_FragColor = color;
|
||||
|
||||
gl_FragDepthEXT = depth;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="../libs/plasio/js/laslaz.js"></script>
|
||||
<script src="../libs/plasio/vendor/bluebird.js"></script>
|
||||
@ -38,64 +69,130 @@
|
||||
|
||||
<script src="../build/js/potree.js"></script>
|
||||
<script src="../build/js/laslaz.js"></script>
|
||||
<script src="js/ProgressBar.js"></script>
|
||||
<script src="../examples/js/ProgressBar.js"></script>
|
||||
|
||||
<div id="lblNumVisibleNodes" class="info" style="position: absolute; left: 10px; top: 80px; width: 400px; color:white"></div>
|
||||
<div id="lblNumVisiblePoints" class="info" style="position: absolute; left: 10px; top: 100px; width: 400px; color:white"></div>
|
||||
<div id="lblMessage" class="info" style="position: absolute; left: 10px; bottom: 0px; width: 400px; color:white"></div>
|
||||
|
||||
<div id="tools" style="position: fixed; width: 340px; bottom: 10px; right: 10px">
|
||||
|
||||
|
||||
<img src="../resources/icons/fps_controls.png"
|
||||
onclick="useFPSControls()"
|
||||
title="Fly Camera"/>
|
||||
|
||||
<img src="../resources/icons/orbit_controls.png"
|
||||
onclick="useOrbitControls()"
|
||||
title="Orbit Controls"/>
|
||||
|
||||
<img src="../resources/icons/focus.png"
|
||||
onclick="camera.zoomTo(pointcloud)"
|
||||
title="focus on pointcloud"/>
|
||||
|
||||
<img src="../resources/icons/flip_y_z.png"
|
||||
onclick="flipYZ()"
|
||||
title="flip y and z coordinates"/>
|
||||
|
||||
|
||||
<img src="../resources/icons/distance.png"
|
||||
onclick="measuringTool.setEnabled(true)"
|
||||
title="distance measurements"/>
|
||||
<img src="../resources/icons/area.png"
|
||||
onclick="areaTool.setEnabled(true)"
|
||||
title="area measurements"/>
|
||||
|
||||
<img src="../resources/icons/volume.png"
|
||||
onclick="volumeTool.startInsertion()"
|
||||
title="volume measurements"/>
|
||||
|
||||
<img src="../resources/icons/profile.png"
|
||||
onclick="profileTool.startInsertion({width: pointcloud.boundingSphere.radius / 100})"
|
||||
title="height profiles"/>
|
||||
|
||||
<img src="../resources/icons/clip_volume.png"
|
||||
onclick="volumeTool.startInsertion({clip: true})"
|
||||
title="clipping volumes"/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="info" style="position: absolute; left: 300px; right: 300px; top: 10px; text-align: center;">
|
||||
<a href="http://potree.org" target="_blank">potree.org</a><br>
|
||||
<a href="http://potree.org" target="_blank">potree.org</a>
|
||||
</div>
|
||||
|
||||
<div id="renderArea"></div>
|
||||
|
||||
<script>
|
||||
var pointSize = 1;
|
||||
var pointCountTarget = 0.4;
|
||||
var pointSize = 1.0 ;
|
||||
var pointCountTarget = 1;
|
||||
var opacity = 1;
|
||||
var pointSizeType = Potree.PointSizeType.ADAPTIVE;
|
||||
var pointColorType = Potree.PointColorType.RGB;
|
||||
var pointShape = Potree.PointShape.SQUARE;
|
||||
var interpolate = false;
|
||||
var clipMode = Potree.ClipMode.HIGHLIGHT_INSIDE;
|
||||
var quality = "Normal";
|
||||
var isFlipYZ = false;
|
||||
|
||||
var showStats = false;
|
||||
var showBoundingBox = false;
|
||||
|
||||
var fpControls;
|
||||
var orbitControls;
|
||||
var controls;
|
||||
|
||||
var progressBar = new ProgressBar();
|
||||
|
||||
|
||||
|
||||
|
||||
var pointcloudPath = "../resources/pointclouds/lion_takanawa_laz/cloud.js";
|
||||
|
||||
var pointcloudPath = "../resources/pointclouds/lion_takanawa_laz/cloud.js";
|
||||
|
||||
var elRenderArea = document.getElementById("renderArea");
|
||||
|
||||
var gui;
|
||||
var renderer;
|
||||
var camera;
|
||||
var scene;
|
||||
var scenePointCloud;
|
||||
var sceneBG, cameraBG;
|
||||
var pointcloud;
|
||||
var skybox;
|
||||
var stats;
|
||||
var clock = new THREE.Clock();
|
||||
var showSkybox = false;
|
||||
var measuringTool;
|
||||
var areaTool;
|
||||
var volumeTool;
|
||||
var transformationTool;
|
||||
var referenceFrame;
|
||||
|
||||
function initGUI(){
|
||||
|
||||
// dat.gui
|
||||
var gui = new dat.GUI({
|
||||
gui = new dat.GUI({
|
||||
height : 5 * 32 - 1
|
||||
});
|
||||
|
||||
var params = {
|
||||
params = {
|
||||
"points(m)": pointCountTarget,
|
||||
PointSize: pointSize,
|
||||
"opacity": opacity,
|
||||
"SizeType" : "Adaptive",
|
||||
"show octree" : false,
|
||||
"Materials" : "RGB",
|
||||
"interpolate": interpolate,
|
||||
"circles": false,
|
||||
"skybox": false
|
||||
"Clip Mode": "Highlight Inside",
|
||||
"quality": "Normal",
|
||||
"skybox": false,
|
||||
"stats": showStats,
|
||||
"BoundingBox": showBoundingBox
|
||||
};
|
||||
|
||||
var pPoints = gui.add(params, 'points(m)', 0.02, 0.5);
|
||||
var pPoints = gui.add(params, 'points(m)', 0.02, 2);
|
||||
pPoints.onChange(function(value){
|
||||
pointCountTarget = value;
|
||||
pointCountTarget = value ;
|
||||
});
|
||||
|
||||
var pPointSize = gui.add(params, 'PointSize', 0, 3);
|
||||
@ -119,7 +216,17 @@
|
||||
}
|
||||
});
|
||||
|
||||
var pMaterial = gui.add(params, 'Materials', [ "RGB", "Color", "Height", "Intensity", "Intensity Gradient", "Octree Depth"]);
|
||||
var options = [];
|
||||
if(pointcloud.pcoGeometry.pointAttributes === "LAS" || pointcloud.pcoGeometry.pointAttributes === "LAZ"){
|
||||
options = [
|
||||
"RGB", "Color", "Height", "Intensity", "Intensity Gradient",
|
||||
"Classification", "Return Number", "Source",
|
||||
"Octree Depth"];
|
||||
}else{
|
||||
options = options = [ "RGB", "Color", "Height", "Octree Depth"];
|
||||
}
|
||||
|
||||
pMaterial = gui.add(params, 'Materials',options);
|
||||
pMaterial.onChange(function(value){
|
||||
if(value === "RGB"){
|
||||
pointColorType = Potree.PointColorType.RGB;
|
||||
@ -127,31 +234,36 @@
|
||||
pointColorType = Potree.PointColorType.COLOR;
|
||||
}else if(value === "Height"){
|
||||
pointColorType = Potree.PointColorType.HEIGHT;
|
||||
|
||||
}else if(value === "Octree Depth"){
|
||||
pointColorType = Potree.PointColorType.OCTREE_DEPTH;
|
||||
}else if(value === "Point Index"){
|
||||
pointColorType = Potree.PointColorType.POINT_INDEX;
|
||||
}else if(value === "Intensity"){
|
||||
pointColorType = Potree.PointColorType.INTENSITY;
|
||||
}else if(value === "Intensity Gradient"){
|
||||
pointColorType = Potree.PointColorType.INTENSITY_GRADIENT;
|
||||
}else if(value === "Classification"){
|
||||
pointColorType = Potree.PointColorType.CLASSIFICATION;
|
||||
}else if(value === "Return Number"){
|
||||
pointColorType = Potree.PointColorType.RETURN_NUMBER;
|
||||
}else if(value === "Source"){
|
||||
pointColorType = Potree.PointColorType.SOURCE;
|
||||
}else if(value === "Octree Depth"){
|
||||
pointColorType = Potree.PointColorType.OCTREE_DEPTH;
|
||||
}else if(value === "Point Index"){
|
||||
pointColorType = Potree.PointColorType.POINT_INDEX;
|
||||
}
|
||||
});
|
||||
|
||||
if(renderer.context.getExtension("EXT_frag_depth")){
|
||||
var pInterpolate = gui.add(params, 'interpolate');
|
||||
pInterpolate.onChange(function(value){
|
||||
interpolate = value;
|
||||
});
|
||||
}
|
||||
var pQuality = gui.add(params, 'quality', [ "Normal", "Circles", "Interpolation", "Splats"]);
|
||||
pQuality.onChange(function(value){
|
||||
quality = value;
|
||||
});
|
||||
|
||||
var pCircular = gui.add(params, 'circles');
|
||||
pCircular.onChange(function(value){
|
||||
if(value){
|
||||
pointShape = Potree.PointShape.CIRCLE;
|
||||
}else{
|
||||
pointShape = Potree.PointShape.SQUARE;
|
||||
var pClipMode = gui.add(params, 'Clip Mode', [ "No Clipping", "Clip Outside", "Highlight Inside"]);
|
||||
pClipMode.onChange(function(value){
|
||||
if(value === "No Clipping"){
|
||||
clipMode = Potree.ClipMode.DISABLED;
|
||||
}else if(value === "Clip Outside"){
|
||||
clipMode = Potree.ClipMode.CLIP_OUTSIDE;
|
||||
}else if(value === "Highlight Inside"){
|
||||
clipMode = Potree.ClipMode.HIGHLIGHT_INSIDE;
|
||||
}
|
||||
});
|
||||
|
||||
@ -159,6 +271,16 @@
|
||||
pSykbox.onChange(function(value){
|
||||
showSkybox = value;
|
||||
});
|
||||
|
||||
var pStats = gui.add(params, 'stats');
|
||||
pStats.onChange(function(value){
|
||||
showStats = value;
|
||||
});
|
||||
|
||||
var pBoundingBox = gui.add(params, 'BoundingBox');
|
||||
pBoundingBox.onChange(function(value){
|
||||
showBoundingBox = value;
|
||||
});
|
||||
|
||||
// stats
|
||||
stats = new Stats();
|
||||
@ -174,10 +296,19 @@
|
||||
var height = elRenderArea.clientHeight;
|
||||
var aspect = width / height;
|
||||
var near = 0.1;
|
||||
var far = 100000;
|
||||
var far = 1000000;
|
||||
|
||||
scene = new THREE.Scene();
|
||||
scenePointCloud = new THREE.Scene();
|
||||
sceneBG = new THREE.Scene();
|
||||
|
||||
camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
|
||||
//camera = new THREE.OrthographicCamera(-50, 50, 50, -50, 1, 100000);
|
||||
cameraBG = new THREE.Camera();
|
||||
camera.rotation.order = 'ZYX';
|
||||
|
||||
referenceFrame = new THREE.Object3D();
|
||||
scenePointCloud.add(referenceFrame);
|
||||
|
||||
renderer = new THREE.WebGLRenderer();
|
||||
renderer.setSize(width, height);
|
||||
@ -187,10 +318,13 @@
|
||||
skybox = Potree.utils.loadSkybox("../resources/textures/skybox/");
|
||||
|
||||
// camera and controls
|
||||
camera.position.set(3, 7, 6);
|
||||
controls = new THREE.OrbitControls(camera, renderer.domElement);
|
||||
controls.target.set( 0, 5, 0 );
|
||||
camera.lookAt(controls.target);
|
||||
camera.position.set(-304, 372, 318);
|
||||
camera.rotation.y = -Math.PI / 4;
|
||||
camera.rotation.x = -Math.PI / 6;
|
||||
useOrbitControls();
|
||||
|
||||
|
||||
controls.moveSpeed *= 10;
|
||||
|
||||
// enable frag_depth extension for the interpolation shader, if available
|
||||
renderer.context.getExtension("EXT_frag_depth");
|
||||
@ -203,38 +337,147 @@
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
|
||||
pointcloud.rotation.set(Math.PI/2, 0.85* -Math.PI/2, -0.0);
|
||||
pointcloud.moveToOrigin();
|
||||
pointcloud.moveToGroundPlane();
|
||||
referenceFrame.add(pointcloud);
|
||||
|
||||
scene.add(pointcloud);
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
var sg = pointcloud.boundingSphere.clone().applyMatrix4(pointcloud.matrixWorld);
|
||||
|
||||
referenceFrame.position.copy(sg.center).multiplyScalar(-1);
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
|
||||
controls.moveSpeed = pointcloud.boundingSphere.radius / 2;
|
||||
|
||||
camera.zoomTo(pointcloud, 1);
|
||||
|
||||
flipYZ();
|
||||
|
||||
initGUI();
|
||||
useOrbitControls();
|
||||
});
|
||||
|
||||
var grid = Potree.utils.createGrid(5, 5, 2);
|
||||
scene.add(grid);
|
||||
|
||||
measuringTool = new Potree.MeasuringTool(scenePointCloud, camera, renderer);
|
||||
profileTool = new Potree.ProfileTool(scenePointCloud, camera, renderer);
|
||||
areaTool = new Potree.AreaTool(scenePointCloud, camera, renderer);
|
||||
volumeTool = new Potree.VolumeTool(scenePointCloud, camera, renderer);
|
||||
transformationTool = new Potree.TransformationTool(scenePointCloud, camera, renderer);
|
||||
|
||||
|
||||
// background
|
||||
// var texture = THREE.ImageUtils.loadTexture( '../resources/textures/background.gif' );
|
||||
var texture = Potree.utils.createBackgroundTexture(512, 512);
|
||||
|
||||
texture.minFilter = texture.magFilter = THREE.NearestFilter;
|
||||
texture.minFilter = texture.magFilter = THREE.LinearFilter;
|
||||
|
||||
var bg = new THREE.Mesh(
|
||||
new THREE.PlaneBufferGeometry(2, 2, 0),
|
||||
new THREE.MeshBasicMaterial({
|
||||
map: texture
|
||||
})
|
||||
);
|
||||
//bg.position.z = -1;
|
||||
bg.material.depthTest = false;
|
||||
bg.material.depthWrite = false;
|
||||
sceneBG.add(bg);
|
||||
|
||||
|
||||
window.addEventListener( 'keydown', onKeyDown, false );
|
||||
}
|
||||
|
||||
function flipYZ(){
|
||||
isFlipYZ = !isFlipYZ;
|
||||
|
||||
if(isFlipYZ){
|
||||
referenceFrame.matrix.copy(new THREE.Matrix4());
|
||||
referenceFrame.applyMatrix(new THREE.Matrix4().set(
|
||||
1,0,0,0,
|
||||
0,0,1,0,
|
||||
0,-1,0,0,
|
||||
0,0,0,1
|
||||
));
|
||||
|
||||
}else{
|
||||
referenceFrame.matrix.copy(new THREE.Matrix4());
|
||||
referenceFrame.applyMatrix(new THREE.Matrix4().set(
|
||||
1,0,0,0,
|
||||
0,1,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,1
|
||||
));
|
||||
}
|
||||
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
pointcloud.updateMatrixWorld();
|
||||
var sg = pointcloud.boundingSphere.clone().applyMatrix4(pointcloud.matrixWorld);
|
||||
referenceFrame.position.copy(sg.center).multiplyScalar(-1);
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
referenceFrame.position.y -= pointcloud.getWorldPosition().y;
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
}
|
||||
|
||||
function onKeyDown(event){
|
||||
//console.log(event.keyCode);
|
||||
|
||||
if(event.keyCode === 69){
|
||||
// e pressed
|
||||
|
||||
transformationTool.translate();
|
||||
}else if(event.keyCode === 82){
|
||||
// r pressed
|
||||
|
||||
transformationTool.scale();
|
||||
}else if(event.keyCode === 84){
|
||||
// r pressed
|
||||
|
||||
transformationTool.rotate();
|
||||
}
|
||||
};
|
||||
|
||||
function update(){
|
||||
if(pointcloud){
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointColorType = pointColorType;
|
||||
pointcloud.material.pointShape = pointShape;
|
||||
pointcloud.material.interpolate = interpolate;
|
||||
pointcloud.material.heightMin = 0;
|
||||
pointcloud.material.heightMax = 8;
|
||||
|
||||
var bbWorld = Potree.utils.computeTransformedBoundingBox(pointcloud.boundingBox, pointcloud.matrixWorld);
|
||||
|
||||
//pointcloud.material.size = pointSize;
|
||||
//pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
//pointcloud.material.opacity = opacity;
|
||||
//pointcloud.material.pointSizeType = pointSizeType;
|
||||
////pointcloud.material.pointColorType = pointColorType;
|
||||
//pointcloud.material.pointShape = (quality === "High") ? Potree.PointShape.CIRCLE : pointShape;
|
||||
//pointcloud.material.interpolate = (quality === "High");
|
||||
//pointcloud.material.heightMin = bbWorld.min.y;
|
||||
//pointcloud.material.heightMax = bbWorld.max.y;
|
||||
//pointcloud.material.clipMode = clipMode;
|
||||
////pointcloud.material.weighted = false;
|
||||
|
||||
pointcloud.material.clipMode = clipMode;
|
||||
pointcloud.material.heightMin = bbWorld.min.y;
|
||||
pointcloud.material.heightMax = bbWorld.max.y;
|
||||
pointcloud.material.intensityMin = 0;
|
||||
pointcloud.material.intensityMax = 65000;
|
||||
|
||||
pointcloud.showBoundingBox = showBoundingBox;
|
||||
pointcloud.update(camera, renderer);
|
||||
|
||||
document.getElementById("lblNumVisibleNodes").innerHTML = "visible nodes: " + pointcloud.numVisibleNodes;
|
||||
document.getElementById("lblNumVisiblePoints").innerHTML = "visible points: " + Potree.utils.addCommas(pointcloud.numVisiblePoints);
|
||||
}
|
||||
|
||||
stats.update();
|
||||
if(stats && showStats){
|
||||
document.getElementById("lblNumVisibleNodes").style.display = "";
|
||||
document.getElementById("lblNumVisiblePoints").style.display = "";
|
||||
stats.domElement.style.display = "";
|
||||
|
||||
stats.update();
|
||||
|
||||
if(pointcloud){
|
||||
document.getElementById("lblNumVisibleNodes").innerHTML = "visible nodes: " + pointcloud.numVisibleNodes;
|
||||
document.getElementById("lblNumVisiblePoints").innerHTML = "visible points: " + Potree.utils.addCommas(pointcloud.numVisiblePoints);
|
||||
}
|
||||
}else if(stats){
|
||||
document.getElementById("lblNumVisibleNodes").style.display = "none";
|
||||
document.getElementById("lblNumVisiblePoints").style.display = "none";
|
||||
stats.domElement.style.display = "none";
|
||||
}
|
||||
|
||||
controls.update(clock.getDelta());
|
||||
|
||||
@ -254,6 +497,77 @@
|
||||
progressBar.show();
|
||||
progressBar.message = "loading metadata";
|
||||
}
|
||||
|
||||
volumeTool.update();
|
||||
transformationTool.update();
|
||||
profileTool.update();
|
||||
|
||||
|
||||
var clipBoxes = [];
|
||||
|
||||
//var profiles = [];
|
||||
//for(var i = 0; i < profileTool.profiles.length; i++){
|
||||
// profiles.push(profileTool.profiles[i]);
|
||||
//}
|
||||
//if(profileTool.activeProfile){
|
||||
// profiles.push(profileTool.activeProfile);
|
||||
//}
|
||||
for(var i = 0; i < profileTool.profiles.length; i++){
|
||||
var profile = profileTool.profiles[i];
|
||||
|
||||
for(var j = 0; j < profile.boxes.length; j++){
|
||||
var box = profile.boxes[j];
|
||||
box.updateMatrixWorld();
|
||||
var boxInverse = new THREE.Matrix4().getInverse(box.matrixWorld);
|
||||
clipBoxes.push(boxInverse);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
for(var i = 0; i < volumeTool.volumes.length; i++){
|
||||
var volume = volumeTool.volumes[i];
|
||||
|
||||
if(volume.clip){
|
||||
volume.updateMatrixWorld();
|
||||
var boxInverse = new THREE.Matrix4().getInverse(volume.matrixWorld);
|
||||
|
||||
clipBoxes.push(boxInverse);
|
||||
}
|
||||
}
|
||||
|
||||
if(pointcloud){
|
||||
pointcloud.material.setClipBoxes(clipBoxes);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function useFPSControls(){
|
||||
if(controls){
|
||||
controls.enabled = false;
|
||||
}
|
||||
if(!fpControls){
|
||||
fpControls = new THREE.FirstPersonControls(camera, renderer.domElement);
|
||||
}
|
||||
|
||||
controls = fpControls;
|
||||
controls.enabled = true;
|
||||
}
|
||||
|
||||
function useOrbitControls(){
|
||||
if(controls){
|
||||
controls.enabled = false;
|
||||
}
|
||||
if(!orbitControls){
|
||||
orbitControls = new THREE.OrbitControls(camera, renderer.domElement);
|
||||
}
|
||||
|
||||
controls = orbitControls;
|
||||
controls.enabled = true;
|
||||
|
||||
if(pointcloud){
|
||||
controls.target.copy(pointcloud.boundingSphere.center.clone().applyMatrix4(pointcloud.matrixWorld));
|
||||
}
|
||||
}
|
||||
|
||||
function render(){
|
||||
@ -272,21 +586,196 @@
|
||||
if(showSkybox){
|
||||
skybox.camera.rotation.copy(camera.rotation);
|
||||
renderer.render(skybox.scene, skybox.camera);
|
||||
}else{
|
||||
renderer.render(sceneBG, cameraBG);
|
||||
}
|
||||
|
||||
if(pointcloud){
|
||||
if(pointcloud.originalMaterial){
|
||||
pointcloud.material = pointcloud.originalMaterial;
|
||||
}
|
||||
|
||||
var bbWorld = Potree.utils.computeTransformedBoundingBox(pointcloud.boundingBox, pointcloud.matrixWorld);
|
||||
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointColorType = pointColorType;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointShape = (quality === "Circles") ? Potree.PointShape.CIRCLE : Potree.PointShape.SQUARE;
|
||||
pointcloud.material.interpolate = (quality === "Interpolation");
|
||||
pointcloud.material.weighted = false;
|
||||
}
|
||||
|
||||
// render scene
|
||||
renderer.render(scene, camera);
|
||||
renderer.render(scenePointCloud, camera);
|
||||
|
||||
profileTool.render();
|
||||
volumeTool.render();
|
||||
|
||||
renderer.clearDepth();
|
||||
measuringTool.render();
|
||||
areaTool.render();
|
||||
transformationTool.render();
|
||||
}
|
||||
|
||||
// high quality rendering using splats
|
||||
//
|
||||
var rtDepth = new THREE.WebGLRenderTarget( 1024, 1024, {
|
||||
minFilter: THREE.NearestFilter,
|
||||
magFilter: THREE.NearestFilter,
|
||||
format: THREE.RGBAFormat,
|
||||
type: THREE.FloatType
|
||||
} );
|
||||
var rtNormalize = new THREE.WebGLRenderTarget( 1024, 1024, {
|
||||
minFilter: THREE.LinearFilter,
|
||||
magFilter: THREE.NearestFilter,
|
||||
format: THREE.RGBAFormat,
|
||||
type: THREE.FloatType
|
||||
} );
|
||||
|
||||
var sceneNormalize;
|
||||
|
||||
var depthMaterial, weightedMaterial;
|
||||
|
||||
// render with splats
|
||||
function renderHighQuality(){
|
||||
|
||||
if(!sceneNormalize){
|
||||
sceneNormalize = new THREE.Scene();
|
||||
|
||||
var vsNormalize = document.getElementById('vs').innerHTML;
|
||||
var fsNormalize = document.getElementById('fs').innerHTML;
|
||||
|
||||
var uniformsNormalize = {
|
||||
depthMap: { type: "t", value: rtDepth },
|
||||
texture: { type: "t", value: rtNormalize }
|
||||
};
|
||||
|
||||
var materialNormalize = new THREE.ShaderMaterial({
|
||||
uniforms: uniformsNormalize,
|
||||
vertexShader: vsNormalize,
|
||||
fragmentShader: fsNormalize
|
||||
});
|
||||
|
||||
var quad = new THREE.Mesh( new THREE.PlaneBufferGeometry(2, 2, 0), materialNormalize);
|
||||
quad.material.depthTest = true;
|
||||
quad.material.depthWrite = true;
|
||||
quad.material.transparent = true;
|
||||
sceneNormalize.add(quad);
|
||||
|
||||
}
|
||||
|
||||
// resize
|
||||
var width = elRenderArea.clientWidth;
|
||||
var height = elRenderArea.clientHeight;
|
||||
var aspect = width / height;
|
||||
|
||||
camera.aspect = aspect;
|
||||
camera.updateProjectionMatrix();
|
||||
|
||||
renderer.setSize(width, height);
|
||||
rtDepth.setSize(width, height);
|
||||
rtNormalize.setSize(width, height);
|
||||
|
||||
|
||||
renderer.clear();
|
||||
//renderer.render(sceneBG, cameraBG);
|
||||
// render skybox
|
||||
if(showSkybox){
|
||||
skybox.camera.rotation.copy(camera.rotation);
|
||||
renderer.render(skybox.scene, skybox.camera);
|
||||
}else{
|
||||
renderer.render(sceneBG, cameraBG);
|
||||
}
|
||||
renderer.render(scene, camera);
|
||||
|
||||
if(pointcloud){
|
||||
if(!weightedMaterial){
|
||||
pointcloud.originalMaterial = pointcloud.material;
|
||||
depthMaterial = new Potree.PointCloudMaterial();
|
||||
weightedMaterial = new Potree.PointCloudMaterial();
|
||||
}
|
||||
|
||||
pointcloud.material = depthMaterial;
|
||||
|
||||
var bbWorld = Potree.utils.computeTransformedBoundingBox(pointcloud.boundingBox, pointcloud.matrixWorld);
|
||||
|
||||
// get rid of this
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointColorType = Potree.PointColorType.DEPTH;
|
||||
pointcloud.material.pointShape = Potree.PointShape.CIRCLE;
|
||||
pointcloud.material.interpolate = (quality === "Interpolate");
|
||||
pointcloud.material.weighted = false;
|
||||
|
||||
pointcloud.material.minSize = 2;
|
||||
pointcloud.material.screenWidth = width;
|
||||
pointcloud.material.screenHeight = height;
|
||||
|
||||
pointcloud.update(camera, renderer);
|
||||
|
||||
renderer.clearTarget( rtDepth, true, true, true );
|
||||
renderer.clearTarget( rtNormalize, true, true, true );
|
||||
|
||||
var origType = pointcloud.material.pointColorType;
|
||||
renderer.render(scenePointCloud, camera, rtDepth);
|
||||
|
||||
pointcloud.material = weightedMaterial;
|
||||
|
||||
|
||||
|
||||
// get rid of this
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointColorType = pointColorType;
|
||||
pointcloud.material.pointShape = Potree.PointShape.CIRCLE;
|
||||
pointcloud.material.interpolate = (quality === "Interpolation");
|
||||
pointcloud.material.weighted = true;
|
||||
|
||||
pointcloud.material.depthMap = rtDepth;
|
||||
pointcloud.material.blendDepth = Math.min(pointcloud.material.spacing, 20);
|
||||
pointcloud.update(camera, renderer);
|
||||
renderer.render(scenePointCloud, camera, rtNormalize);
|
||||
|
||||
|
||||
volumeTool.render();
|
||||
profileTool.render();
|
||||
renderer.render(sceneNormalize, cameraBG);
|
||||
|
||||
|
||||
renderer.clearDepth();
|
||||
measuringTool.render();
|
||||
areaTool.render();
|
||||
transformationTool.render();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function loop() {
|
||||
requestAnimationFrame(loop);
|
||||
|
||||
update();
|
||||
render();
|
||||
|
||||
if(quality === "Splats"){
|
||||
renderHighQuality();
|
||||
}else{
|
||||
render();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
initThree();
|
||||
initGUI();
|
||||
//initGUI();
|
||||
loop();
|
||||
|
||||
</script>
|
||||
|
||||
100
examples/settings.txt
Normal file
@ -0,0 +1,100 @@
|
||||
|
||||
|
||||
"[ " + camera.position.x.toFixed(2) + ", " + camera.position.y.toFixed(2) + ", " + camera.position.z.toFixed(2) + " ]"
|
||||
|
||||
|
||||
|
||||
|
||||
# matterhorn
|
||||
|
||||
position: [ 3334.84, 7806.38, -2970.29 ]
|
||||
lookAt: [ 550.70, 5659.12, -275.78 ]
|
||||
|
||||
camera.position.set(3334.84, 7806.38, -2970.29)
|
||||
camera.lookAt(new THREE.Vector3(550.70, 5659.12, -275.78))
|
||||
|
||||
|
||||
|
||||
|
||||
# dechen cave
|
||||
|
||||
position: [ -2.12, 14.08, -3.40 ]
|
||||
lookAt: [ -4.80, 13.80, 1.49 ]
|
||||
|
||||
|
||||
|
||||
|
||||
# owl
|
||||
|
||||
position: [ -4.27, 7.02, 4.27 ]
|
||||
lookAt: [ -0.12, 1.63, -0.05 ]
|
||||
|
||||
|
||||
|
||||
# skatepark
|
||||
|
||||
points: 0.6
|
||||
position: [ 5.10, 195.34, -12.79 ]
|
||||
lookAt: [ -3.79, 181.82, 5.64 ]
|
||||
|
||||
|
||||
|
||||
# vol total
|
||||
|
||||
position: [ 255.79, 506.62, -233.26 ]
|
||||
lookAt: [ 117.90, 321.15, -22.44 ]
|
||||
|
||||
|
||||
|
||||
#eclepens
|
||||
|
||||
position: [ 331.55, 890.39, 538.83 ]
|
||||
lookAt: [ 127.47, 600.93, 88.21 ]
|
||||
|
||||
|
||||
|
||||
# lion_takanawa
|
||||
|
||||
position: [ 3.68, 7.00, 4.37 ]
|
||||
lookAt: [ 0.27, 4.68, 1.00 ]
|
||||
|
||||
|
||||
|
||||
# whitby_geom
|
||||
|
||||
position: [ 268.87, 539.56, -101.29 ]
|
||||
lookAt: [ 94.25, 351.57, -0.64 ]
|
||||
|
||||
|
||||
# vienna donaukanal
|
||||
|
||||
position: [ 2.96, 17.32, 10.35 ]
|
||||
lookAt: [ 1.42, 11.58, -0.04 ]
|
||||
|
||||
|
||||
# CA13_SAN_SIM
|
||||
|
||||
position: [ -23190.37, 20563.16, -7653.28 ]
|
||||
lookAt: [ -22959.89, 20435.17, -7879.27 ]
|
||||
|
||||
|
||||
|
||||
# lake tahoe
|
||||
|
||||
points: 1.5
|
||||
pointSize: 0.6
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Lion</title>
|
||||
<title>Viewer</title>
|
||||
<style>canvas { width: 100%; height: 100% }</style>
|
||||
</head>
|
||||
<body style="margin: 0; padding: 0">
|
||||
@ -28,6 +28,37 @@
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script id="vs" type="x-shader/x-vertex">
|
||||
varying vec2 vUv;
|
||||
|
||||
void main() {
|
||||
vUv = uv;
|
||||
|
||||
gl_Position = projectionMatrix *
|
||||
modelViewMatrix *
|
||||
vec4(position,1.0);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script id="fs" type="x-shader/x-vertex">
|
||||
|
||||
#extension GL_EXT_frag_depth : enable
|
||||
|
||||
uniform sampler2D depthMap;
|
||||
uniform sampler2D texture;
|
||||
|
||||
varying vec2 vUv;
|
||||
|
||||
void main() {
|
||||
vec4 color = texture2D(texture, vUv);
|
||||
float depth = texture2D(depthMap, vUv).g;
|
||||
color = color / color.w;
|
||||
gl_FragColor = color;
|
||||
|
||||
gl_FragDepthEXT = depth;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="../libs/plasio/js/laslaz.js"></script>
|
||||
<script src="../libs/plasio/vendor/bluebird.js"></script>
|
||||
@ -39,42 +70,57 @@
|
||||
<script src="../build/js/potree.js"></script>
|
||||
<script src="../build/js/laslaz.js"></script>
|
||||
<script src="../examples/js/ProgressBar.js"></script>
|
||||
<script src="../src/PointCloudOctree.js"></script>
|
||||
<script src="../src/utils/MeasuringTool.js"></script>
|
||||
<script src="../src/utils/AreaTool.js"></script>
|
||||
<script src="../src/utils/VolumeTool.js"></script>
|
||||
<script src="../src/utils/TransformationTool.js"></script>
|
||||
<script src="../src/materials/PointCloudMaterial.js"></script>
|
||||
<script src="viewer.js"></script>
|
||||
|
||||
<div id="lblNumVisibleNodes" class="info" style="position: absolute; left: 10px; top: 80px; width: 400px; color:white"></div>
|
||||
<div id="lblNumVisiblePoints" class="info" style="position: absolute; left: 10px; top: 100px; width: 400px; color:white"></div>
|
||||
<div id="lblMessage" class="info" style="position: absolute; left: 10px; bottom: 0px; width: 400px; color:white"></div>
|
||||
|
||||
<div id="tools" style="position: fixed; width: 200px; bottom: 10px; right: 10px">
|
||||
<input type="button" value="distance" onclick="measuringTool.setEnabled(true)"/>
|
||||
<input type="button" value="area" onclick="areaTool.setEnabled(true)"/>
|
||||
<input type="button" value="volume" onclick="volumeTool.startInsertion()"/>
|
||||
<div id="tools" style="position: fixed; width: 340px; bottom: 10px; right: 10px">
|
||||
|
||||
</div>
|
||||
|
||||
<div id="test" style="border: 1px solid red; position: fixed; pointer-events: none">
|
||||
<img src="../resources/icons/fps_controls.png"
|
||||
onclick="useFPSControls()"
|
||||
title="Fly Camera"/>
|
||||
|
||||
</div>
|
||||
<img src="../resources/icons/orbit_controls.png"
|
||||
onclick="useOrbitControls()"
|
||||
title="Orbit Controls"/>
|
||||
|
||||
<div id="test1" style="border: 1px solid red; position: fixed; pointer-events: none;">
|
||||
<img src="../resources/icons/focus.png"
|
||||
onclick="camera.zoomTo(pointcloud)"
|
||||
title="focus on pointcloud"/>
|
||||
|
||||
<img src="../resources/icons/flip_y_z.png"
|
||||
onclick="flipYZ()"
|
||||
title="flip y and z coordinates"/>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="test2" style="border: 1px solid red; position: fixed; pointer-events: none;">
|
||||
|
||||
<img src="../resources/icons/distance.png"
|
||||
onclick="measuringTool.setEnabled(true)"
|
||||
title="distance measurements"/>
|
||||
<img src="../resources/icons/area.png"
|
||||
onclick="areaTool.setEnabled(true)"
|
||||
title="area measurements"/>
|
||||
|
||||
<img src="../resources/icons/volume.png"
|
||||
onclick="volumeTool.startInsertion()"
|
||||
title="volume measurements"/>
|
||||
|
||||
<img src="../resources/icons/profile.png"
|
||||
onclick="profileTool.startInsertion({width: pointcloud.boundingSphere.radius / 100})"
|
||||
title="height profiles"/>
|
||||
|
||||
<img src="../resources/icons/clip_volume.png"
|
||||
onclick="volumeTool.startInsertion({clip: true})"
|
||||
title="clipping volumes"/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="info" style="position: absolute; left: 300px; right: 300px; top: 10px; text-align: center;">
|
||||
<a href="http://potree.org" target="_blank">potree.org</a><br>
|
||||
Point cloud courtesy of <a href="http://www.sigeom.ch/" target="_blank">sigeom sa</a><br>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="renderArea"></div>
|
||||
@ -86,17 +132,54 @@
|
||||
var pointSizeType = Potree.PointSizeType.ADAPTIVE;
|
||||
var pointColorType = Potree.PointColorType.RGB;
|
||||
var pointShape = Potree.PointShape.SQUARE;
|
||||
var interpolate = false;
|
||||
var clipMode = Potree.ClipMode.HIGHLIGHT_INSIDE;
|
||||
var quality = "Normal";
|
||||
var isFlipYZ = false;
|
||||
|
||||
var showStats = false;
|
||||
var showBoundingBox = false;
|
||||
|
||||
var fpControls;
|
||||
var orbitControls;
|
||||
var controls;
|
||||
|
||||
var progressBar = new ProgressBar();
|
||||
|
||||
var pointcloudPath = "../resources/pointclouds/vol_total/cloud.js";
|
||||
|
||||
|
||||
|
||||
|
||||
var pointcloudPath = "../resources/pointclouds/lion_takanawa/cloud.js";
|
||||
var pointcloudPath = "../../../../pointclouds/faro/skatepark/skate_1.las_converted/cloud.js";
|
||||
var pointcloudPath = "../../../../pointclouds/faro/skatepark/skate_1.las_converted/cloud.js";
|
||||
|
||||
|
||||
|
||||
var pointcloudPath = "../../../../pointclouds/opentopography/indiana_statewide_454m/cloud.js";
|
||||
var pointcloudPath = "../../../../pointclouds/opentopography/CA13_SAN_SIM/CA13_SAN_SIM/cloud.js";
|
||||
var pointcloudPath = "../../../../deploy/point_clouds_2014.12.29/whitby_geom/cloud.js";
|
||||
var pointcloudPath = "../../../../deploy/point_clouds_2014.12.29/vienna_donaukanal/cloud.js";
|
||||
var pointcloudPath = "../../../../deploy/point_clouds_2014.12.29/dechen_cave/cloud.js";
|
||||
var pointcloudPath = "../../../../deploy/point_clouds_2014.12.29/eclepens/cloud.js";
|
||||
var pointcloudPath = "../../../../deploy/point_clouds_2014.12.29/owl/cloud.js";
|
||||
var pointcloudPath = "../../../../deploy/point_clouds_2014.12.29/vol_total/cloud.js";
|
||||
|
||||
var pointcloudPath = "../../../../pointclouds/surface_and_edge/land_building/_converted/cloud.js";
|
||||
|
||||
|
||||
var pointcloudPath = "../../../../pointclouds/opentopography/lake_tahoe_basin/converted/cloud.js";
|
||||
var pointcloudPath = "../../../../deploy/point_clouds_2014.12.29/matterhorn/cloud.js";
|
||||
var pointcloudPath = "../../../../pointclouds/mschuetz/lion_takanawa_oriented.las_converted/cloud.js";
|
||||
var pointcloudPath = "../resources/pointclouds/vol_total/cloud.js";
|
||||
|
||||
var elRenderArea = document.getElementById("renderArea");
|
||||
|
||||
var gui;
|
||||
var renderer;
|
||||
var camera;
|
||||
var scene;
|
||||
var scenePointCloud;
|
||||
var sceneBG, cameraBG;
|
||||
var pointcloud;
|
||||
var skybox;
|
||||
var stats;
|
||||
@ -111,20 +194,22 @@
|
||||
function initGUI(){
|
||||
|
||||
// dat.gui
|
||||
var gui = new dat.GUI({
|
||||
gui = new dat.GUI({
|
||||
height : 5 * 32 - 1
|
||||
});
|
||||
|
||||
var params = {
|
||||
params = {
|
||||
"points(m)": pointCountTarget,
|
||||
PointSize: pointSize,
|
||||
"opacity": opacity,
|
||||
"SizeType" : "Adaptive",
|
||||
"show octree" : false,
|
||||
"Materials" : "RGB",
|
||||
"interpolate": interpolate,
|
||||
"circles": false,
|
||||
"skybox": false
|
||||
"Clip Mode": "Highlight Inside",
|
||||
"quality": "Normal",
|
||||
"skybox": false,
|
||||
"stats": showStats,
|
||||
"BoundingBox": showBoundingBox
|
||||
};
|
||||
|
||||
var pPoints = gui.add(params, 'points(m)', 0.02, 2);
|
||||
@ -153,7 +238,17 @@
|
||||
}
|
||||
});
|
||||
|
||||
var pMaterial = gui.add(params, 'Materials', [ "RGB", "Color", "Height", "Octree Depth"]);
|
||||
var options = [];
|
||||
if(pointcloud.pcoGeometry.pointAttributes === "LAS" || pointcloud.pcoGeometry.pointAttributes === "LAZ"){
|
||||
options = [
|
||||
"RGB", "Color", "Height", "Intensity", "Intensity Gradient",
|
||||
"Classification", "Return Number", "Source",
|
||||
"Octree Depth"];
|
||||
}else{
|
||||
options = options = [ "RGB", "Color", "Height", "Octree Depth"];
|
||||
}
|
||||
|
||||
pMaterial = gui.add(params, 'Materials',options);
|
||||
pMaterial.onChange(function(value){
|
||||
if(value === "RGB"){
|
||||
pointColorType = Potree.PointColorType.RGB;
|
||||
@ -161,7 +256,16 @@
|
||||
pointColorType = Potree.PointColorType.COLOR;
|
||||
}else if(value === "Height"){
|
||||
pointColorType = Potree.PointColorType.HEIGHT;
|
||||
|
||||
}else if(value === "Intensity"){
|
||||
pointColorType = Potree.PointColorType.INTENSITY;
|
||||
}else if(value === "Intensity Gradient"){
|
||||
pointColorType = Potree.PointColorType.INTENSITY_GRADIENT;
|
||||
}else if(value === "Classification"){
|
||||
pointColorType = Potree.PointColorType.CLASSIFICATION;
|
||||
}else if(value === "Return Number"){
|
||||
pointColorType = Potree.PointColorType.RETURN_NUMBER;
|
||||
}else if(value === "Source"){
|
||||
pointColorType = Potree.PointColorType.SOURCE;
|
||||
}else if(value === "Octree Depth"){
|
||||
pointColorType = Potree.PointColorType.OCTREE_DEPTH;
|
||||
}else if(value === "Point Index"){
|
||||
@ -169,19 +273,19 @@
|
||||
}
|
||||
});
|
||||
|
||||
if(renderer.context.getExtension("EXT_frag_depth")){
|
||||
var pInterpolate = gui.add(params, 'interpolate');
|
||||
pInterpolate.onChange(function(value){
|
||||
interpolate = value;
|
||||
});
|
||||
}
|
||||
var pQuality = gui.add(params, 'quality', [ "Normal", "Circles", "Interpolation", "Splats"]);
|
||||
pQuality.onChange(function(value){
|
||||
quality = value;
|
||||
});
|
||||
|
||||
var pCircular = gui.add(params, 'circles');
|
||||
pCircular.onChange(function(value){
|
||||
if(value){
|
||||
pointShape = Potree.PointShape.CIRCLE;
|
||||
}else{
|
||||
pointShape = Potree.PointShape.SQUARE;
|
||||
var pClipMode = gui.add(params, 'Clip Mode', [ "No Clipping", "Clip Outside", "Highlight Inside"]);
|
||||
pClipMode.onChange(function(value){
|
||||
if(value === "No Clipping"){
|
||||
clipMode = Potree.ClipMode.DISABLED;
|
||||
}else if(value === "Clip Outside"){
|
||||
clipMode = Potree.ClipMode.CLIP_OUTSIDE;
|
||||
}else if(value === "Highlight Inside"){
|
||||
clipMode = Potree.ClipMode.HIGHLIGHT_INSIDE;
|
||||
}
|
||||
});
|
||||
|
||||
@ -189,6 +293,16 @@
|
||||
pSykbox.onChange(function(value){
|
||||
showSkybox = value;
|
||||
});
|
||||
|
||||
var pStats = gui.add(params, 'stats');
|
||||
pStats.onChange(function(value){
|
||||
showStats = value;
|
||||
});
|
||||
|
||||
var pBoundingBox = gui.add(params, 'BoundingBox');
|
||||
pBoundingBox.onChange(function(value){
|
||||
showBoundingBox = value;
|
||||
});
|
||||
|
||||
// stats
|
||||
stats = new Stats();
|
||||
@ -207,10 +321,16 @@
|
||||
var far = 1000000;
|
||||
|
||||
scene = new THREE.Scene();
|
||||
scenePointCloud = new THREE.Scene();
|
||||
sceneBG = new THREE.Scene();
|
||||
|
||||
camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
|
||||
//camera = new THREE.OrthographicCamera(-50, 50, 50, -50, 1, 100000);
|
||||
cameraBG = new THREE.Camera();
|
||||
camera.rotation.order = 'ZYX';
|
||||
|
||||
referenceFrame = new THREE.Object3D();
|
||||
scene.add(referenceFrame);
|
||||
scenePointCloud.add(referenceFrame);
|
||||
|
||||
renderer = new THREE.WebGLRenderer();
|
||||
renderer.setSize(width, height);
|
||||
@ -223,8 +343,7 @@
|
||||
camera.position.set(-304, 372, 318);
|
||||
camera.rotation.y = -Math.PI / 4;
|
||||
camera.rotation.x = -Math.PI / 6;
|
||||
controls = new THREE.FirstPersonControls(camera, renderer.domElement);
|
||||
controls.moveSpeed *= 10;
|
||||
useOrbitControls();
|
||||
|
||||
// enable frag_depth extension for the interpolation shader, if available
|
||||
renderer.context.getExtension("EXT_frag_depth");
|
||||
@ -237,10 +356,58 @@
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
|
||||
//pointcloud.rotation.set(Math.PI/2, 0.85* -Math.PI/2, -0.0);
|
||||
|
||||
referenceFrame.add(pointcloud);
|
||||
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
var sg = pointcloud.boundingSphere.clone().applyMatrix4(pointcloud.matrixWorld);
|
||||
|
||||
referenceFrame.position.copy(sg.center).multiplyScalar(-1);
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
|
||||
camera.zoomTo(pointcloud, 1);
|
||||
|
||||
flipYZ();
|
||||
|
||||
initGUI();
|
||||
});
|
||||
|
||||
var grid = Potree.utils.createGrid(5, 5, 2);
|
||||
scene.add(grid);
|
||||
|
||||
measuringTool = new Potree.MeasuringTool(scenePointCloud, camera, renderer);
|
||||
profileTool = new Potree.ProfileTool(scenePointCloud, camera, renderer);
|
||||
areaTool = new Potree.AreaTool(scenePointCloud, camera, renderer);
|
||||
volumeTool = new Potree.VolumeTool(scenePointCloud, camera, renderer);
|
||||
transformationTool = new Potree.TransformationTool(scenePointCloud, camera, renderer);
|
||||
|
||||
|
||||
// background
|
||||
// var texture = THREE.ImageUtils.loadTexture( '../resources/textures/background.gif' );
|
||||
var texture = Potree.utils.createBackgroundTexture(512, 512);
|
||||
|
||||
texture.minFilter = texture.magFilter = THREE.NearestFilter;
|
||||
texture.minFilter = texture.magFilter = THREE.LinearFilter;
|
||||
|
||||
var bg = new THREE.Mesh(
|
||||
new THREE.PlaneBufferGeometry(2, 2, 0),
|
||||
new THREE.MeshBasicMaterial({
|
||||
map: texture
|
||||
})
|
||||
);
|
||||
//bg.position.z = -1;
|
||||
bg.material.depthTest = false;
|
||||
bg.material.depthWrite = false;
|
||||
sceneBG.add(bg);
|
||||
|
||||
|
||||
window.addEventListener( 'keydown', onKeyDown, false );
|
||||
}
|
||||
|
||||
function flipYZ(){
|
||||
isFlipYZ = !isFlipYZ;
|
||||
|
||||
if(isFlipYZ){
|
||||
referenceFrame.matrix.copy(new THREE.Matrix4());
|
||||
referenceFrame.applyMatrix(new THREE.Matrix4().set(
|
||||
1,0,0,0,
|
||||
0,0,1,0,
|
||||
@ -248,28 +415,23 @@
|
||||
0,0,0,1
|
||||
));
|
||||
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
var sg = pointcloud.boundingSphere.clone().applyMatrix4(pointcloud.matrixWorld);
|
||||
|
||||
referenceFrame.position.copy(sg.center).multiplyScalar(-1);
|
||||
referenceFrame.position.y += sg.radius;
|
||||
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
|
||||
//zoomTo(camera, pointcloud, 0.7);
|
||||
});
|
||||
}else{
|
||||
referenceFrame.matrix.copy(new THREE.Matrix4());
|
||||
referenceFrame.applyMatrix(new THREE.Matrix4().set(
|
||||
1,0,0,0,
|
||||
0,1,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,1
|
||||
));
|
||||
}
|
||||
|
||||
var grid = Potree.utils.createGrid(5, 5, 2);
|
||||
scene.add(grid);
|
||||
|
||||
measuringTool = new Potree.MeasuringTool(scene, camera, renderer);
|
||||
areaTool = new Potree.AreaTool(scene, camera, renderer);
|
||||
volumeTool = new Potree.VolumeTool(scene, camera, renderer);
|
||||
transformationTool = new Potree.TransformationTool(scene, camera, renderer);
|
||||
|
||||
|
||||
|
||||
window.addEventListener( 'keydown', onKeyDown, false );
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
pointcloud.updateMatrixWorld();
|
||||
var sg = pointcloud.boundingSphere.clone().applyMatrix4(pointcloud.matrixWorld);
|
||||
referenceFrame.position.copy(sg.center).multiplyScalar(-1);
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
referenceFrame.position.y -= pointcloud.getWorldPosition().y;
|
||||
referenceFrame.updateMatrixWorld(true);
|
||||
}
|
||||
|
||||
function onKeyDown(event){
|
||||
@ -292,23 +454,46 @@
|
||||
|
||||
function update(){
|
||||
if(pointcloud){
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointColorType = pointColorType;
|
||||
pointcloud.material.pointShape = pointShape;
|
||||
pointcloud.material.interpolate = interpolate;
|
||||
pointcloud.material.heightMin = 0;
|
||||
pointcloud.material.heightMax = 8;
|
||||
|
||||
pointcloud.update(camera, renderer);
|
||||
|
||||
document.getElementById("lblNumVisibleNodes").innerHTML = "visible nodes: " + pointcloud.numVisibleNodes;
|
||||
document.getElementById("lblNumVisiblePoints").innerHTML = "visible points: " + Potree.utils.addCommas(pointcloud.numVisiblePoints);
|
||||
var bbWorld = Potree.utils.computeTransformedBoundingBox(pointcloud.boundingBox, pointcloud.matrixWorld);
|
||||
|
||||
//pointcloud.material.size = pointSize;
|
||||
//pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
//pointcloud.material.opacity = opacity;
|
||||
//pointcloud.material.pointSizeType = pointSizeType;
|
||||
////pointcloud.material.pointColorType = pointColorType;
|
||||
//pointcloud.material.pointShape = (quality === "High") ? Potree.PointShape.CIRCLE : pointShape;
|
||||
//pointcloud.material.interpolate = (quality === "High");
|
||||
//pointcloud.material.heightMin = bbWorld.min.y;
|
||||
//pointcloud.material.heightMax = bbWorld.max.y;
|
||||
//pointcloud.material.clipMode = clipMode;
|
||||
////pointcloud.material.weighted = false;
|
||||
|
||||
pointcloud.material.clipMode = clipMode;
|
||||
pointcloud.material.heightMin = bbWorld.min.y;
|
||||
pointcloud.material.heightMax = bbWorld.max.y;
|
||||
pointcloud.material.intensityMin = 0;
|
||||
pointcloud.material.intensityMax = 200;
|
||||
pointcloud.showBoundingBox = showBoundingBox;
|
||||
pointcloud.update(camera, renderer);
|
||||
}
|
||||
|
||||
stats.update();
|
||||
if(stats && showStats){
|
||||
document.getElementById("lblNumVisibleNodes").style.display = "";
|
||||
document.getElementById("lblNumVisiblePoints").style.display = "";
|
||||
stats.domElement.style.display = "";
|
||||
|
||||
stats.update();
|
||||
|
||||
if(pointcloud){
|
||||
document.getElementById("lblNumVisibleNodes").innerHTML = "visible nodes: " + pointcloud.numVisibleNodes;
|
||||
document.getElementById("lblNumVisiblePoints").innerHTML = "visible points: " + Potree.utils.addCommas(pointcloud.numVisiblePoints);
|
||||
}
|
||||
}else if(stats){
|
||||
document.getElementById("lblNumVisibleNodes").style.display = "none";
|
||||
document.getElementById("lblNumVisiblePoints").style.display = "none";
|
||||
stats.domElement.style.display = "none";
|
||||
}
|
||||
|
||||
controls.update(clock.getDelta());
|
||||
|
||||
@ -331,6 +516,76 @@
|
||||
|
||||
volumeTool.update();
|
||||
transformationTool.update();
|
||||
profileTool.update();
|
||||
|
||||
|
||||
var clipBoxes = [];
|
||||
|
||||
//var profiles = [];
|
||||
//for(var i = 0; i < profileTool.profiles.length; i++){
|
||||
// profiles.push(profileTool.profiles[i]);
|
||||
//}
|
||||
//if(profileTool.activeProfile){
|
||||
// profiles.push(profileTool.activeProfile);
|
||||
//}
|
||||
for(var i = 0; i < profileTool.profiles.length; i++){
|
||||
var profile = profileTool.profiles[i];
|
||||
|
||||
for(var j = 0; j < profile.boxes.length; j++){
|
||||
var box = profile.boxes[j];
|
||||
box.updateMatrixWorld();
|
||||
var boxInverse = new THREE.Matrix4().getInverse(box.matrixWorld);
|
||||
clipBoxes.push(boxInverse);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
for(var i = 0; i < volumeTool.volumes.length; i++){
|
||||
var volume = volumeTool.volumes[i];
|
||||
|
||||
if(volume.clip){
|
||||
volume.updateMatrixWorld();
|
||||
var boxInverse = new THREE.Matrix4().getInverse(volume.matrixWorld);
|
||||
|
||||
clipBoxes.push(boxInverse);
|
||||
}
|
||||
}
|
||||
|
||||
if(pointcloud){
|
||||
pointcloud.material.setClipBoxes(clipBoxes);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function useFPSControls(){
|
||||
if(controls){
|
||||
controls.enabled = false;
|
||||
}
|
||||
if(!fpControls){
|
||||
fpControls = new THREE.FirstPersonControls(camera, renderer.domElement);
|
||||
}
|
||||
|
||||
controls = fpControls;
|
||||
controls.enabled = true;
|
||||
|
||||
controls.moveSpeed = pointcloud.boundingSphere.radius / 2;
|
||||
}
|
||||
|
||||
function useOrbitControls(){
|
||||
if(controls){
|
||||
controls.enabled = false;
|
||||
}
|
||||
if(!orbitControls){
|
||||
orbitControls = new THREE.OrbitControls(camera, renderer.domElement);
|
||||
}
|
||||
|
||||
controls = orbitControls;
|
||||
controls.enabled = true;
|
||||
|
||||
if(pointcloud){
|
||||
controls.target.copy(pointcloud.boundingSphere.center.clone().applyMatrix4(pointcloud.matrixWorld));
|
||||
}
|
||||
}
|
||||
|
||||
function render(){
|
||||
@ -349,10 +604,33 @@
|
||||
if(showSkybox){
|
||||
skybox.camera.rotation.copy(camera.rotation);
|
||||
renderer.render(skybox.scene, skybox.camera);
|
||||
}else{
|
||||
renderer.render(sceneBG, cameraBG);
|
||||
}
|
||||
|
||||
if(pointcloud){
|
||||
if(pointcloud.originalMaterial){
|
||||
pointcloud.material = pointcloud.originalMaterial;
|
||||
}
|
||||
|
||||
var bbWorld = Potree.utils.computeTransformedBoundingBox(pointcloud.boundingBox, pointcloud.matrixWorld);
|
||||
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointColorType = pointColorType;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointShape = (quality === "Circles") ? Potree.PointShape.CIRCLE : Potree.PointShape.SQUARE;
|
||||
pointcloud.material.interpolate = (quality === "Interpolation");
|
||||
pointcloud.material.weighted = false;
|
||||
}
|
||||
|
||||
// render scene
|
||||
renderer.render(scene, camera);
|
||||
renderer.render(scenePointCloud, camera);
|
||||
|
||||
profileTool.render();
|
||||
volumeTool.render();
|
||||
|
||||
renderer.clearDepth();
|
||||
measuringTool.render();
|
||||
@ -360,17 +638,162 @@
|
||||
transformationTool.render();
|
||||
}
|
||||
|
||||
// high quality rendering using splats
|
||||
//
|
||||
var rtDepth = new THREE.WebGLRenderTarget( 1024, 1024, {
|
||||
minFilter: THREE.NearestFilter,
|
||||
magFilter: THREE.NearestFilter,
|
||||
format: THREE.RGBAFormat,
|
||||
type: THREE.FloatType
|
||||
} );
|
||||
var rtNormalize = new THREE.WebGLRenderTarget( 1024, 1024, {
|
||||
minFilter: THREE.LinearFilter,
|
||||
magFilter: THREE.NearestFilter,
|
||||
format: THREE.RGBAFormat,
|
||||
type: THREE.FloatType
|
||||
} );
|
||||
|
||||
var sceneNormalize;
|
||||
|
||||
var depthMaterial, weightedMaterial;
|
||||
|
||||
// render with splats
|
||||
function renderHighQuality(){
|
||||
|
||||
if(!sceneNormalize){
|
||||
sceneNormalize = new THREE.Scene();
|
||||
|
||||
var vsNormalize = document.getElementById('vs').innerHTML;
|
||||
var fsNormalize = document.getElementById('fs').innerHTML;
|
||||
|
||||
var uniformsNormalize = {
|
||||
depthMap: { type: "t", value: rtDepth },
|
||||
texture: { type: "t", value: rtNormalize }
|
||||
};
|
||||
|
||||
var materialNormalize = new THREE.ShaderMaterial({
|
||||
uniforms: uniformsNormalize,
|
||||
vertexShader: vsNormalize,
|
||||
fragmentShader: fsNormalize
|
||||
});
|
||||
|
||||
var quad = new THREE.Mesh( new THREE.PlaneBufferGeometry(2, 2, 0), materialNormalize);
|
||||
quad.material.depthTest = true;
|
||||
quad.material.depthWrite = true;
|
||||
quad.material.transparent = true;
|
||||
sceneNormalize.add(quad);
|
||||
|
||||
}
|
||||
|
||||
// resize
|
||||
var width = elRenderArea.clientWidth;
|
||||
var height = elRenderArea.clientHeight;
|
||||
var aspect = width / height;
|
||||
|
||||
camera.aspect = aspect;
|
||||
camera.updateProjectionMatrix();
|
||||
|
||||
renderer.setSize(width, height);
|
||||
rtDepth.setSize(width, height);
|
||||
rtNormalize.setSize(width, height);
|
||||
|
||||
|
||||
renderer.clear();
|
||||
//renderer.render(sceneBG, cameraBG);
|
||||
// render skybox
|
||||
if(showSkybox){
|
||||
skybox.camera.rotation.copy(camera.rotation);
|
||||
renderer.render(skybox.scene, skybox.camera);
|
||||
}else{
|
||||
renderer.render(sceneBG, cameraBG);
|
||||
}
|
||||
renderer.render(scene, camera);
|
||||
|
||||
if(pointcloud){
|
||||
if(!weightedMaterial){
|
||||
pointcloud.originalMaterial = pointcloud.material;
|
||||
depthMaterial = new Potree.PointCloudMaterial();
|
||||
weightedMaterial = new Potree.PointCloudMaterial();
|
||||
}
|
||||
|
||||
pointcloud.material = depthMaterial;
|
||||
|
||||
var bbWorld = Potree.utils.computeTransformedBoundingBox(pointcloud.boundingBox, pointcloud.matrixWorld);
|
||||
|
||||
// get rid of this
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointColorType = Potree.PointColorType.DEPTH;
|
||||
pointcloud.material.pointShape = Potree.PointShape.CIRCLE;
|
||||
pointcloud.material.interpolate = (quality === "Interpolate");
|
||||
pointcloud.material.weighted = false;
|
||||
|
||||
pointcloud.material.minSize = 2;
|
||||
pointcloud.material.screenWidth = width;
|
||||
pointcloud.material.screenHeight = height;
|
||||
|
||||
pointcloud.update(camera, renderer);
|
||||
|
||||
renderer.clearTarget( rtDepth, true, true, true );
|
||||
renderer.clearTarget( rtNormalize, true, true, true );
|
||||
|
||||
var origType = pointcloud.material.pointColorType;
|
||||
renderer.render(scenePointCloud, camera, rtDepth);
|
||||
|
||||
pointcloud.material = weightedMaterial;
|
||||
|
||||
|
||||
|
||||
// get rid of this
|
||||
pointcloud.material.size = pointSize;
|
||||
pointcloud.visiblePointsTarget = pointCountTarget * 1000 * 1000;
|
||||
pointcloud.material.opacity = opacity;
|
||||
pointcloud.material.pointSizeType = pointSizeType;
|
||||
pointcloud.material.pointColorType = pointColorType;
|
||||
pointcloud.material.pointShape = Potree.PointShape.CIRCLE;
|
||||
pointcloud.material.interpolate = (quality === "Interpolation");
|
||||
pointcloud.material.weighted = true;
|
||||
|
||||
pointcloud.material.depthMap = rtDepth;
|
||||
pointcloud.material.blendDepth = Math.min(pointcloud.material.spacing, 20);
|
||||
pointcloud.update(camera, renderer);
|
||||
renderer.render(scenePointCloud, camera, rtNormalize);
|
||||
|
||||
|
||||
volumeTool.render();
|
||||
profileTool.render();
|
||||
renderer.render(sceneNormalize, cameraBG);
|
||||
|
||||
|
||||
renderer.clearDepth();
|
||||
measuringTool.render();
|
||||
areaTool.render();
|
||||
transformationTool.render();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function loop() {
|
||||
requestAnimationFrame(loop);
|
||||
|
||||
update();
|
||||
render();
|
||||
|
||||
if(quality === "Splats"){
|
||||
renderHighQuality();
|
||||
}else{
|
||||
render();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
initThree();
|
||||
initGUI();
|
||||
//initGUI();
|
||||
loop();
|
||||
|
||||
</script>
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
zoomTo = function( camera, node, factor ){
|
||||
|
||||
if ( !node.geometry && !node.boundingSphere ) {
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if ( node.geometry && node.geometry.boundingSphere === null ) {
|
||||
|
||||
node.geometry.computeBoundingSphere();
|
||||
|
||||
}
|
||||
|
||||
var boundingSphere = node.boundingSphere || node.geometry.boundingSphere;
|
||||
|
||||
if ( !boundingSphere ) {
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
node.updateMatrixWorld();
|
||||
|
||||
boundingSphere = boundingSphere.clone().applyMatrix4(node.matrixWorld);
|
||||
|
||||
var _factor = factor || 1;
|
||||
|
||||
var radius = boundingSphere.radius;
|
||||
var center = boundingSphere.center;
|
||||
var fovr = camera.fov * Math.PI / 180;
|
||||
|
||||
if( camera.aspect < 1 ){
|
||||
|
||||
fovr = fovr * camera.aspect;
|
||||
|
||||
}
|
||||
|
||||
var distanceFactor = Math.abs( radius / Math.sin( fovr / 2 ) ) * _factor ;
|
||||
|
||||
var dir = new THREE.Vector3( 0, 0, -1 ).applyQuaternion( camera.quaternion );
|
||||
var offset = dir.multiplyScalar( -distanceFactor );
|
||||
camera.position.copy(center.add( offset ));
|
||||
|
||||
};
|
||||
@ -30,9 +30,11 @@ var paths = {
|
||||
"src/utils.js",
|
||||
"src/TextSprite.js",
|
||||
"src/Version.js",
|
||||
"src/utils/AreaTool.js",
|
||||
"src/utils/MeasuringTool.js",
|
||||
"src/utils/ProfileTool.js",
|
||||
"src/utils/TranslationTool.js"
|
||||
"src/utils/TransformationTool.js",
|
||||
"src/utils/VolumeTool.js"
|
||||
],
|
||||
laslaz: [
|
||||
"build/workers/laslaz-worker.js",
|
||||
|
||||
BIN
resources/icons/area.png
Normal file
|
After Width: | Height: | Size: 776 B |
116
resources/icons/area.svg
Normal file
@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="32px"
|
||||
height="32px"
|
||||
id="svg3797"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="area.svg">
|
||||
<defs
|
||||
id="defs3799" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="22.395604"
|
||||
inkscape:cx="9.4591229"
|
||||
inkscape:cy="15.712251"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1138"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3805" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata3802">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="fill:#ff0000;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 7,25 25,25 20,15 26,5 7,5 z"
|
||||
id="path3790"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccc" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:4.36363649;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="path3807-0-1"
|
||||
sodipodi:cx="11"
|
||||
sodipodi:cy="22"
|
||||
sodipodi:rx="6"
|
||||
sodipodi:ry="6"
|
||||
d="M 17,22 A 6,6 0 1 1 5,22 6,6 0 1 1 17,22 z"
|
||||
transform="matrix(0.45833331,0,0,0.45833331,1.9583336,15.166667)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:4.36363649;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="path3807-0-7"
|
||||
sodipodi:cx="11"
|
||||
sodipodi:cy="22"
|
||||
sodipodi:rx="6"
|
||||
sodipodi:ry="6"
|
||||
d="M 17,22 A 6,6 0 1 1 5,22 6,6 0 1 1 17,22 z"
|
||||
transform="matrix(0.45833331,0,0,0.45833331,19.958334,15.166667)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:4.36363649;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="path3807-0-7-0"
|
||||
sodipodi:cx="11"
|
||||
sodipodi:cy="22"
|
||||
sodipodi:rx="6"
|
||||
sodipodi:ry="6"
|
||||
d="M 17,22 A 6,6 0 1 1 5,22 6,6 0 1 1 17,22 z"
|
||||
transform="matrix(0.45833331,0,0,0.45833331,1.9583336,-4.8333327)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:4.36363649;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="path3807-0-7-9"
|
||||
sodipodi:cx="11"
|
||||
sodipodi:cy="22"
|
||||
sodipodi:rx="6"
|
||||
sodipodi:ry="6"
|
||||
d="M 17,22 A 6,6 0 1 1 5,22 6,6 0 1 1 17,22 z"
|
||||
transform="matrix(0.45833331,0,0,0.45833331,20.958334,-4.8333327)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:4.36363649;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="path3807-0-7-4"
|
||||
sodipodi:cx="11"
|
||||
sodipodi:cy="22"
|
||||
sodipodi:rx="6"
|
||||
sodipodi:ry="6"
|
||||
d="M 17,22 A 6,6 0 1 1 5,22 6,6 0 1 1 17,22 z"
|
||||
transform="matrix(0.45833331,0,0,0.45833331,14.958334,5.1666673)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
BIN
resources/icons/clip_volume.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
107
resources/icons/clip_volume.svg
Normal file
@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="32px"
|
||||
height="32px"
|
||||
id="svg3797"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="clip_volume.svg"
|
||||
inkscape:export-filename="D:\dev\workspaces\potree\develop\resources\icons\clip_volume.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<defs
|
||||
id="defs3799">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 19.884691 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="32 : 20.018646 : 1"
|
||||
inkscape:persp3d-origin="16 : 10.666667 : 1"
|
||||
id="perspective5140" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="30.849589"
|
||||
inkscape:cx="15.093529"
|
||||
inkscape:cy="15.599734"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1138"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3805" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata3802">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#32ce32;fill-opacity:1;stroke:#000000;stroke-width:0.55901699999999999;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.11803399000000000, 0.55901699000000005;stroke-dashoffset:0"
|
||||
id="path5138-8"
|
||||
sodipodi:cx="16.5"
|
||||
sodipodi:cy="15"
|
||||
sodipodi:rx="6.5"
|
||||
sodipodi:ry="2"
|
||||
d="m 23,15 a 6.5,2 0 1 1 -13,0 6.5,2 0 1 1 13,0 z"
|
||||
transform="matrix(1.6,0,0,2,-9.8,-5)" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 7,7 19,0 5,9 -29,0 z"
|
||||
id="path5412"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
d="m 7,21 19,0 5,9 -29,0 z"
|
||||
id="path5412-9"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#2cd32c;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 6,25 0,-13 21,0 0,13"
|
||||
id="path5434"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#2b982b;fill-opacity:1;stroke:#000000;stroke-width:0.55901699999999999;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.11803399000000000, 0.55901699000000005;stroke-dashoffset:0"
|
||||
id="path5138-8-0"
|
||||
sodipodi:cx="16.5"
|
||||
sodipodi:cy="15"
|
||||
sodipodi:rx="6.5"
|
||||
sodipodi:ry="2"
|
||||
d="m 23,15 a 6.5,2 0 1 1 -13,0 6.5,2 0 1 1 13,0 z"
|
||||
transform="matrix(1.6,0,0,2,-9.8,-18)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
BIN
resources/icons/distance.png
Normal file
|
After Width: | Height: | Size: 680 B |
85
resources/icons/distance.svg
Normal file
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="32px"
|
||||
height="32px"
|
||||
id="svg3797"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="distance.svg">
|
||||
<defs
|
||||
id="defs3799" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="22.395604"
|
||||
inkscape:cx="14.845403"
|
||||
inkscape:cy="16.761565"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1138"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3805" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata3802">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
d="M 8,24 22,10"
|
||||
id="path3829"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="stroke-width:2.52600002000000010;stroke-miterlimit:4;stroke-dasharray:none;fill:#ff0000;fill-opacity:1;stroke:#000000;stroke-opacity:1"
|
||||
id="path3807-4"
|
||||
sodipodi:cx="11"
|
||||
sodipodi:cy="22"
|
||||
sodipodi:rx="6"
|
||||
sodipodi:ry="6"
|
||||
d="M 17,22 A 6,6 0 1 1 5,22 6,6 0 1 1 17,22 z"
|
||||
transform="matrix(0.91666667,0,0,0.91666667,14.416667,-12.666667)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="stroke-width:2.52600002000000010;stroke-miterlimit:4;stroke-dasharray:none;fill:#ff0000;fill-opacity:1;stroke:#000000;stroke-opacity:1"
|
||||
id="path3807"
|
||||
sodipodi:cx="11"
|
||||
sodipodi:cy="22"
|
||||
sodipodi:rx="6"
|
||||
sodipodi:ry="6"
|
||||
d="M 17,22 A 6,6 0 1 1 5,22 6,6 0 1 1 17,22 z"
|
||||
transform="matrix(0.91666667,0,0,0.91666667,-2.5833333,4.3333333)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
BIN
resources/icons/flip_y_z.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
101
resources/icons/flip_y_z.svg
Normal file
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="32px"
|
||||
height="32px"
|
||||
id="svg3797"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="flip_y_z.svg"
|
||||
inkscape:export-filename="D:\dev\workspaces\potree\develop\resources\icons\flip_y_z.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<defs
|
||||
id="defs3799" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="22.395604"
|
||||
inkscape:cx="14.460104"
|
||||
inkscape:cy="12.955058"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1138"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3805" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata3802">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:3.01811147;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 7.4366091,24.160724 24.790752,6.8065759"
|
||||
id="path3802-6"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:17.99999998999999900px;font-style:normal;font-weight:bold;line-height:122.00000286000001000%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.75452786999999999;stroke-opacity:1;font-family:Arial;-inkscape-font-specification:Arial Bold;font-stretch:normal;font-variant:normal"
|
||||
x="5.8119869"
|
||||
y="13.867704"
|
||||
id="text2989"
|
||||
sodipodi:linespacing="122%"
|
||||
transform="scale(1.0198841,0.98050357)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan2991"
|
||||
x="5.8119869"
|
||||
y="13.867704"
|
||||
style="stroke-width:0.75452786999999999;font-size:17.99999998999999900px;-inkscape-font-specification:Arial Bold;font-family:Arial;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal">y</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:17.99999998999999900px;font-style:normal;font-weight:bold;line-height:122.00000286000001000%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.75452786999999999;stroke-opacity:1;font-family:Arial;-inkscape-font-specification:Arial Bold;font-stretch:normal;font-variant:normal"
|
||||
x="17.649065"
|
||||
y="26.180201"
|
||||
id="text2989-1"
|
||||
sodipodi:linespacing="122%"
|
||||
transform="scale(1.0198841,0.98050357)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan2991-7"
|
||||
x="17.649065"
|
||||
y="26.180201"
|
||||
style="stroke-width:0.75452786999999999;font-size:17.99999998999999900px;-inkscape-font-specification:Arial Bold;font-family:Arial;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal">z</tspan></text>
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.50905573;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 8.1911371,23.406196 24.036224,7.5611039"
|
||||
id="path3802"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.1 KiB |
BIN
resources/icons/focus.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
173
resources/icons/focus.svg
Normal file
@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="32px"
|
||||
height="32px"
|
||||
id="svg3797"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="focus.svg"
|
||||
inkscape:export-filename="D:\dev\workspaces\potree\develop\resources\icons\focus.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<defs
|
||||
id="defs3799">
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0.0"
|
||||
refX="0.0"
|
||||
id="Arrow1Lstart"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path3832"
|
||||
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
|
||||
transform="scale(0.8) translate(12.5,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="DotL"
|
||||
orient="auto"
|
||||
refY="0.0"
|
||||
refX="0.0"
|
||||
id="DotL"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path3893"
|
||||
d="M -2.5,-1.0 C -2.5,1.7600000 -4.7400000,4.0 -7.5,4.0 C -10.260000,4.0 -12.5,1.7600000 -12.5,-1.0 C -12.5,-3.7600000 -10.260000,-6.0 -7.5,-6.0 C -4.7400000,-6.0 -2.5,-3.7600000 -2.5,-1.0 z "
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
|
||||
transform="scale(0.8) translate(7.4, 1)" />
|
||||
</marker>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="22.395604"
|
||||
inkscape:cx="-3.8470599"
|
||||
inkscape:cy="14.606522"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1138"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3805" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata3802">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 3.3226256,9.6339284 0,-6.3660716 6.3660702,0"
|
||||
id="path4826"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#path4826"
|
||||
id="use4839"
|
||||
transform="matrix(0,-1,1,0,0.05476842,32.054764)"
|
||||
width="32"
|
||||
height="32" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#use4839"
|
||||
id="use4841"
|
||||
transform="matrix(0,-1,1,0,0.05476842,32.054764)"
|
||||
width="32"
|
||||
height="32" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#use4841"
|
||||
id="use4843"
|
||||
transform="matrix(0,-1,1,0,0.05476842,32.054764)"
|
||||
width="32"
|
||||
height="32" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#ffffff;fill-opacity:0;stroke:#000000;stroke-width:4.39831685;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0.40000000000000002"
|
||||
id="path4849"
|
||||
sodipodi:cx="16.5"
|
||||
sodipodi:cy="16.5"
|
||||
sodipodi:rx="6.5"
|
||||
sodipodi:ry="6.5"
|
||||
d="m 23,16.5 a 6.5,6.5 0 1 1 -13,0 6.5,6.5 0 1 1 13,0 z"
|
||||
transform="matrix(0.9094388,0,0,0.9094388,1.5037476,0.99425978)" />
|
||||
<path
|
||||
style="fill:none;stroke:#ffffff;stroke-width:1.81887758;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 3.3226256,9.6339284 0,-6.3660716 6.3660702,0"
|
||||
id="path4826-8"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#path4826-8"
|
||||
id="use4893"
|
||||
transform="matrix(0,-1,1,0,0.05476842,32.054764)"
|
||||
width="32"
|
||||
height="32" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#use4893"
|
||||
id="use4913"
|
||||
transform="matrix(0,-1,1,0,0.05476842,32.054764)"
|
||||
width="32"
|
||||
height="32" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#use4913"
|
||||
id="use4915"
|
||||
transform="matrix(0,-1,1,0,0.05476842,32.054764)"
|
||||
width="32"
|
||||
height="32" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#757575;fill-opacity:0;stroke:#ffffff;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0.4"
|
||||
id="path4849-7"
|
||||
sodipodi:cx="16.5"
|
||||
sodipodi:cy="16.5"
|
||||
sodipodi:rx="6.5"
|
||||
sodipodi:ry="6.5"
|
||||
d="m 23,16.5 a 6.5,6.5 0 1 1 -13,0 6.5,6.5 0 1 1 13,0 z"
|
||||
transform="matrix(0.9094388,0,0,0.9094388,1.5037476,0.99425978)"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.5 KiB |
BIN
resources/icons/fps_controls.png
Normal file
|
After Width: | Height: | Size: 859 B |
171
resources/icons/fps_controls.svg
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
resources/icons/orbit_controls.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
224
resources/icons/orbit_controls.svg
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
resources/icons/profile.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
145
resources/icons/profile.svg
Normal file
@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="32px"
|
||||
height="32px"
|
||||
id="svg3797"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="profile.svg"
|
||||
inkscape:export-filename="D:\dev\workspaces\potree\develop\resources\icons\profile.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<defs
|
||||
id="defs3799">
|
||||
<linearGradient
|
||||
id="linearGradient3890">
|
||||
<stop
|
||||
id="stop3898"
|
||||
offset="0"
|
||||
style="stop-color:#ff0000;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#ffff00;stop-opacity:1;"
|
||||
offset="0.25"
|
||||
id="stop3904" />
|
||||
<stop
|
||||
style="stop-color:#00ff00;stop-opacity:1;"
|
||||
offset="0.5"
|
||||
id="stop3902" />
|
||||
<stop
|
||||
id="stop3906"
|
||||
offset="0.75"
|
||||
style="stop-color:#00ffff;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#0000ff;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3894" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3890"
|
||||
id="linearGradient3896"
|
||||
x1="17"
|
||||
y1="5"
|
||||
x2="17"
|
||||
y2="26"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
spreadMethod="pad"
|
||||
gradientTransform="matrix(0.91304348,0,0,0.91304348,2.5217391,2.173913)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3890-1"
|
||||
id="linearGradient3896-3"
|
||||
x1="17"
|
||||
y1="5"
|
||||
x2="17"
|
||||
y2="26"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
spreadMethod="pad"
|
||||
gradientTransform="matrix(0.91304348,0,0,0.91304348,2.5217391,2.173913)" />
|
||||
<linearGradient
|
||||
id="linearGradient3890-1">
|
||||
<stop
|
||||
id="stop3898-6"
|
||||
offset="0"
|
||||
style="stop-color:#ff0000;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#ffff00;stop-opacity:1;"
|
||||
offset="0.25"
|
||||
id="stop3904-8" />
|
||||
<stop
|
||||
style="stop-color:#00ff00;stop-opacity:1;"
|
||||
offset="0.5"
|
||||
id="stop3902-8" />
|
||||
<stop
|
||||
id="stop3906-2"
|
||||
offset="0.75"
|
||||
style="stop-color:#00ffff;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#0000ff;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3894-7" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="11.166667"
|
||||
inkscape:cx="-18.07788"
|
||||
inkscape:cy="13.398504"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1138"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3805" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata3802">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 4.0434781,24.956522 5.9693969,18.162896 8,11 l 6,4 3,0 4.391304,-7.391304 2.739131,8.217391 L 27,18"
|
||||
id="path3120-7"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient3896);stroke-width:2.7391305;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 4.3478261,25 8,11 l 6,4 3,0 4.695652,-7.3478261 2.739131,8.2173911 L 28,18"
|
||||
id="path3120"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
BIN
resources/icons/volume.png
Normal file
|
After Width: | Height: | Size: 933 B |
150
resources/icons/volume.svg
Normal file
@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="32px"
|
||||
height="32px"
|
||||
id="svg3797"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="volume.svg"
|
||||
inkscape:export-filename="D:\dev\workspaces\potree\develop\resources\icons\volume.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<defs
|
||||
id="defs3799" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="22.395604"
|
||||
inkscape:cx="2.2089941"
|
||||
inkscape:cy="16.110373"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1138"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3805" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata3802">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="fill:#ff0000;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;fill-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
d="m 28,6 -6,6 0,16 6,-7 z"
|
||||
id="path3776"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:#ff0000;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
d="m 5.5,12.5 0,15 16,0 0,-15 z"
|
||||
id="path4436"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#ff0000;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 6,12 6,-7 16,0 -7,7 z"
|
||||
id="path3774"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#00ff00;fill-opacity:1;stroke:#000000;stroke-width:2.18181825;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="path3807-0-7-9-1"
|
||||
sodipodi:cx="11"
|
||||
sodipodi:cy="22"
|
||||
sodipodi:rx="6"
|
||||
sodipodi:ry="6"
|
||||
d="M 17,22 A 6,6 0 1 1 5,22 6,6 0 1 1 17,22 z"
|
||||
transform="matrix(0.48958335,0,0,0.48958335,5.6145831,-5.7083338)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#00ff00;fill-opacity:1;stroke:#000000;stroke-width:2.18181825;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="path3807-0-7-9-1-9"
|
||||
sodipodi:cx="11"
|
||||
sodipodi:cy="22"
|
||||
sodipodi:rx="6"
|
||||
sodipodi:ry="6"
|
||||
d="M 17,22 A 6,6 0 1 1 5,22 6,6 0 1 1 17,22 z"
|
||||
transform="matrix(0.48958335,0,0,0.48958335,21.614583,-5.7083338)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#00ff00;fill-opacity:1;stroke:#000000;stroke-width:2.18181825;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="path3807-0-7-9-1-8"
|
||||
sodipodi:cx="11"
|
||||
sodipodi:cy="22"
|
||||
sodipodi:rx="6"
|
||||
sodipodi:ry="6"
|
||||
d="M 17,22 A 6,6 0 1 1 5,22 6,6 0 1 1 17,22 z"
|
||||
transform="matrix(0.48958335,0,0,0.48958335,21.677083,10.229166)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#00ff00;fill-opacity:1;stroke:#000000;stroke-width:2.18181825;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="path3807-0-7-9-1-6"
|
||||
sodipodi:cx="11"
|
||||
sodipodi:cy="22"
|
||||
sodipodi:rx="6"
|
||||
sodipodi:ry="6"
|
||||
d="M 17,22 A 6,6 0 1 1 5,22 6,6 0 1 1 17,22 z"
|
||||
transform="matrix(0.48958335,0,0,0.48958335,0.61458315,1.1666664)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#00ff00;fill-opacity:1;stroke:#000000;stroke-width:2.18181825;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="path3807-0-7-9-1-5"
|
||||
sodipodi:cx="11"
|
||||
sodipodi:cy="22"
|
||||
sodipodi:rx="6"
|
||||
sodipodi:ry="6"
|
||||
d="M 17,22 A 6,6 0 1 1 5,22 6,6 0 1 1 17,22 z"
|
||||
transform="matrix(0.48958335,0,0,0.48958335,16.614583,1.2916662)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#00ff00;fill-opacity:1;stroke:#000000;stroke-width:2.18181825;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="path3807-0-7-9-1-0"
|
||||
sodipodi:cx="11"
|
||||
sodipodi:cy="22"
|
||||
sodipodi:rx="6"
|
||||
sodipodi:ry="6"
|
||||
d="M 17,22 A 6,6 0 1 1 5,22 6,6 0 1 1 17,22 z"
|
||||
transform="matrix(0.48958335,0,0,0.48958335,0.61458315,16.291666)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#00ff00;fill-opacity:1;stroke:#000000;stroke-width:2.18181825;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="path3807-0-7-9-1-2"
|
||||
sodipodi:cx="11"
|
||||
sodipodi:cy="22"
|
||||
sodipodi:rx="6"
|
||||
sodipodi:ry="6"
|
||||
d="M 17,22 A 6,6 0 1 1 5,22 6,6 0 1 1 17,22 z"
|
||||
transform="matrix(0.48958335,0,0,0.48958335,16.614583,16.291666)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.6 KiB |
@ -1,220 +1,228 @@
|
||||
{
|
||||
"version": "1.3",
|
||||
"version": "1.4",
|
||||
"octreeDir": "data",
|
||||
"boundingBox": {
|
||||
"lx": -2.91016,
|
||||
"ly": -4.06274,
|
||||
"lz": 2.63048,
|
||||
"ux": 4.62238,
|
||||
"uy": 3.4698,
|
||||
"uz": 10.163
|
||||
"lx": -4.9854,
|
||||
"ly": 1.0366,
|
||||
"lz": -3.4494,
|
||||
"ux": 0.702300000000001,
|
||||
"uy": 6.7243,
|
||||
"uz": 2.2383
|
||||
},
|
||||
"tightBoundingBox": {
|
||||
"lx": -4.9854,
|
||||
"ly": 1.0387,
|
||||
"lz": -3.4454,
|
||||
"ux": -0.7889,
|
||||
"uy": 6.7243,
|
||||
"uz": 1.1237
|
||||
},
|
||||
"pointAttributes": [
|
||||
"POSITION_CARTESIAN",
|
||||
"COLOR_PACKED"
|
||||
],
|
||||
"spacing": 0.1,
|
||||
"spacing": 0.0750000029802322,
|
||||
"scale": 0.001,
|
||||
"hierarchy": [
|
||||
["r", 5942],
|
||||
["r0", 2174],
|
||||
["r1", 450],
|
||||
["r2", 3021],
|
||||
["r3", 3384],
|
||||
["r4", 5667],
|
||||
["r5", 857],
|
||||
["r6", 4074],
|
||||
["r7", 3757],
|
||||
["r02", 168],
|
||||
["r03", 1923],
|
||||
["r05", 628],
|
||||
["r07", 5280],
|
||||
["r12", 461],
|
||||
["r16", 648],
|
||||
["r17", 441],
|
||||
["r21", 5449],
|
||||
["r23", 168],
|
||||
["r25", 5898],
|
||||
["r27", 107],
|
||||
["r30", 4832],
|
||||
["r32", 367],
|
||||
["r34", 3981],
|
||||
["r35", 3131],
|
||||
["r36", 22],
|
||||
["r40", 3591],
|
||||
["r41", 1426],
|
||||
["r42", 46],
|
||||
["r43", 7635],
|
||||
["r44", 374],
|
||||
["r45", 1094],
|
||||
["r46", 3853],
|
||||
["r47", 2986],
|
||||
["r50", 74],
|
||||
["r51", 1],
|
||||
["r52", 2852],
|
||||
["r53", 177],
|
||||
["r54", 101],
|
||||
["r61", 5846],
|
||||
["r63", 1221],
|
||||
["r64", 2033],
|
||||
["r65", 4771],
|
||||
["r67", 1662],
|
||||
["r70", 6735],
|
||||
["r71", 2635],
|
||||
["r72", 3326],
|
||||
["r73", 650],
|
||||
["r76", 1250],
|
||||
["r77", 257],
|
||||
["r026", 530],
|
||||
["r032", 378],
|
||||
["r033", 1480],
|
||||
["r036", 1889],
|
||||
["r037", 3010],
|
||||
["r054", 238],
|
||||
["r056", 1094],
|
||||
["r057", 762],
|
||||
["r070", 1843],
|
||||
["r071", 1210],
|
||||
["r072", 3830],
|
||||
["r073", 767],
|
||||
["r074", 4861],
|
||||
["r075", 106],
|
||||
["r076", 5035],
|
||||
["r077", 1633],
|
||||
["r122", 445],
|
||||
["r126", 1023],
|
||||
["r162", 373],
|
||||
["r163", 36],
|
||||
["r164", 1497],
|
||||
["r165", 8],
|
||||
["r167", 205],
|
||||
["r172", 1300],
|
||||
["r176", 3],
|
||||
["r210", 2788],
|
||||
["r211", 633],
|
||||
["r212", 838],
|
||||
["r213", 4318],
|
||||
["r214", 4519],
|
||||
["r215", 208],
|
||||
["r216", 557],
|
||||
["r217", 6047],
|
||||
["r231", 155],
|
||||
["r235", 440],
|
||||
["r250", 4161],
|
||||
["r251", 165],
|
||||
["r252", 1003],
|
||||
["r253", 4764],
|
||||
["r254", 1852],
|
||||
["r255", 2251],
|
||||
["r256", 616],
|
||||
["r257", 6818],
|
||||
["r275", 381],
|
||||
["r300", 2972],
|
||||
["r302", 4840],
|
||||
["r304", 4053],
|
||||
["r306", 5773],
|
||||
["r320", 119],
|
||||
["r324", 1203],
|
||||
["r340", 2357],
|
||||
["r341", 2434],
|
||||
["r342", 4117],
|
||||
["r344", 1997],
|
||||
["r345", 2555],
|
||||
["r346", 1507],
|
||||
["r350", 2269],
|
||||
["r352", 3534],
|
||||
["r353", 470],
|
||||
["r354", 1113],
|
||||
["r355", 54],
|
||||
["r356", 999],
|
||||
["r357", 688],
|
||||
["r364", 62],
|
||||
["r365", 7],
|
||||
["r401", 1424],
|
||||
["r403", 2506],
|
||||
["r406", 947],
|
||||
["r407", 5338],
|
||||
["r410", 738],
|
||||
["r412", 2277],
|
||||
["r413", 564],
|
||||
["r414", 77],
|
||||
["r416", 922],
|
||||
["r417", 45],
|
||||
["r424", 29],
|
||||
["r425", 104],
|
||||
["r430", 4705],
|
||||
["r431", 114],
|
||||
["r432", 5396],
|
||||
["r433", 8405],
|
||||
["r434", 4563],
|
||||
["r435", 83],
|
||||
["r436", 4626],
|
||||
["r437", 173],
|
||||
["r442", 36],
|
||||
["r443", 1068],
|
||||
["r447", 18],
|
||||
["r452", 998],
|
||||
["r453", 2631],
|
||||
["r461", 2438],
|
||||
["r463", 985],
|
||||
["r464", 281],
|
||||
["r465", 3004],
|
||||
["r466", 1995],
|
||||
["r467", 3950],
|
||||
["r470", 4351],
|
||||
["r471", 9],
|
||||
["r472", 5238],
|
||||
["r476", 1333],
|
||||
["r503", 188],
|
||||
["r520", 3417],
|
||||
["r521", 681],
|
||||
["r522", 5061],
|
||||
["r523", 982],
|
||||
["r530", 180],
|
||||
["r536", 381],
|
||||
["r542", 337],
|
||||
["r611", 4508],
|
||||
["r613", 7480],
|
||||
["r614", 1922],
|
||||
["r615", 3107],
|
||||
["r617", 4582],
|
||||
["r631", 2907],
|
||||
["r635", 1597],
|
||||
["r644", 1899],
|
||||
["r645", 3530],
|
||||
["r647", 1084],
|
||||
["r650", 4204],
|
||||
["r651", 1936],
|
||||
["r652", 1547],
|
||||
["r653", 4255],
|
||||
["r654", 3044],
|
||||
["r656", 1801],
|
||||
["r657", 522],
|
||||
["r671", 4687],
|
||||
["r673", 177],
|
||||
["r674", 220],
|
||||
["r675", 950],
|
||||
["r700", 5633],
|
||||
["r701", 5210],
|
||||
["r702", 5704],
|
||||
["r703", 5499],
|
||||
["r707", 3858],
|
||||
["r710", 106],
|
||||
["r712", 1416],
|
||||
["r714", 1921],
|
||||
["r715", 219],
|
||||
["r716", 4007],
|
||||
["r717", 1460],
|
||||
["r720", 3114],
|
||||
["r721", 130],
|
||||
["r724", 5409],
|
||||
["r725", 4051],
|
||||
["r734", 2341],
|
||||
["r735", 17],
|
||||
["r760", 2962],
|
||||
["r761", 319],
|
||||
["r762", 1073],
|
||||
["r763", 2],
|
||||
["r770", 824],
|
||||
["r771", 27]
|
||||
["r", 5202],
|
||||
["r0", 5020],
|
||||
["r1", 2821],
|
||||
["r2", 4040],
|
||||
["r3", 1350],
|
||||
["r4", 2169],
|
||||
["r5", 124],
|
||||
["r6", 3682],
|
||||
["r7", 36],
|
||||
["r00", 446],
|
||||
["r01", 739],
|
||||
["r02", 1588],
|
||||
["r03", 2682],
|
||||
["r04", 1337],
|
||||
["r06", 3266],
|
||||
["r07", 8102],
|
||||
["r10", 10],
|
||||
["r11", 1],
|
||||
["r12", 647],
|
||||
["r14", 16],
|
||||
["r16", 8446],
|
||||
["r17", 1437],
|
||||
["r20", 339],
|
||||
["r21", 875],
|
||||
["r22", 575],
|
||||
["r23", 1164],
|
||||
["r25", 6333],
|
||||
["r26", 1278],
|
||||
["r27", 3520],
|
||||
["r30", 14],
|
||||
["r32", 538],
|
||||
["r34", 3861],
|
||||
["r35", 312],
|
||||
["r36", 53],
|
||||
["r37", 1],
|
||||
["r40", 485],
|
||||
["r42", 4803],
|
||||
["r43", 2884],
|
||||
["r52", 444],
|
||||
["r60", 5605],
|
||||
["r61", 2357],
|
||||
["r62", 3781],
|
||||
["r63", 1949],
|
||||
["r70", 111],
|
||||
["r003", 86],
|
||||
["r006", 1451],
|
||||
["r007", 3],
|
||||
["r010", 77],
|
||||
["r011", 21],
|
||||
["r012", 291],
|
||||
["r013", 442],
|
||||
["r014", 584],
|
||||
["r015", 103],
|
||||
["r016", 312],
|
||||
["r017", 160],
|
||||
["r020", 5],
|
||||
["r021", 447],
|
||||
["r022", 31],
|
||||
["r023", 178],
|
||||
["r024", 2391],
|
||||
["r025", 1256],
|
||||
["r026", 851],
|
||||
["r027", 20],
|
||||
["r030", 402],
|
||||
["r031", 1020],
|
||||
["r032", 390],
|
||||
["r033", 1789],
|
||||
["r034", 344],
|
||||
["r035", 1039],
|
||||
["r036", 880],
|
||||
["r037", 1901],
|
||||
["r042", 2875],
|
||||
["r046", 1821],
|
||||
["r060", 1882],
|
||||
["r061", 4407],
|
||||
["r064", 1812],
|
||||
["r065", 4190],
|
||||
["r070", 2911],
|
||||
["r071", 993],
|
||||
["r072", 6246],
|
||||
["r073", 3033],
|
||||
["r074", 5639],
|
||||
["r075", 1253],
|
||||
["r076", 5927],
|
||||
["r077", 4042],
|
||||
["r102", 18],
|
||||
["r116", 1],
|
||||
["r120", 136],
|
||||
["r122", 631],
|
||||
["r126", 927],
|
||||
["r127", 224],
|
||||
["r143", 35],
|
||||
["r147", 12],
|
||||
["r160", 3583],
|
||||
["r161", 5640],
|
||||
["r162", 2921],
|
||||
["r163", 2293],
|
||||
["r164", 3412],
|
||||
["r165", 5274],
|
||||
["r166", 4055],
|
||||
["r167", 4442],
|
||||
["r170", 1096],
|
||||
["r172", 364],
|
||||
["r174", 1480],
|
||||
["r176", 2209],
|
||||
["r200", 123],
|
||||
["r202", 468],
|
||||
["r203", 280],
|
||||
["r210", 37],
|
||||
["r211", 230],
|
||||
["r212", 436],
|
||||
["r213", 22],
|
||||
["r214", 863],
|
||||
["r215", 1],
|
||||
["r216", 446],
|
||||
["r217", 630],
|
||||
["r220", 1026],
|
||||
["r222", 622],
|
||||
["r224", 29],
|
||||
["r225", 84],
|
||||
["r231", 159],
|
||||
["r233", 950],
|
||||
["r235", 42],
|
||||
["r237", 1838],
|
||||
["r250", 4504],
|
||||
["r251", 2],
|
||||
["r252", 3107],
|
||||
["r253", 174],
|
||||
["r254", 5054],
|
||||
["r255", 4173],
|
||||
["r256", 3374],
|
||||
["r257", 3301],
|
||||
["r260", 38],
|
||||
["r261", 1030],
|
||||
["r262", 4],
|
||||
["r263", 4],
|
||||
["r265", 2113],
|
||||
["r266", 5],
|
||||
["r267", 955],
|
||||
["r270", 15],
|
||||
["r271", 192],
|
||||
["r272", 11],
|
||||
["r273", 2292],
|
||||
["r274", 2567],
|
||||
["r275", 3273],
|
||||
["r276", 1538],
|
||||
["r277", 1056],
|
||||
["r304", 9],
|
||||
["r305", 15],
|
||||
["r320", 659],
|
||||
["r322", 765],
|
||||
["r326", 15],
|
||||
["r340", 253],
|
||||
["r341", 1201],
|
||||
["r342", 256],
|
||||
["r344", 4436],
|
||||
["r345", 4585],
|
||||
["r346", 3465],
|
||||
["r350", 304],
|
||||
["r354", 705],
|
||||
["r360", 21],
|
||||
["r361", 3],
|
||||
["r364", 158],
|
||||
["r370", 1],
|
||||
["r400", 279],
|
||||
["r402", 1306],
|
||||
["r420", 4637],
|
||||
["r421", 3235],
|
||||
["r422", 4110],
|
||||
["r423", 3724],
|
||||
["r424", 488],
|
||||
["r426", 1478],
|
||||
["r430", 3365],
|
||||
["r431", 259],
|
||||
["r432", 4349],
|
||||
["r433", 2825],
|
||||
["r522", 1682],
|
||||
["r600", 4013],
|
||||
["r601", 4349],
|
||||
["r602", 2331],
|
||||
["r603", 6069],
|
||||
["r604", 1634],
|
||||
["r606", 2681],
|
||||
["r610", 1750],
|
||||
["r611", 328],
|
||||
["r612", 4252],
|
||||
["r613", 2495],
|
||||
["r620", 1082],
|
||||
["r621", 5146],
|
||||
["r623", 1531],
|
||||
["r624", 2870],
|
||||
["r625", 3],
|
||||
["r626", 2086],
|
||||
["r627", 341],
|
||||
["r630", 1768],
|
||||
["r631", 160],
|
||||
["r632", 3485],
|
||||
["r633", 29],
|
||||
["r636", 788],
|
||||
["r700", 417]
|
||||
]
|
||||
}
|
||||
|
||||